UML2 class diagram - embedded notation for generalization?
Asked Answered
R

2

7

Enterprise Architect offers an embedded textual notation for generalization relationships by putting the name of the associated classifier into the top right corner of the specializing classifier in italics. The EA UML2 tutorial lists

Test

as an equivalent alternative to the usual notation

Test
(source: sparxsystems.com)

I was wondering if this visual presentation is specific to EA, or if the UML specification has anything to say about this. Neither the sections on Generalization nor Class/Classifiers in the UML infrastructure contain any pointers in this direction.

Rance answered 29/10, 2014 at 12:23 Comment(2)
I couldn't find about that notation in the UML 2.3 Superstructure Spec, neither any hint about it on the EA Online Docs (at least not where I was looking for it). Seems to be an EA specific presentation feature (but very useful though).Vastha
I've also looked in UML 1.5 and it's not there (sometimes EA has hang-overs from earlier specs).Litta
P
1

I haven't seen the first notation anywhere in the OMG specs. I'm pretty sure it isn't a UML standard.

It seems of limited use to me as well, given that multiple shapes (and if you don't have multiple shapes, you don't have anything to generalize from the shapes and therefore no reason for a generalization) will have the base class redundantly specified in all the subclasses. On the other hand, it could be a useful shorthand in a situation where it makes sense to diagram out only one member of a specialization set.

Pome answered 31/10, 2014 at 19:14 Comment(0)
M
2

Page 84 of UML Infrastructure Specification, v2.3: Notation The name of an abstract Classifier is shown in italics.

Mordecai answered 30/10, 2014 at 12:29 Comment(4)
Thanks! I was aware of that notation for abstract classifiers - the reference you cite does not cover the use of the classifier name within another classifier, however.Rance
meager ones, though ;-)Mordecai
I don't think the fact that the Shape class is shown in italics is relevant to the question; it's simply saying that the base class is abstract. If the base class were not an abstract class, presumably EA would be happy to use the same notation with the base class not in italics.Pome
Superstructures is not really a Bible. It has lots of flaws. Even a glossary is missing. I think one should have freedom in interpreting it and what serves for communication is good anyway. I made good use of this feature to unclutter diagrams. As long as you can communicate your thought you can apply a lot of things.Mordecai
P
1

I haven't seen the first notation anywhere in the OMG specs. I'm pretty sure it isn't a UML standard.

It seems of limited use to me as well, given that multiple shapes (and if you don't have multiple shapes, you don't have anything to generalize from the shapes and therefore no reason for a generalization) will have the base class redundantly specified in all the subclasses. On the other hand, it could be a useful shorthand in a situation where it makes sense to diagram out only one member of a specialization set.

Pome answered 31/10, 2014 at 19:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.