Class Property
A property is a structural feature of a classifier that characterizes instances of the classifier. 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 class to a value or set of values of the type of the attribute. A property related by memberEnd or its specializations to an association represents an end of the association. The type of the property is the type of the end of the association.
[XmlNamespace("http://www.omg.org/spec/MOF/20131001/cmof.xmi")]
[XmlNamespacePrefix("cmof")]
[ModelRepresentationClass("http://www.omg.org/spec/MOF/20131001/cmof.xmi#//Property")]
public class Property : StructuralFeature, IProperty, IStructuralFeature, ITypedElement, IMultiplicityElement, IFeature, IRedefinableElement, INamedElement, IElement, IObject, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Property
- Implements
- Inherited Members
Constructors
Property()
Creates a new instance
public Property()
Properties
Aggregation
Specifies the kind of aggregation that applies to the Property.
[XmlElementName("aggregation")]
[XmlAttribute(true)]
public AggregationKind Aggregation { get; set; }
Property Value
Children
Gets the child model elements of this model element
public override IEnumerableExpression<IModelElement> Children { get; }
Property Value
Class
References the Class that owns the Property. References the Class that owns the Property.
[Browsable(false)]
[XmlElementName("class")]
[XmlAttribute(true)]
[XmlOpposite("ownedAttribute")]
public IClass Class { get; set; }
Property Value
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
Datatype
The DataType that owns this Property.
[Browsable(false)]
[XmlElementName("datatype")]
[XmlAttribute(true)]
[XmlOpposite("ownedAttribute")]
public IDataType Datatype { get; set; }
Property Value
DefaultValue
A ValueSpecification that is evaluated to give a default value for the Property when an object of the owning Classifier is instantiated.
[Browsable(false)]
[XmlElementName("defaultValue")]
[XmlAttribute(false)]
[Containment]
public IValueSpecification DefaultValue { get; set; }
Property Value
IsDerived
If isDerived is true, the value of the attribute is derived from information elsewhere. Specifies whether the Property is derived, i.e., whether its value or values can be computed from other information.
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isDerived")]
[XmlAttribute(true)]
public bool IsDerived { get; set; }
Property Value
IsDerivedUnion
Specifies whether the property is derived as the union of all of the properties that are constrained to subset it.
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isDerivedUnion")]
[XmlAttribute(true)]
public bool IsDerivedUnion { get; set; }
Property Value
IsID
True indicates this property can be used to uniquely identify an instance of the containing Class.
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isID")]
[XmlAttribute(true)]
public bool IsID { get; set; }
Property Value
OwningAssociation
References the owning association of this property, if any.
[XmlElementName("owningAssociation")]
[XmlAttribute(true)]
[XmlOpposite("ownedEnd")]
public IAssociation OwningAssociation { get; set; }
Property Value
RedefinedProperty
References the properties that are redefined by this property.
[XmlElementName("redefinedProperty")]
[XmlAttribute(true)]
public ISetExpression<IProperty> RedefinedProperty { get; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
SubsettedProperty
References the properties of which this property is constrained to be a subset.
[XmlElementName("subsettedProperty")]
[XmlAttribute(true)]
public ISetExpression<IProperty> SubsettedProperty { get; }
Property Value
Methods
Derived_union_is_derived(object, object)
A derived union is derived. isDerivedUnion implies isDerived
public bool Derived_union_is_derived(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Derived_union_is_read_only(object, object)
A derived union is read only. isDerivedUnion implies isReadOnly
public bool Derived_union_is_read_only(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
GetAttributeValue(string, int)
Resolves the given attribute name
protected override object GetAttributeValue(string attribute, int index)
Parameters
Returns
- object
The attribute value or null if it could not be found
GetClass()
Gets the Class for this model element
public override IClass GetClass()
Returns
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
feature
stringThe requested feature
Returns
- IList
A non-generic list of elements
GetExpressionForAttribute(string)
Gets the property expression for the given attribute
protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)
Parameters
attribute
stringThe requested attribute in upper case
Returns
- INotifyExpression<object>
An incremental property expression
GetExpressionForReference(string)
Gets the property expression for the given reference
protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)
Parameters
reference
stringThe requested reference in upper case
Returns
- INotifyExpression<IModelElement>
An incremental property expression
GetModelElementForReference(string, int)
Resolves the given URI to a child model element
protected override IModelElement GetModelElementForReference(string reference, int index)
Parameters
Returns
- IModelElement
The model element or null if it could not be found
GetRelativePathForNonIdentifiedChild(IModelElement)
Gets the relative URI fragment for the given child model element
protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)
Parameters
element
IModelElementThe element that should be looked for
Returns
- string
A fragment of the relative URI
IsAttribute(IProperty)
The query isAttribute() is true if the Property is defined as an attribute of some classifier. result = Classifier.allInstances->exists(c | c.attribute->includes(p))
public bool IsAttribute(IProperty p)
Parameters
Returns
IsNavigable()
The query isNavigable() indicates whether it is possible to navigate across the property. result = not classifier->isEmpty() or association.owningAssociation.navigableOwnedEnd->includes(self)
public bool IsNavigable()
Returns
Multiplicity_of_composite(object, object)
A multiplicity of a composite aggregation must not have an upper bound greater than 1. A multiplicity on an aggregate end of a composite aggregation must not have an upper bound greater than 1. isComposite implies (upperBound()->isEmpty() or upperBound() <= 1)
public bool Multiplicity_of_composite(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Redefined_property_inherited(object, object)
A redefined property must be inherited from a more general classifier containing the redefining property. if (redefinedProperty->notEmpty()) then (redefinitionContext->notEmpty() and redefinedProperty->forAll(rp| ((redefinitionContext->collect(fc| fc.allParents()))->asSet())->collect(c| c.allFeatures())->asSet()->includes(rp))
public bool Redefined_property_inherited(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)
Parameters
Subsetted_property_names(object, object)
A property may not subset a property with the same name. true
public bool Subsetted_property_names(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
SubsettingContext()
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. result = if association->notEmpty() then association.endType-type else if classifier->notEmpty() then Set{classifier} else Set{} endif endif
public ISetExpression<IType> SubsettingContext()
Returns
Subsetting_context_conforms(object, object)
Subsetting may only occur when the context of the subsetting property conforms to the context of the subsetted property. self.subsettedProperty->notEmpty() implies (self.subsettingContext()->notEmpty() and self.subsettingContext()->forAll (sc | self.subsettedProperty->forAll(sp | sp.subsettingContext()->exists(c | sc.conformsTo(c)))))
public bool Subsetting_context_conforms(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Subsetting_rules(object, object)
A subsetting property may strengthen the type of the subsetted property, and its upper bound may be less. self.subsettedProperty->forAll(sp | self.type.conformsTo(sp.type) and ((self.upperBound()->notEmpty() and sp.upperBound()->notEmpty()) implies self.upperBound()<=sp.upperBound() ))
public bool Subsetting_rules(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.