Table of Contents

Class InstanceSpecification

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

An instance specification is a model element that represents an instance in a modeled system.

[XmlNamespace("http://www.omg.org/spec/MOF/20131001/cmof.xmi")]
[XmlNamespacePrefix("cmof")]
[ModelRepresentationClass("http://www.omg.org/spec/MOF/20131001/cmof.xmi#//InstanceSpecification")]
public class InstanceSpecification : PackageableElement, IInstanceSpecification, IPackageableElement, INamedElement, IElement, IObject, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
InstanceSpecification
Implements
Derived
Inherited Members

Constructors

InstanceSpecification()

Creates a new instance

public InstanceSpecification()

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

Classifier

The classifier or classifiers of the represented instance. If multiple classifiers are specified, the instance is classified by all of them.

[XmlElementName("classifier")]
[XmlAttribute(true)]
public ISetExpression<IClassifier> Classifier { get; }

Property Value

ISetExpression<IClassifier>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

Slot

A slot giving the value or values of a structural feature of the instance. An instance specification can have one slot per structural feature of its classifiers, including inherited features. It is not necessary to model a slot for each structural feature, in which case the instance specification is a partial description.

[Browsable(false)]
[XmlElementName("slot")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("owningInstance")]
public IOrderedSetExpression<ISlot> Slot { get; }

Property Value

IOrderedSetExpression<ISlot>

Specification

A specification of how to compute, derive, or construct the instance.

[Browsable(false)]
[XmlElementName("specification")]
[XmlAttribute(false)]
[Containment]
public IValueSpecification Specification { get; set; }

Property Value

IValueSpecification

Methods

Defining_feature(object, object)

The defining feature of each slot is a structural feature (directly or inherited) of a classifier of the instance specification. slot->forAll(s | classifier->exists (c | c.allFeatures()->includes (s.definingFeature)))

public bool Defining_feature(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

GetClass()

Gets the Class for this model element

public override IClass GetClass()

Returns

IClass

GetCollectionForFeature(string)

Gets the Model element collection for the given feature

protected override IList GetCollectionForFeature(string feature)

Parameters

feature string

The requested feature

Returns

IList

A non-generic list of elements

GetCompositionName(object)

Gets the property name for the given container

protected override string GetCompositionName(object container)

Parameters

container object

The container object

Returns

string

The name of the respective container reference

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

GetRelativePathForNonIdentifiedChild(IModelElement)

Gets the relative URI fragment for the given child model element

protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)

Parameters

element IModelElement

The element that should be looked for

Returns

string

A fragment of the relative URI

OnDefining_featureCalled(OperationCallEventArgs)

Raises the Defining_featureCalled event

protected virtual void OnDefining_featureCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnDefining_featureCalling(OperationCallEventArgs)

Raises the Defining_featureCalling event

protected virtual void OnDefining_featureCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnSpecificationChanged(ValueChangedEventArgs)

Raises the SpecificationChanged event

protected virtual void OnSpecificationChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnSpecificationChanging(ValueChangedEventArgs)

Raises the SpecificationChanging event

protected virtual void OnSpecificationChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnStructural_featureCalled(OperationCallEventArgs)

Raises the Structural_featureCalled event

protected virtual void OnStructural_featureCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnStructural_featureCalling(OperationCallEventArgs)

Raises the Structural_featureCalling event

protected virtual void OnStructural_featureCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

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

Structural_feature(object, object)

One structural feature (including the same feature inherited from multiple classifiers) is the defining feature of at most one slot in an instance specification. classifier->forAll(c | (c.allFeatures()->forAll(f | slot->select(s | s.definingFeature = f)->size() <= 1)))

public bool Structural_feature(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

Events

Defining_featureCalled

Gets fired after the operation defining_feature got called

public event EventHandler<OperationCallEventArgs> Defining_featureCalled

Event Type

EventHandler<OperationCallEventArgs>

Defining_featureCalling

Gets fired before the operation defining_feature gets called

public event EventHandler<OperationCallEventArgs> Defining_featureCalling

Event Type

EventHandler<OperationCallEventArgs>

SpecificationChanged

Gets fired when the Specification property changed its value

public event EventHandler<ValueChangedEventArgs> SpecificationChanged

Event Type

EventHandler<ValueChangedEventArgs>

SpecificationChanging

Gets fired before the Specification property changes its value

public event EventHandler<ValueChangedEventArgs> SpecificationChanging

Event Type

EventHandler<ValueChangedEventArgs>

Structural_featureCalled

Gets fired after the operation structural_feature got called

public event EventHandler<OperationCallEventArgs> Structural_featureCalled

Event Type

EventHandler<OperationCallEventArgs>

Structural_featureCalling

Gets fired before the operation structural_feature gets called

public event EventHandler<OperationCallEventArgs> Structural_featureCalling

Event Type

EventHandler<OperationCallEventArgs>