Table of Contents

Interface IProperty

Namespace
NMF.Interop.Legacy.Cmof
Assembly
NMF.UMLInterop.dll

The public interface for Property

[DefaultImplementationType(typeof(Property))]
[XmlDefaultImplementationType(typeof(Property))]
[ModelRepresentationClass("http://schema.omg.org/spec/MOF/2.0/cmof.xml#//Property")]
public interface IProperty : IStructuralFeature, ITypedElement, IMultiplicityElement, IFeature, IRedefinableElement, INamedElement, IElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inherited Members

Properties

Association

References the association of which this property is a member, if any.

[XmlElementName("association")]
[XmlAttribute(true)]
[XmlOpposite("memberEnd")]
IAssociation Association { get; set; }

Property Value

IAssociation

Class

The class that owns the property, and of which the property is an attribute.

[Browsable(false)]
[XmlElementName("class")]
[XmlAttribute(true)]
[XmlOpposite("ownedAttribute")]
IClass Class { get; set; }

Property Value

IClass

Datatype

The DataType that owns this Operation. Subsets NamedElement::namespace, Feature::featuringClassifier, and RedefinableElement::redefinitionContext.

[Browsable(false)]
[XmlElementName("datatype")]
[XmlAttribute(true)]
[XmlOpposite("ownedAttribute")]
IDataType Datatype { get; set; }

Property Value

IDataType

Default

Specifies a String that represents a value to be used when no argument is supplied for the Property. A string that is evaluated to give a default value for the attribute when an object of the owning class is instantiated.

[XmlElementName("default")]
[XmlAttribute(true)]
string Default { get; set; }

Property Value

string

IsComposite

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.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isComposite")]
[XmlAttribute(true)]
bool IsComposite { get; set; }

Property Value

bool

IsDerived

If isDerived is true, the value of the attribute is derived from information elsewhere. The default value is false.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isDerived")]
[XmlAttribute(true)]
bool IsDerived { get; set; }

Property Value

bool

IsDerivedUnion

Specifies whether the property is derived as the union of all of the properties that are constrained to subset it. The default value is false.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isDerivedUnion")]
[XmlAttribute(true)]
bool IsDerivedUnion { get; set; }

Property Value

bool

IsID

The isID property

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isID")]
[XmlAttribute(true)]
bool IsID { get; set; }

Property Value

bool

IsReadOnly

This redefines the corresponding attribute in Basic::Property and Abstractions::StructuralFeature. The default value is false. If isReadOnly is true, the attribute may not be written to after initialization. The default value is false.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isReadOnly")]
[XmlAttribute(true)]
bool IsReadOnly { get; set; }

Property Value

bool

OwningAssociation

References the owning association of this property, if any. Subsets Property::association, NamedElement::namespace, and Feature::featuringClassifier.

[Browsable(false)]
[XmlElementName("owningAssociation")]
[XmlAttribute(true)]
[XmlOpposite("ownedEnd")]
IAssociation OwningAssociation { get; set; }

Property Value

IAssociation

RedefinedProperty

References the properties that are redefined by this property. Subsets RedefinableElement::redefinedElement.

[XmlElementName("redefinedProperty")]
[XmlAttribute(true)]
ISetExpression<IProperty> RedefinedProperty { get; }

Property Value

ISetExpression<IProperty>

SubsettedProperty

References the properties of which this property is constrained to be a subset.

[XmlElementName("subsettedProperty")]
[XmlAttribute(true)]
ISetExpression<IProperty> SubsettedProperty { get; }

Property Value

ISetExpression<IProperty>

Methods

Derived_union_is_derived(object, object)

A derived union is derived. isDerivedUnion implies isDerived

bool Derived_union_is_derived(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool

GetOpposite()

If this property is owned by a class, associated with a binary association, and the other end of the association is also owned by a class, then opposite gives the other end. result = if owningAssociation->notEmpty() and association.memberEnd->size() = 2 then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->notEmpty then otherEnd else Set{} endif else Set {} endif

IProperty GetOpposite()

Returns

IProperty

IsNavigable()

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

bool IsNavigable()

Returns

bool

Multiplicity_of_composite(object, object)

A multiplicity of a composite aggregation must not have an upper bound greater than 1. isComposite implies (upperBound()->isEmpty() or upperBound() <= 1)

bool Multiplicity_of_composite(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool

Navigable_property_redefinition(object, object)

A navigable property can only be redefined or subsetted by a navigable property. (self.subsettedProperty->exists(sp | sp.isNavigable()) implies self.isNavigable()) and (self.redefinedProperty->exists(rp | rp.isNavigable()) implies self.isNavigable())

bool Navigable_property_redefinition(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool

Navigable_readonly(object, object)

Only a navigable property can be marked as readOnly. isReadOnly implies isNavigable()

bool Navigable_readonly(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool

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

ISetExpression<IClassifier> SubsettingContext()

Returns

ISetExpression<IClassifier>

Subsetting_context(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)))))

bool Subsetting_context(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool

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() ))

bool Subsetting_rules(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool