Support qualifiers on association ends. #434

Closed
pietermartin opened this Issue Mar 27, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@pietermartin

Qualifiers are indispensible in modelling accurate class diagrams.

@mbats mbats added the Class diagram label Mar 31, 2014

@mbats mbats added this to the 4.0.0 milestone Mar 31, 2014

@mbats

This comment has been minimized.

Show comment
Hide comment
@mbats

mbats Apr 1, 2014

Member

Could you give me the link to the UML Specification that explains what you mean by qualifiers?

Member

mbats commented Apr 1, 2014

Could you give me the link to the UML Specification that explains what you mean by qualifiers?

@mbats mbats removed this from the 4.0.0 milestone Apr 1, 2014

@pietermartin

This comment has been minimized.

Show comment
Hide comment
@pietermartin

pietermartin Apr 3, 2014

Hi,

The best description I have found is in the UML spec 2.4.1 under the section 7.3.45 Property (from Kernel, AssociationClasses, Interfaces) ... Package AssociationClasses,

Package AssociationClasses
A qualifier declares a partition of the set of associated instances with respect to an instance at the qualified end (the
qualified instance is at the end to which the qualifier is attached). A qualifier instance comprises one value for each
qualifier attribute. Given a qualified object and a qualifier instance, the number of objects at the other end of the
association is constrained by the declared multiplicity. In the common case in which the multiplicity is 0..1, the qualifier
value is unique with respect to the qualified object, and designates at most one associated object. In the general case of
multiplicity 0.., the set of associated instances is partitioned into subsets, each selected by a given qualifier instance. In
the case of multiplicity 1 or 0..1, the qualifier has both semantic and implementation consequences. In the case of
multiplicity 0..
, it has no real semantic consequences but suggests an implementation that facilitates easy access of sets
of associated instances linked by a given qualifier value.
Note – The multiplicity of a qualifier is given assuming that the qualifier value is supplied. The “raw” multiplicity without the
qualifier is assumed to be 0..*. This is not fully general but it is almost always adequate, as a situation in which the raw
multiplicity is 1 would best be modeled without a qualifier.
Note – A qualified multiplicity whose lower bound is zero indicates that a given qualifier value may be absent, while a lower
bound of 1 indicates that any possible qualifier value must be present. The latter is reasonable only for qualifiers with a finite
number of values (such as enumerated values or integer ranges) that represent full tables indexed by some finite range of
values.

In the UML2.5 spec I found it under 11.5.3 Semantics...

Thanks
Pieter

Hi,

The best description I have found is in the UML spec 2.4.1 under the section 7.3.45 Property (from Kernel, AssociationClasses, Interfaces) ... Package AssociationClasses,

Package AssociationClasses
A qualifier declares a partition of the set of associated instances with respect to an instance at the qualified end (the
qualified instance is at the end to which the qualifier is attached). A qualifier instance comprises one value for each
qualifier attribute. Given a qualified object and a qualifier instance, the number of objects at the other end of the
association is constrained by the declared multiplicity. In the common case in which the multiplicity is 0..1, the qualifier
value is unique with respect to the qualified object, and designates at most one associated object. In the general case of
multiplicity 0.., the set of associated instances is partitioned into subsets, each selected by a given qualifier instance. In
the case of multiplicity 1 or 0..1, the qualifier has both semantic and implementation consequences. In the case of
multiplicity 0..
, it has no real semantic consequences but suggests an implementation that facilitates easy access of sets
of associated instances linked by a given qualifier value.
Note – The multiplicity of a qualifier is given assuming that the qualifier value is supplied. The “raw” multiplicity without the
qualifier is assumed to be 0..*. This is not fully general but it is almost always adequate, as a situation in which the raw
multiplicity is 1 would best be modeled without a qualifier.
Note – A qualified multiplicity whose lower bound is zero indicates that a given qualifier value may be absent, while a lower
bound of 1 indicates that any possible qualifier value must be present. The latter is reasonable only for qualifiers with a finite
number of values (such as enumerated values or integer ranges) that represent full tables indexed by some finite range of
values.

In the UML2.5 spec I found it under 11.5.3 Semantics...

Thanks
Pieter

@mbats mbats added this to the 4.1.0 milestone May 7, 2014

@mbats mbats modified the milestones: 4.0.0, 4.1.0 Jun 11, 2014

@mbats

This comment has been minimized.

Show comment
Hide comment
@mbats

mbats Feb 16, 2015

Member

See spec UML 2.5:

  • page 168 A_qualifier_associationEnd [Association]
  • 11.5.3 Semantis: "A qualified Association end has qualifiers that partition the instances associated with an instance at that end, the qualified instance. Each partition is designated by a qualifier value, which is a tuple comprising one value for each qualifier . The multiplicities at the other ends of the association determine the number of instances in each partition. So, for example, 0..1 means there is at most one instance per qualifier value. If the lower bounds are non-zero, the qualifier values must be a finite set, for example because the qualifiers are typed by enumerations."
  • 11.5.4 Notation: "A qualifier is shown as a small rectangle attached to the end of an association path between the final path segment and the symbol of the Classifier that it connects to. The qualifier rectangle should be smaller than the attached class rectangle, unless this is not practical. The qualifier rectangle is part of the association path, not part of the Classifier. The qualifier rectangle is attached to the end of the association path that represents the memberEnd that owns the qualifier.
    The multiplicity attached to the target end denotes the possible cardinalities of the set of target instances selected by the pairing of a qualified instance and a qualifier value.
    The qualifier attributes are drawn within the qualifier box. There may be one or more attributes, shown one to a line. Qualifier attributes have the same notation as Classifier attributes, except that initial value expressions are not meaningful. It is permissible (although somewhat rare), to have a qualifier on every end of a single association.
    A qualifier may not be suppressed."
  • 11.5.5 Examples: Figure 11.37
Member

mbats commented Feb 16, 2015

See spec UML 2.5:

  • page 168 A_qualifier_associationEnd [Association]
  • 11.5.3 Semantis: "A qualified Association end has qualifiers that partition the instances associated with an instance at that end, the qualified instance. Each partition is designated by a qualifier value, which is a tuple comprising one value for each qualifier . The multiplicities at the other ends of the association determine the number of instances in each partition. So, for example, 0..1 means there is at most one instance per qualifier value. If the lower bounds are non-zero, the qualifier values must be a finite set, for example because the qualifiers are typed by enumerations."
  • 11.5.4 Notation: "A qualifier is shown as a small rectangle attached to the end of an association path between the final path segment and the symbol of the Classifier that it connects to. The qualifier rectangle should be smaller than the attached class rectangle, unless this is not practical. The qualifier rectangle is part of the association path, not part of the Classifier. The qualifier rectangle is attached to the end of the association path that represents the memberEnd that owns the qualifier.
    The multiplicity attached to the target end denotes the possible cardinalities of the set of target instances selected by the pairing of a qualified instance and a qualifier value.
    The qualifier attributes are drawn within the qualifier box. There may be one or more attributes, shown one to a line. Qualifier attributes have the same notation as Classifier attributes, except that initial value expressions are not meaningful. It is permissible (although somewhat rare), to have a qualifier on every end of a single association.
    A qualifier may not be suppressed."
  • 11.5.5 Examples: Figure 11.37

@mbats mbats modified the milestones: 5.0.0, 5.1.0 Apr 2, 2015

@mbats mbats modified the milestones: 5.1.0, 6.0.0 Oct 2, 2015

@mbats mbats modified the milestones: 6.0.0, 6.1.0 Oct 19, 2015

fbats added a commit to fbats/UML-Designer that referenced this issue Feb 17, 2016

fbats added a commit to fbats/UML-Designer that referenced this issue Feb 22, 2016

Fix #434 Association qualifiers
- create new mapping for qualifier
- create a creation tool for qualifier
- direct edit qualifier
- EEF view for qualifier
- documentation

@mbats mbats closed this in b434537 Mar 7, 2016

@pietermartin

This comment has been minimized.

Show comment
Hide comment
@pietermartin

pietermartin Mar 7, 2016

Great stuff, I'll download and have a look. Thanks

Great stuff, I'll download and have a look. Thanks

fbats added a commit to fbats/UML-Designer that referenced this issue Jul 12, 2016

Fix #434 Association qualifiers
- create new mapping for qualifier
- create a creation tool for qualifier
- direct edit qualifier
- EEF view for qualifier
- documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment