Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can association lines be merged in one line in UML?

Is it in accordance with the UML standard to merge a few association lines into one line, like on the attached diagram?

assocation lines merged into one line

like image 357
Adam Siemion Avatar asked Feb 11 '23 19:02

Adam Siemion


2 Answers

Yes, I think this is allowed as a notational variant, which implies that all association ends that participate in the merger, have the same properties (e.g. the same multiplicity, navigability, visibility, etc.).

Figure 11.34 in the UML 2.5 spec shows an example of such a merged association end sharing the same source segment of the association line.

like image 74
Gerd Wagner Avatar answered Feb 13 '23 07:02

Gerd Wagner


(Edited answer.) In the UML specification a "shared target style" is defined in Figure 9.23 - Examples of generalizations between classes, see http://www.omg.org/spec/UML/2.4.1/ on page 52.

Edit: In the spec, however, this refers only to generalizations, which are not a subtype of associations but of relationships (thanks to @xmojmr for the pointer to the UML superstructure).

In addition to the notation mentioned by @gwag, here is the original caption for that figure:

Figure 11.34 shows a (...) model using the notational option of sharing the same source segment between multiple compositions. The multiplicity and name adornments on the shared end apply to all of the compositions. The model values for absent adornments on the merged segment, such as property modifiers or visibility, may differ.

Found on page 214.

like image 38
observer Avatar answered Feb 13 '23 09:02

observer