Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » AggregationKind(How do I determine the "aggregation kind" for an association?)
icon9.gif  AggregationKind [message #1061814] Tue, 04 June 2013 08:22 Go to next message
Mark Hunter is currently offline Mark HunterFriend
Messages: 1
Registered: June 2013
Junior Member
I am using acceleo to generate an XSD from a UML model.

I want to be able to create different types of structures depending the type of association (i.e. Composition, Shared Aggregation, None).

A sample piece of Test Code below gives you the idea...

--- Code ---
[for (anAssociation : Association | aClass.getAssociations())]
[if( anAssociation.attribute.aggregation <--- ) /]
--- End Code ---

What do I actually do with the AggregationKind entity to determine what type of aggregation it is?

Help much appreciated.
Re: AggregationKind [message #1062511 is a reply to message #1061814] Sat, 08 June 2013 07:31 Go to previous messageGo to next message
Low Coupling is currently offline Low CouplingFriend
Messages: 30
Registered: June 2013
I Mark the aggreagation kind is a property of the association's member ends.
You shold thus look for




for further details about UML Associations


[Updated on: Sat, 08 June 2013 09:16]

Report message to a moderator

Re: AggregationKind [message #1062647 is a reply to message #1062511] Mon, 10 June 2013 08:53 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member


I assume that AggregationKind is an enumeration, so in order to compare it you would have to do something like this:
[if(myObject.aggregation = Aggregation::composite)]composite[/if]


Stephane Begaudeau, Obeo

Twitter: @sbegaudeau
Google+: +stephane.begaudeau
Blog: | Eclipse Java Development Tools Tips and Tricks
Re: AggregationKind [message #1064216 is a reply to message #1062647] Tue, 18 June 2013 10:14 Go to previous message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
hi guy,
you can do dirrectly get your aggregation, inheritance and others. Maybe it can be better.
You can do:
p.aggregation.toString().strcmp('composite') --> For acomposition,
p.aggregation.toString().strcmp('shared') --> For an aggregation
Previous Topic:Customize the launcher unit
Next Topic:[Acceleo] Problems during code re-generation
Goto Forum:

Current Time: Sun Apr 14 02:52:30 GMT 2024

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

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

Back to the top