Hi Gert,
first of all thanks for the reply. I think I'll need another pointer into the UML standard or a direct explanation to fully get what you're saying about the compositions.
Assume I have the following classes:
Now I want to model some sort of specification that allows me to specify a value on different granularity with precedence:
- continent - continent is very generic
- continent - airport is "medium" generic
- airport - airport is highly specific
What all of the above have in common is that for my specification element I have two associations, each of which is either a continent or a country or an airport.
How would you suggest I model that using UMLs built-in support for XOR? Whenever I look to OMG for the composition it always seems to have something to do with existence or lifecycle, which is simply not true here. An airport etc. exists without such a relationship to the specification element. A specification element's existence on the other hand can not really be considered as dependent on the e.g. airport.
In my understanding, the only "XOR" about the composition would then be my lifecycle can only be bound to either this or that object, but that interpretation doesn't help me here.
Am I going in the completely wrong direction?
Thanks,
Rouven