UML 2.2 RTF Avatar
  1. OMG Issue

UML22 — AssociationClass is severely underspecified

  • Key: UML22-191
  • Legacy Issue Number: 9374
  • Status: closed  
  • Source: Adaptive ( Mr. Pete Rivett)
  • Summary:

    It is not at all clear which Properties will result on both the AssociationClass and the end Classes. The Semantics section of 7.3.4 says nothing more specific than "The semantics of an association class is a combination of the semantics of an ordinary association and of a class." - without saying anything about how they are combined. neither is there any indication as to how to access the attributes of the AssociationClass.
    One specific issue is that the composition property is inherited twice: ownedEnd and ownedAttribute - with no redefinition or subsets relationship between them.
    Neither is anything said about the effect of navigability.

    Proposed resolution:

    AssociationClass should redefine ownedNavigableEnd

    In the example in 7.3.4 the following properties will result. C: indicates here that C owns P via the Class:ownedAttribute property. In this case both ends are owned by the class not the association (though the absence of dots at the line ends would imply otherwise - the example should be redrawn).
    Several extra properties are implied by the diagram and have to be implicitly created by the tool. These are marked !! below.

    Person::company: Company[1..*] association=Job
    !!Person::job: Job[1..*] // This then allows access to the properties of Job such as Salary. Note that Person::job.association isEmpty

    Company::person: Person[*] association=Job
    !!Company::job: Job[*]

    Job::salary: Integer[1]
    !!Job::person: Person[1]
    !!Job::company: Company[1]
    Job.memberEnd=(Person::company, Company::person)
    Job.ownedEnd->isEmpty=true

    There needs to be a discussion and clear rules for the invented names for the new properties and constraints to avoid clashes. Also need to address issues related to unions/subsets/redefines/navigability and their effect on the implicit properties.

    Also there is a complication if the Association class itself has further associations: how in the metamodel are these Properties on t he AssociationClass distinguished from the 'main' Ends representing the line to which the AC is attached.

  • Reported: UML 2.0 — Thu, 23 Feb 2006 05:00 GMT
  • Disposition: Resolved — UML 2.2
  • Disposition Summary:

    For explanations, see "Changes from previous UML" below. The OCL in this resolution is written according to OCL 2.1 ptc-09-05-02. Where the changes in the revised text pertain to metaclasses in the superstructure merged from InfrastructureLibrary::Core::Constructs which is the resulting package of merging several package increments from InfrastructureLibrary::Core::Abstractions as specified in clause 11.2 of the UML 2.2 Infrastructure, then the revisions described below have to be similarly reflected in InfrastructureLibrary::Core::Constructs (i.e. the resulting metaclass) and in the metaclass increments merged from the sub-packages of InfrastructureLibrary::Core::Abstractions.
    The revised text clarifies that owned ends of an association class, as an association, are disjoint from owned attributes of that same association class.. Navigability for association classes is the same as associations. Navigation from instances of association classes to their end objects, and any other unaddressed aspects of the issue, will be refiled as a separate issue.
    This resolution includes an OCL constraint which depends on the OCL 2.1 revision:
    context AssociationClass
    self.A_general_classifier::classifier
    ->forAll(oclIsKindOf(AssociationClass))
    The meaning of this constraint is as follows:
    self.A_general_classifier::classifier
    This expression navigates the association A_general_classifier in the inverse direction of the navigability of the property /Classifier::general : Classifier[*].
    That is, it provides the set of classifiers that specialize 'self'.
    See 7.5.3 (Properties: AssociationEnds and Navigability), p. 18-19 in OCL 2.1 http://www.omg.org/cgi-bin/doc?ptc/09-05-02

  • Updated: Fri, 6 Mar 2015 20:58 GMT