UML metamodel: derived, derived union and subsetti

2019-06-16 19:20发布

If you have ever worked with the metamodel of UML, you propably know the concepts of unions and subsets - As far as I understand it:

  • Attributes and associations of an element/class marked as "derived union" cannot be used directly. In more specific sub-classes, you can possibly find subsets of them that can be used, as long as they are not marked as derived unions themselves.
  • "derived" (without union) attributes and associations have also subsets in more specific classes, but unlike above you can use them directly without having to look for subsets in more specific classes

My questions:

  1. Does this make sense or am I on the wrong track here?
  2. What is the meaning of the "/" (slash) you can find in front of some attributes/associations, that they have subsets in child-classes? E.g. /general : Classifier[*]

1条回答
Anthone
2楼-- · 2019-06-16 19:53

An union property is a property that consists of multiple other properties. You can only understand the union, when you combine all subsets. A list is almost by definition an union. Almost, because it might be uninitialized.

A derived union is a property requiring a specific collection of subsets. I would not talk about accessing them directly, but about how direct you can understand them. You need all information before you can make an interpretation.

The difference between the two that a derived union requires a specific subset and an union might have a subset and might have different subsets in different contexts. A very simple example being the fields on a form. All required fields show the definition of a derived union. All other fields are part of the complete union.

Derived unions can contain derived unions in their subsets. It directs the creation of classes and their instances, it does not make them impossible.

All derived features require other features to be known. Temperature can be read directly, but to know if someone has fever requires more knowledge, like the time of the day, the place of collecting information etc..

The slash implies that it is being derived.

查看更多
登录 后发表回答