Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Thematic/Semantic tagging of associations in UML

Tags:

uml

Is it possible to use semantic tags in UML associations (among classes) to express the wider semantic nature of the relationship?

For example, consider the relation that Doctor TREATS Patient. Beyond the TREATS relation, we also want to express that it's a medical and humanitarian relation. Is it possible to somehow tag the association between Doctor and Patient with these two additional tags in UML?

Also, consider the example of a Doctor's relation with another Doctor. We want a model where a Doctor can have multiple (semantic) relations such as Professional, Socialand many other relations with another Doctor.

like image 920
kzs Avatar asked Jan 29 '26 16:01

kzs


1 Answers

If you want to "tag" UML element, you should take a look at the UML Stereotype concept. In short it is a way to add domain related information to UML element.

In the following screenshot, I defined two stereotypes respectively named "humanitarian" and "medical" and I stereotyped a UML association with both of them.

enter image description here

Another solution would be to define a stereotype which has two boolean properties "humanitarian" and "medical" and set their values as true when the stereotyped is applied.

enter image description here

like image 174
Red Beard Avatar answered Feb 02 '26 18:02

Red Beard