UML Designer User's Guide
To edit the properties of a relationship, double-click on the connector
figure or select Focus from its pop-up menu. This opens a
window from which you can edit the properties of the relationship represented
by the connector figure. Note that these properties apply to the
relationship model, rather than to the connector figure (although some of them
might affect the visual appearance of the figure).
The relationship properties window has three pages: one for general
properties, and one for each role (direction) of the relationship.
Depending upon the type of relationship, some of the options might not be
available.
For associations, you can use the properties window to specify
constraints on the relationship. A constraint is a specific
rule that restrains the allowed behavior of the relationship, such as
cardinality (multiplicity). Constraints should be observed in your
implementation.
The following settings are available on the Main page of the
relationship properties window:
- Link Name
- The name of the relationship for the indicated direction. (The name
you specify appears only if the Name label is displayed.)
- Text
- The text for the relationship in the indicated direction. This text
will appear in any publications that include the relationship.
The following settings are available on each Role page of the
relationship properties window:
- Id
- Specifies a unique internal identifier for the role.
- Role Name
- Specifies the role name that will appear on the diagram if role name
labels are displayed.
- Stereotype
- Specifies any user-defined stereotype that applies to the
relationship. You can select any available stereotype from the
drop-down list. To define a new stereotype, add a Stereotype element to
the model; you will then need to close and reopen the relationship
settings in order to see the new stereotype.
- UML Stereotype
- Specifies the UML-defined stereotype that applies to the
relationship. You can select from a list of four UML-defined
stereotypes.
- Is Unique
- Specifies whether each instance of this relationship must be uniquely
identifiable.
- Is Immutable
- Specifies whether an instance of this relationship can be altered once it
is created.
- Composition
- Indicates whether the relationship represents an aggregation or
composition association. Aggregation is indicated on the connector
figure by an open diamond; composition is indicated by a solid
diamond.
Aggregation indicates that the aggregated element is a child of
the aggregating element. Composition is a stronger form of
aggregation, indicating that the child element is an inherent part of the
composing element and cannot be meaningfully separated.
- Min/Max
- Specifies the multiplicity for this end of the association. (This
is the same as selecting Multiplicity>Edit From or
Multiplicity>Edit To from the pop-up menu of the connector
figure.
Multiplicity is defined in termed of a minimum cardinality and a maximum
cardinality. The minimum cardinality (0-n) defines the
minimum number of instances required; the maximum cardinality
(0-n or * for many) defines the maximum number of instances
allowed.
- Ordering
- Specifies whether the set of instances of a relationship are considered
ordered or sorted:
- Ordered: The instances are ordered in the sequence in
which they are added.
- Sorted: The instances are ordered according to some kind
of sorting (such as alphabetically).
- Unspecified: The ordering of the instances is not
specified.
- Cycles
- Specifies whether cyclic references are allowed using this
relationship:
- No Cycles: Cyclic references are not allowed. If
element A references element B, element B may not reference element A.
- Indirect: Indirect cycles are allowed, but direct cycles
are not. In other words, if element A references element B, B may not
reference A; however, B may reference another element that references
A.
- No Check: Both direct and indirect cycles are
allowed.
- Delete Check
- Specifies whether this relationship has deletion constraints:
- Cascade: If the source is deleted, the destination should
also be deleted.
- Control: The destination may not be deleted as long as
the source refers to it.
- No Check: No deletion constraints apply.
- Implementation
- Specifies properties that do not affect the semantics of the relationship
but do affect your implementation:
-
Is By Reference: The relationship is implemented by value
rather than by reference (for example, by holding a collection of values or
keys).
-
Is Navigable: The relationship can be traversed in the
direction of the role. That is, given an instance of the source
element, it is possible to obtain an instance of the destination element
through some implementation of the relationship (this can be either physical,
such as a collection or database table, or derived).
-
Is Derived: The relationship is computed indirectly from
other relationships or attributes. A derived association is indicated
on a diagram by a backslash (\) in front of its name label.
- Attributes
-
Opens a window from which you can specify any constrained attributes
(qualifiers) for this end of the association. You can select any
attribute defined in the class or in any protocol it conforms to; you can
also create new attributes from this window. Qualifications appear in a
box at the end of the connector figure, if the option is selected to display
qualified attributes.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]