This is actually two questions rolled into one:
(1) Association
inherits Relationship
. For classes which inherit DirectedRelationship
, the convention seems to be that the specialized DirectedRelationship class is owned by its source
Element, although I could not find an explicit reference to that.
For Association, I cannot find anywhere in the specification that explicitly says what the type of the owner
Element should be. However, it is stated that there must be an owner because only Packages are allowed to have no owner.
It makes the most sense to me that the owner of an Association should be the nearest enclosing Namespace of all of its related Elements, which would also apply to N-ary Associations. Is this also more or less the consensus among UML tool implementations?
(2) An Association can also be derived — on p. 242 in the last paragraph before section 11.5.3.2 “Association Classes” begins, it says:
"The existence of an association may be derived from other information
in the model. The logical relationship between the derivation of an
Association and the derivation of its ends is model-specific."
Does this mean that an Association does not have to exist in the model? If I want to generate an XMI file from a model, wouldn’t I have to explicity include all Associations? I am wondering about the case where a Class can have an attribute referring to another Class which could also be represented by an Association (or Dependency), but the modeler chose to model it as an attribute … is this what is meant by that paragraph?