Question
Some questions about the UML Comment specification
In section 7.2, page 63 of the PDF file of the UML 2.5.1 specification, the following diagram is presented along with the description of the UML Comment type:
Some questions arise in my mind here:
Why is there a multiplicity of
0..1
on the composition aggregate endowningElement
(next to Element)? A Comment must always have anowningElement
since it is not a top-level Package;The association end
annotatedElement
is*
, which means that zero or more Elements can be annotated. It seems to me that this should be1..*
since (a) there must always be anowningElement
, and (b) why would an Element own a Comment if it (the owner) was not also anannotatedElement
?I can see why the same Comment might be applied to several different Elements; however, if one Element owns several Comments, how are they distinguishable from each other? A Comment is not a NamedElement, so we cannot query a single Comment by name, and there is no ordering constraint on the set of Comments.
According to its multiplicity, the Comment
body
attribute can be empty. Does this make any sense?
The latest specification document can be downloaded here: https://www.omg.org/spec/UML/