Software Disclaimer

Class UML 2.5::Property

Description:

A Property is a StructuralFeature. A Property related by ownedAttribute to a Classifier (other than an association) represents an attribute and might also represent an association end. It relates an instance of the Classifier to a value or set of values of the type of the attribute. A Property related by memberEnd to an Association represents an end of the Association. The type of the Property is the type of the end of the Association. A Property has the capability of being a DeploymentTarget in a Deployment relationship. This enables modeling the deployment to hierarchical nodes that have Properties functioning as internal parts. Property specializes ParameterableElement to specify that a Property can be exposed as a formal template parameter, and provided as an actual parameter in a binding of a template.

Direct Superclasses: ConnectableElement, DeploymentTarget, StructuralFeature

Direct Subclasses: Port, ExtensionEnd

Class Precedence List: Property, ConnectableElement, DeploymentTarget, StructuralFeature, MultiplicityElement, TypedElement, Feature, RedefinableElement, NamedElement, ParameterableElement, Element

Properties:

aggregation : AggregationKind (1 1); -- source Property
association : Association (0 1); -- source Property
associationEnd : Property (0 1); -- source Property
class : Class (0 1); -- source Property
datatype : DataType (0 1); -- source Property
defaultValue : ValueSpecification (0 1); -- source Property
interface : Interface (0 1); -- source Property
isComposite : Boolean (1 1); -- source Property
isDerived : Boolean (1 1); -- source Property
isDerivedUnion : Boolean (1 1); -- source Property
isID : Boolean (1 1); -- source Property
opposite : Property (0 1); -- source Property
owningAssociation : Association (0 1); -- source Property
qualifier : Property (0 *); -- source Property
redefinedProperty : Property (0 *); -- source Property
subsettedProperty : Property (0 *); -- source Property
end : ConnectorEnd (0 *); -- source ConnectableElement
templateParameter : ConnectableElementTemplateParameter (0 1); -- source ConnectableElement
deployedElement : PackageableElement (0 *); -- source DeploymentTarget
deployment : Deployment (0 *); -- source DeploymentTarget
isReadOnly : Boolean (1 1); -- source StructuralFeature
isOrdered : Boolean (1 1); -- source MultiplicityElement
isUnique : Boolean (1 1); -- source MultiplicityElement
lower : Integer (1 1); -- source MultiplicityElement
lowerValue : ValueSpecification (0 1); -- source MultiplicityElement
upper : UnlimitedNatural (1 1); -- source MultiplicityElement
upperValue : ValueSpecification (0 1); -- source MultiplicityElement
type : Type (0 1); -- source TypedElement
featuringClassifier : Classifier (0 1); -- source Feature
isStatic : Boolean (1 1); -- source Feature
isLeaf : Boolean (1 1); -- source RedefinableElement
redefinedElement : RedefinableElement (0 *); -- source RedefinableElement
redefinitionContext : Classifier (0 *); -- source RedefinableElement
clientDependency : Dependency (0 *); -- source NamedElement
name : String (0 1); -- source NamedElement
nameExpression : StringExpression (0 1); -- source NamedElement
namespace : Namespace (0 1); -- source NamedElement
qualifiedName : String (0 1); -- source NamedElement
visibility : VisibilityKind (0 1); -- source NamedElement
owningTemplateParameter : TemplateParameter (0 1); -- source ParameterableElement
ownedComment : Comment (0 *); -- source Element
ownedElement : Element (0 *); -- source Element
owner : Element (0 1); -- source Element

Constraints:

Signature: CMOF_14_3_27() : Boolean;
Description: 14.3 [27] A Property typed by a kind of DataType must have aggregation = none.
Expression: type.oclIsKindOf(DataType) implies aggregation = AggregationKind::none

Signature: CMOF_14_3_26() : Boolean;
Description: 14.3 [26] A composite subsetting Property with mandatory multiplicity cannot subset another composite Property with mandatory multiplicity.
Expression: isComposite and lowerBound() = 1 implies subsettedProperty->forAll(not (isComposite and lowerBound() = 1))

Signature: CMOF_14_3_25b() : Boolean;
Description: 14.3 [25] For a TypedElement that is a kind of Parameter or Property typed by an PrimitiveType, the defaultValue, if any, must be a kind of LiteralSpecification. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/typed-element-is-primitive-with-non-literal-default
Expression: type.oclIsKindOf(PrimitiveType) and defaultValue->notEmpty() implies defaultValue.oclIsKindOf(LiteralSpecification)

Signature: CMOF_14_3_24b() : Boolean;
Description: 14.3 [24] For a TypedElement that is a kind of Parameter or Property typed by an Enumeration, the defaultValue, if any, must be a kind of InstanceValue. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/typed-element-is-enumeration-with-non-instance-value-default
Expression: type.oclIsKindOf(Enumeration) and defaultValue->notEmpty() implies defaultValue.oclIsKindOf(InstanceValue)

Signature: CMOF_14_3_23b() : Boolean;
Description: 14.3 [23] A TypedElement that is a kind of Parameter or Property typed by a Class cannot have a default value. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/typed-element-is-complex-with-default-value
Expression: type.oclIsKindOf(Class) implies defaultValue->isEmpty()

Signature: CMOF_14_3_16() : Boolean;
Description: 14.3 [16] Property::aggregation must be either 'none' or 'composite' see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/property-has-shared-aggregation
Expression: aggregation = AggregationKind::composite or aggregation = AggregationKind::none

Signature: CMOF_14_3_12d() : Boolean;
Description: 14.3 [12] A multi-valued Property or Parameter cannot have a default value. The default value of a Property or Parameter typed by a PrimitiveType must be a kind of LiteralSpecification. The default value of a Property or Parameter typed by an Enumeration must be a kind of InstanceValue. A Property or Parameter typed by a Class cannot have a default value. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/parameter-has-invalid-default-value see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/property-has-invalid-default-value
Expression: defaultValue->notEmpty() implies (upperBound() <= 1 and ((type.oclIsKindOf(PrimitiveType) and defaultValue.oclIsKindOf(LiteralSpecification)) or (type.oclIsKindOf(Enumeration) and defaultValue.oclIsKindOf(InstanceValue))))

Signature: CMOF_14_3_12c() : Boolean;
Description: 14.3 [12] A multi-valued Property or Parameter cannot have a default value. The default value of a Property or Parameter typed by a PrimitiveType must be a kind of LiteralSpecification. The default value of a Property or Parameter typed by an Enumeration must be a kind of InstanceValue. A Property or Parameter typed by a Class cannot have a default value. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/parameter-has-invalid-default-value see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/property-has-invalid-default-value
Expression: (upperBound() > 1 or type.oclIsKindOf(Class) implies defaultValue->isEmpty())

Signature: CMOF_14_3_10b() : Boolean;
Description: see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/property-has-qualifier
Expression: qualifier->isEmpty()

Operations:

Signature: subsettingContext() : Type;
Description: The query subsettingContext() gives the context for subsetting a Property. It consists, in the case of an attribute, of the corresponding Classifier, and in the case of an association end, all of the Classifiers at the other ends.
Expression: result = (if association <> null then association.memberEnd->excluding(self)->collect(type)->asSet() else if classifier<>null then classifier->asSet() else Set{} endif endif)

Signature: opposite.1() : Property;
Description: If this property is a memberEnd of a binary association, then opposite gives the other end.
Expression: result = (if association <> null and association.memberEnd->size() = 2 then association.memberEnd->any(e | e <> self) else null endif)

Signature: isNavigable() : Boolean;
Description: The query isNavigable() indicates whether it is possible to navigate across the property.
Expression: result = (not classifier->isEmpty() or association.navigableOwnedEnd->includes(self))

Signature: isConsistentWith(redefiningElement : RedefinableElement; ) : Boolean;
Description: The query isConsistentWith() specifies, for any two Properties in a context in which redefinition is possible, whether redefinition would be logically consistent. A redefining Property is consistent with a redefined Property if the type of the redefining Property conforms to the type of the redefined Property, and the multiplicity of the redefining Property (if specified) is contained in the multiplicity of the redefined Property.
Expression: result = (redefiningElement.oclIsKindOf(Property) and let prop : Property = redefiningElement.oclAsType(Property) in (prop.type.conformsTo(self.type) and ((prop.lowerBound()->notEmpty() and self.lowerBound()->notEmpty()) implies prop.lowerBound() >= self.lowerBound()) and ((prop.upperBound()->notEmpty() and self.upperBound()->notEmpty()) implies prop.lowerBound() <= self.lowerBound()) and (self.isComposite implies prop.isComposite)))

Signature: isComposite.1() : Boolean;
Description: The value of isComposite is true only if aggregation is composite.
Expression: result = (aggregation = AggregationKind::composite)

Signature: isCompatibleWith(p : ParameterableElement; ) : Boolean;
Description: The query isCompatibleWith() determines if this Property is compatible with the specified ParameterableElement. This Property is compatible with ParameterableElement p if the kind of this Property is thesame as or a subtype of the kind of p. Further, if p is a TypedElement, then the type of this Property must be conformant with the type of p.
Expression: result = (self.oclIsKindOf(p.oclType()) and (p.oclIsKindOf(TypeElement) implies self.type.conformsTo(p.oclAsType(TypedElement).type)))

Signature: isAttribute() : Boolean;
Description: The query isAttribute() is true if the Property is defined as an attribute of some Classifier.
Expression: result = (not classifier->isEmpty())



Send questions or comments to [email protected].