opengeospatial / styles-and-symbology

OGC Styles & Symbology Standards
Other
11 stars 6 forks source link

Inverted direction of the composition arrow in UML class diagrams #41

Open jansule opened 1 year ago

jansule commented 1 year ago

In the UML class diagrams, it looks as if the diamonds of the composition arrow are currently adjacent to the contained class instead of the containing class, which does not seem to follow the UML spec (see e.g. https://www.omg.org/spec/UML/2.5.1/PDF Figure 11.5).

Example: OperationExpression is the containing class, Operation the contained class, so I would expect the diamond to be adjacent to OperationExpression.

image

cportele commented 1 year ago

Yes, they are all at the wrong end.

It is also redundant - and not proper UML - to express a single property as both an attribute and a composition role. I would just drop all the compositions.

jerstlouis commented 1 year ago

Thanks for pointing this out.

I had seen the opposite directions used in several places (just found this one: https://images.doclify.net/gleek-web/d/454dab25-c05d-4cbd-8cfc-b1651745346d.png?w=1200&format=webp), but clearly this is how it should be in proper UML :)

jerstlouis commented 4 months ago

This order of the arrow should be correct now. Thanks @jansule for spotting this and @maxcollombin for fixing this.

At last for now while we are working on the draft, we'll keep both the attribute and composition arrows despite this not being proper UML, since it's convenient to see the relationship class boxes yet it's also convenient to have the full list of attributes visible inside the boxes.