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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe 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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe 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
featurestringThe 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
attributestringThe 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
referencestringThe 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
elementIModelElementThe 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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
OnAggregationChanged(ValueChangedEventArgs)
Raises the AggregationChanged event
protected virtual void OnAggregationChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnAggregationChanging(ValueChangedEventArgs)
Raises the AggregationChanging event
protected virtual void OnAggregationChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnClassChanged(ValueChangedEventArgs)
Raises the ClassChanged event
protected virtual void OnClassChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnClassChanging(ValueChangedEventArgs)
Raises the ClassChanging event
protected virtual void OnClassChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnDatatypeChanged(ValueChangedEventArgs)
Raises the DatatypeChanged event
protected virtual void OnDatatypeChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnDatatypeChanging(ValueChangedEventArgs)
Raises the DatatypeChanging event
protected virtual void OnDatatypeChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnDefaultValueChanged(ValueChangedEventArgs)
Raises the DefaultValueChanged event
protected virtual void OnDefaultValueChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnDefaultValueChanging(ValueChangedEventArgs)
Raises the DefaultValueChanging event
protected virtual void OnDefaultValueChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnDerived_union_is_derivedCalled(OperationCallEventArgs)
Raises the Derived_union_is_derivedCalled event
protected virtual void OnDerived_union_is_derivedCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnDerived_union_is_derivedCalling(OperationCallEventArgs)
Raises the Derived_union_is_derivedCalling event
protected virtual void OnDerived_union_is_derivedCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnDerived_union_is_read_onlyCalled(OperationCallEventArgs)
Raises the Derived_union_is_read_onlyCalled event
protected virtual void OnDerived_union_is_read_onlyCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnDerived_union_is_read_onlyCalling(OperationCallEventArgs)
Raises the Derived_union_is_read_onlyCalling event
protected virtual void OnDerived_union_is_read_onlyCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnIsAttributeCalled(OperationCallEventArgs)
Raises the IsAttributeCalled event
protected virtual void OnIsAttributeCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnIsAttributeCalling(OperationCallEventArgs)
Raises the IsAttributeCalling event
protected virtual void OnIsAttributeCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnIsDerivedChanged(ValueChangedEventArgs)
Raises the IsDerivedChanged event
protected virtual void OnIsDerivedChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnIsDerivedChanging(ValueChangedEventArgs)
Raises the IsDerivedChanging event
protected virtual void OnIsDerivedChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnIsDerivedUnionChanged(ValueChangedEventArgs)
Raises the IsDerivedUnionChanged event
protected virtual void OnIsDerivedUnionChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnIsDerivedUnionChanging(ValueChangedEventArgs)
Raises the IsDerivedUnionChanging event
protected virtual void OnIsDerivedUnionChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnIsIDChanged(ValueChangedEventArgs)
Raises the IsIDChanged event
protected virtual void OnIsIDChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnIsIDChanging(ValueChangedEventArgs)
Raises the IsIDChanging event
protected virtual void OnIsIDChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnIsNavigableCalled(OperationCallEventArgs)
Raises the IsNavigableCalled event
protected virtual void OnIsNavigableCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnIsNavigableCalling(OperationCallEventArgs)
Raises the IsNavigableCalling event
protected virtual void OnIsNavigableCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnMultiplicity_of_compositeCalled(OperationCallEventArgs)
Raises the Multiplicity_of_compositeCalled event
protected virtual void OnMultiplicity_of_compositeCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnMultiplicity_of_compositeCalling(OperationCallEventArgs)
Raises the Multiplicity_of_compositeCalling event
protected virtual void OnMultiplicity_of_compositeCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnOwningAssociationChanged(ValueChangedEventArgs)
Raises the OwningAssociationChanged event
protected virtual void OnOwningAssociationChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnOwningAssociationChanging(ValueChangedEventArgs)
Raises the OwningAssociationChanging event
protected virtual void OnOwningAssociationChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgsValueChangedEventArgsThe event data
OnRedefined_property_inheritedCalled(OperationCallEventArgs)
Raises the Redefined_property_inheritedCalled event
protected virtual void OnRedefined_property_inheritedCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnRedefined_property_inheritedCalling(OperationCallEventArgs)
Raises the Redefined_property_inheritedCalling event
protected virtual void OnRedefined_property_inheritedCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSubsetted_property_namesCalled(OperationCallEventArgs)
Raises the Subsetted_property_namesCalled event
protected virtual void OnSubsetted_property_namesCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSubsetted_property_namesCalling(OperationCallEventArgs)
Raises the Subsetted_property_namesCalling event
protected virtual void OnSubsetted_property_namesCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSubsettingContextCalled(OperationCallEventArgs)
Raises the SubsettingContextCalled event
protected virtual void OnSubsettingContextCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSubsettingContextCalling(OperationCallEventArgs)
Raises the SubsettingContextCalling event
protected virtual void OnSubsettingContextCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSubsetting_context_conformsCalled(OperationCallEventArgs)
Raises the Subsetting_context_conformsCalled event
protected virtual void OnSubsetting_context_conformsCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSubsetting_context_conformsCalling(OperationCallEventArgs)
Raises the Subsetting_context_conformsCalling event
protected virtual void OnSubsetting_context_conformsCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSubsetting_rulesCalled(OperationCallEventArgs)
Raises the Subsetting_rulesCalled event
protected virtual void OnSubsetting_rulesCalled(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
OnSubsetting_rulesCalling(OperationCallEventArgs)
Raises the Subsetting_rulesCalling event
protected virtual void OnSubsetting_rulesCalling(OperationCallEventArgs eventArgs)
Parameters
eventArgsOperationCallEventArgsThe event data
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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe 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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe 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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe 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
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
Events
AggregationChanged
Gets fired when the Aggregation property changed its value
public event EventHandler<ValueChangedEventArgs> AggregationChanged
Event Type
AggregationChanging
Gets fired before the Aggregation property changes its value
public event EventHandler<ValueChangedEventArgs> AggregationChanging
Event Type
ClassChanged
Gets fired when the Class property changed its value
public event EventHandler<ValueChangedEventArgs> ClassChanged
Event Type
ClassChanging
Gets fired before the Class property changes its value
public event EventHandler<ValueChangedEventArgs> ClassChanging
Event Type
DatatypeChanged
Gets fired when the Datatype property changed its value
public event EventHandler<ValueChangedEventArgs> DatatypeChanged
Event Type
DatatypeChanging
Gets fired before the Datatype property changes its value
public event EventHandler<ValueChangedEventArgs> DatatypeChanging
Event Type
DefaultValueChanged
Gets fired when the DefaultValue property changed its value
public event EventHandler<ValueChangedEventArgs> DefaultValueChanged
Event Type
DefaultValueChanging
Gets fired before the DefaultValue property changes its value
public event EventHandler<ValueChangedEventArgs> DefaultValueChanging
Event Type
Derived_union_is_derivedCalled
Gets fired after the operation derived_union_is_derived got called
public event EventHandler<OperationCallEventArgs> Derived_union_is_derivedCalled
Event Type
Derived_union_is_derivedCalling
Gets fired before the operation derived_union_is_derived gets called
public event EventHandler<OperationCallEventArgs> Derived_union_is_derivedCalling
Event Type
Derived_union_is_read_onlyCalled
Gets fired after the operation derived_union_is_read_only got called
public event EventHandler<OperationCallEventArgs> Derived_union_is_read_onlyCalled
Event Type
Derived_union_is_read_onlyCalling
Gets fired before the operation derived_union_is_read_only gets called
public event EventHandler<OperationCallEventArgs> Derived_union_is_read_onlyCalling
Event Type
IsAttributeCalled
Gets fired after the operation isAttribute got called
public event EventHandler<OperationCallEventArgs> IsAttributeCalled
Event Type
IsAttributeCalling
Gets fired before the operation isAttribute gets called
public event EventHandler<OperationCallEventArgs> IsAttributeCalling
Event Type
IsDerivedChanged
Gets fired when the IsDerived property changed its value
public event EventHandler<ValueChangedEventArgs> IsDerivedChanged
Event Type
IsDerivedChanging
Gets fired before the IsDerived property changes its value
public event EventHandler<ValueChangedEventArgs> IsDerivedChanging
Event Type
IsDerivedUnionChanged
Gets fired when the IsDerivedUnion property changed its value
public event EventHandler<ValueChangedEventArgs> IsDerivedUnionChanged
Event Type
IsDerivedUnionChanging
Gets fired before the IsDerivedUnion property changes its value
public event EventHandler<ValueChangedEventArgs> IsDerivedUnionChanging
Event Type
IsIDChanged
Gets fired when the IsID property changed its value
public event EventHandler<ValueChangedEventArgs> IsIDChanged
Event Type
IsIDChanging
Gets fired before the IsID property changes its value
public event EventHandler<ValueChangedEventArgs> IsIDChanging
Event Type
IsNavigableCalled
Gets fired after the operation isNavigable got called
public event EventHandler<OperationCallEventArgs> IsNavigableCalled
Event Type
IsNavigableCalling
Gets fired before the operation isNavigable gets called
public event EventHandler<OperationCallEventArgs> IsNavigableCalling
Event Type
Multiplicity_of_compositeCalled
Gets fired after the operation multiplicity_of_composite got called
public event EventHandler<OperationCallEventArgs> Multiplicity_of_compositeCalled
Event Type
Multiplicity_of_compositeCalling
Gets fired before the operation multiplicity_of_composite gets called
public event EventHandler<OperationCallEventArgs> Multiplicity_of_compositeCalling
Event Type
OwningAssociationChanged
Gets fired when the OwningAssociation property changed its value
public event EventHandler<ValueChangedEventArgs> OwningAssociationChanged
Event Type
OwningAssociationChanging
Gets fired before the OwningAssociation property changes its value
public event EventHandler<ValueChangedEventArgs> OwningAssociationChanging
Event Type
Redefined_property_inheritedCalled
Gets fired after the operation redefined_property_inherited got called
public event EventHandler<OperationCallEventArgs> Redefined_property_inheritedCalled
Event Type
Redefined_property_inheritedCalling
Gets fired before the operation redefined_property_inherited gets called
public event EventHandler<OperationCallEventArgs> Redefined_property_inheritedCalling
Event Type
Subsetted_property_namesCalled
Gets fired after the operation subsetted_property_names got called
public event EventHandler<OperationCallEventArgs> Subsetted_property_namesCalled
Event Type
Subsetted_property_namesCalling
Gets fired before the operation subsetted_property_names gets called
public event EventHandler<OperationCallEventArgs> Subsetted_property_namesCalling
Event Type
SubsettingContextCalled
Gets fired after the operation subsettingContext got called
public event EventHandler<OperationCallEventArgs> SubsettingContextCalled
Event Type
SubsettingContextCalling
Gets fired before the operation subsettingContext gets called
public event EventHandler<OperationCallEventArgs> SubsettingContextCalling
Event Type
Subsetting_context_conformsCalled
Gets fired after the operation subsetting_context_conforms got called
public event EventHandler<OperationCallEventArgs> Subsetting_context_conformsCalled
Event Type
Subsetting_context_conformsCalling
Gets fired before the operation subsetting_context_conforms gets called
public event EventHandler<OperationCallEventArgs> Subsetting_context_conformsCalling
Event Type
Subsetting_rulesCalled
Gets fired after the operation subsetting_rules got called
public event EventHandler<OperationCallEventArgs> Subsetting_rulesCalled
Event Type
Subsetting_rulesCalling
Gets fired before the operation subsetting_rules gets called
public event EventHandler<OperationCallEventArgs> Subsetting_rulesCalling