Thanks for the diagram Paolo, helps a lot.
Hi nif,
Before I (attempt to) answer your questions a few words about the diagram (and EA). Firstly, this is MY modelling methodology - so, apologies if I have confused anyone. The AssociationEnds and their adornments are created using the facilities that EA has to support these concepts (which like almost all UML tools are close to zero).
The connectors between the lozenge and the associated classes are AssociationEnds - not full (binary) Associations. That is, they are the half-line from where the AssociationClass dotted connector meet the Association back to the Class. Thus the Association from Class T to Class U contains 2 AssociationEnds.
I needed to distinguish these AssociationEnd lines from the normal ones, I colour them deep purple (Great Band!) and by attaching the Composition marker makes it look weird enough.
I guess that I should also mention that while an AssociationClass is a real Class, an ordinary class can't do the same job. An AssociationClass is an ordinary Class plus an Attribute for each AssociationEnd. These attributes need to be distinguished from the other attributes (as the «end» stereotype does for the AssociationEnd). Strangely enough,I use the «end» stereotype for this purpose.
I am confused however (there's a surprise) the UML Reference Manual 2nd edition states that "Aggregation (including composition) is only meaningful for binary associations. An n-ary association may not contain an aggregation or composition marker on any role." It doesn't state why.
I ran an n-ary and aggregation search in the draft version of the UML2 superstructure document that I have and this also states that "only binary associations can be aggregations."
Since the (normal) Aggregation describes the meronymic relationship between the holonym (say Class T) and the meronyms (say Class U). This requires a differentiation between the two classes (one the holonym, one the meronym). In an N-ary Association this isn't possible. All the classes have the same (notional) weight. (Try to "speak" any N-ary Association to give one associated Class more weight than another)
The AssociationClass (if any) on the Association doesn't have any bearing on the Aggregation/Composition.
If EA allows you to model aggregations or compositions on an n-ary associations then it would appear that this conflicts with the UML superstructure document. I have tried it and EA allows you to place an composite/aggregation marker on either end of the association.
Any thoughts on this.
nif
As I mentioned above, support for N-Ary associations is lacking in (all?) UML tools. EA does NOT see the connector between the Lozenge and the associated Class as an AssociationEnd. Thus it allows the Composition marker at either end.
Admittedly, placing the Composition maker at the associated Class end is MY methodology, but I feel it IS consistent with both UML and Set theory. My preference would be for a different line style for Association Ends.
HTH,
Paolo