Table of Contents

Interface IMultiplicityElement

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

The public interface for MultiplicityElement

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

Properties

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)]
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)]
bool IsUnique { get; set; }

Property Value

bool

Lower

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

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

Property Value

int?

Upper

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

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

Property Value

int?

Methods

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)

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

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

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

int LowerBound()

Returns

int

Lower_ge_0(object, object)

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

bool Lower_ge_0(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool

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

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

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

bool Upper_gt_0(object diagnostics, object context)

Parameters

diagnostics object
context object

Returns

bool