Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Is there a way to support UML Aggregation in Sirius?
Is there a way to support UML Aggregation in Sirius? [message #1834191] Wed, 04 November 2020 15:28 Go to next message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 101
Registered: March 2020
Senior Member
For the project that I am working on, it would be very handy to repurpose the containers syntax in Sirius to be used for Aggregation instead of Composition. Is there some way of easily defining this? As far as I know the only way I can think of is redefining the semantics around a container in an ETL or something along those lines. Is there any way of implementing this?
Re: Is there a way to support UML Aggregation in Sirius? [message #1834215 is a reply to message #1834191] Thu, 05 November 2020 08:42 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Hi,
There is no problem to do that in Sirius. The "graphical graph" is not directly linked to the "semantic graph". In the odesign file, when you define a "Node mapping" in a "Container mapping", you can precise, in the field "Semantic Candidates Expression", the expression to find the "children" from the semantic container. And here you can use aggregation links.
Regards,
Laurent


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Is there a way to support UML Aggregation in Sirius? [message #1834524 is a reply to message #1834215] Wed, 11 November 2020 18:11 Go to previous messageGo to next message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 101
Registered: March 2020
Senior Member
Hi Laurent,

I don' think I understand. Usually in the semantic candidate expression I put feature:children. I assume this means that the parent of the child owns the child as that is how it is defined in my metamodel since it uses composition to define the relationship. I currently have the children defined as a sub-node of the container which is a parent. What I am looking for is a way to maintain that children is a sub-node of parent, but the parent does is not composed of its children, it aggregates them.
Re: Is there a way to support UML Aggregation in Sirius? [message #1834865 is a reply to message #1834524] Thu, 19 November 2020 11:33 Go to previous messageGo to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 131
Registered: October 2019
Senior Member
Thomas, in the metamodeling syntax, I think that a more correct phrasing will be "children relate to parent" (and not "is a sub-node") but "parent is not composed of its children".
If you consider this and agree, then the solution is straightforward: instead of composition link use a (more general) relation of two to many (so that a child can only have two parents). As for the representation - it can be built in a way which presents the parent and its children (e.g., by aql: self.children, provided you named the relations "children" and start from the parent). I believe this is also what Laurent was trying to offer.
Re: Is there a way to support UML Aggregation in Sirius? [message #1835616 is a reply to message #1834865] Tue, 08 December 2020 20:58 Go to previous message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 101
Registered: March 2020
Senior Member
I am in agreement with this. I think I was unclear with how I worded this originally. What I am wondering is if it is possible to change the semantics around containers; instead of being used to represent composition is it possible to represent aggregation using a container rather than a white diamond arrow?

This way there can be a container, which is the parent, that holds children. But the parent (container) does not own the children which are owned (via black diamond arrow) by something else.
Previous Topic:Edges display - Bug / Missing feature
Next Topic:Constrain edges to be unique
Goto Forum:
  


Current Time: Fri Apr 26 21:00:14 GMT 2024

Powered by FUDForum. Page generated in 0.02917 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top