Previous | Table of Contents | Next |
Description
A property is a typed element that represents an attribute of a class.
Generalizations
• “TypedElement? on page 92
• “TypedElement? on page 92 - MultiplicityElement.
Attributes
• class : Class [0..1] The class that owns the property, and of which the property is an attribute.
• default : String [0..1] A string that is evaluated to give a default value for the attribute when an object of the owning class is instantiated.
• isComposite : Boolean If isComposite is true, the object containing the attribute is a container for the object or value contained in the attribute. The default value is false.
• isDerived : Boolean If isDerived is true, the value of the attribute is derived from information elsewhere. The default value is false.
• isReadOnly : Boolean If isReadOnly is true, the attribute may not be written to after initialization. The default value is false.
• opposite : Property [0..1] Two attributes attr1 and attr2 of two objects o1 and o2 (which may be the same object) may be
paired with each other so that o1.attr1 refers to o2 if and only if o2.attr2 refers to o1. In such a case attr1 is the opposite
of attr2 and attr2 is the opposite of attr1.
Semantics
A property represents an attribute of a class. A property has a type and a multiplicity. When a property is paired with an
opposite they represent two mutually constrained attributes. The semantics of two properties that are mutual opposites are
the same as for bidirectionally navigable associations in Constructs, with the exception that the association has no explicit
links as instances, and has no name.
Notation
When a Basic::Property has no opposite, its notation is the same for Constructs::Property when used as an attribute with the
omission of those aspects of the notation that cannot be represented by the Basic model. Normally if the type of the property
is a data type, the attribute is shown within the attribute compartment of the class box, and if the type of the property
is a class, it is shown using the association-like arrow notation.
When a property has an opposite, the pair of attributes are shown using the same notation as for a Constructs::Association
with two navigable ends, with the omission of those aspects of the notation that cannot be represented by the Basic model.