Table of Contents

Class StructuralFeature

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

A structural feature is a typed feature of a classifier that specifies the structure of instances of the classifier. Structural feature is an abstract metaclass.

[AlternativeNamespace("http://schema.omg.org/spec/mof/2.0/emof.xmi")]
[XmlNamespace("http://schema.omg.org/spec/MOF/2.0/cmof.xml")]
[XmlNamespacePrefix("cmof")]
[ModelRepresentationClass("http://schema.omg.org/spec/MOF/2.0/cmof.xml#//StructuralFeature")]
public abstract class StructuralFeature : Feature, IStructuralFeature, ITypedElement, IMultiplicityElement, IFeature, IRedefinableElement, INamedElement, IElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
StructuralFeature
Implements
Derived
Inherited Members

Properties

Children

Gets the child model elements of this model element

public override IEnumerableExpression<IModelElement> Children { get; }

Property Value

IEnumerableExpression<IModelElement>

ClassInstance

Gets the Class model for this type

public static IClass ClassInstance { get; }

Property Value

IClass

IsOrdered

For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered. Default is false.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isOrdered")]
[XmlAttribute(true)]
public bool IsOrdered { get; set; }

Property Value

bool

IsUnique

For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique. Default is true.

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isUnique")]
[XmlAttribute(true)]
public bool IsUnique { get; set; }

Property Value

bool

Lower

Specifies the lower bound of the multiplicity interval. Default is one.

[XmlElementName("lower")]
[XmlAttribute(true)]
public int? Lower { get; set; }

Property Value

int?

Type

Redefines the corresponding property from Basic to derive this information from the return result for this Operation. The type of the TypedElement.

[XmlElementName("type")]
[XmlAttribute(true)]
public IType Type { get; set; }

Property Value

IType

Upper

Specifies the upper bound of the multiplicity interval. Default is one.

[XmlElementName("upper")]
[XmlAttribute(true)]
public int? Upper { get; set; }

Property Value

int?

Methods

GetAttributeValue(string, int)

Resolves the given attribute name

protected override object GetAttributeValue(string attribute, int index)

Parameters

attribute string

The requested attribute name

index int

The index of this attribute

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

IClass

GetExpressionForAttribute(string)

Gets the property expression for the given attribute

protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)

Parameters

attribute string

The 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 string

The 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

reference string

The requested reference name

index int

The index of this reference

Returns

IModelElement

The model element or null if it could not be found

IncludesCardinality(int)

The query includesCardinality() checks whether the specified cardinality is valid for this multiplicity. upperBound()->notEmpty() and lowerBound()->notEmpty() result = (lowerBound() <= C) and (upperBound() >= C)

public bool IncludesCardinality(int c)

Parameters

c int

Returns

bool

IncludesMultiplicity(IMultiplicityElement)

The query includesMultiplicity() checks whether this multiplicity includes all the cardinalities allowed by the specified multiplicity. self.upperBound()->notEmpty() and self.lowerBound()->notEmpty() and M.upperBound()->notEmpty() and M.lowerBound()->notEmpty() result = (self.lowerBound() <= M.lowerBound()) and (self.upperBound() >= M.upperBound())

public bool IncludesMultiplicity(IMultiplicityElement m)

Parameters

m IMultiplicityElement

Returns

bool

IsMultivalued()

The query isMultivalued() checks whether this multiplicity has an upper bound greater than one. upperBound()->notEmpty() result = upperBound() > 1

public bool IsMultivalued()

Returns

bool

LowerBound()

The query lowerBound() returns the lower bound of the multiplicity as an integer. result = if lower->notEmpty() then lower else 1 endif

public int LowerBound()

Returns

int

Lower_ge_0(object, object)

The lower bound must be a non-negative integer literal. lowerBound()->notEmpty() implies lowerBound() >= 0

public bool Lower_ge_0(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool

SetFeature(string, object)

Sets a value to the given feature

protected override void SetFeature(string feature, object value)

Parameters

feature string

The requested feature

value object

The value that should be set to that feature

UpperBound()

The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural. result = if upper->notEmpty() then upper else 1 endif

public int UpperBound()

Returns

int

Upper_ge_lower(object, object)

The upper bound must be greater than or equal to the lower bound. (upperBound()->notEmpty() and lowerBound()->notEmpty()) implies upperBound() >= lowerBound()

public bool Upper_ge_lower(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool

Upper_gt_0(object, object)

A multiplicity must define at least one valid cardinality that is greater than zero. upperBound()->notEmpty() implies upperBound() > 0

public bool Upper_gt_0(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool