Table of Contents

Class Element

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

An element is a constituent of a model. As such, it has the capability of owning other elements.

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

Constructors

Element()

Creates a new instance

public Element()

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

OwnedComment

The Comments owned by this element.

[Browsable(false)]
[XmlElementName("ownedComment")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IComment> OwnedComment { get; }

Property Value

IOrderedSetExpression<IComment>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

Methods

AllOwnedElements()

The query allOwnedElements() gives all of the direct and indirect owned elements of an element. result = ownedElement->union(ownedElement->collect(e | e.allOwnedElements()))

public ISetExpression<IElement> AllOwnedElements()

Returns

ISetExpression<IElement>

Container()

public IElement Container()

Returns

IElement

Delete()

public void Delete()

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

GetMetaClass()

public IClass GetMetaClass()

Returns

IClass

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

Has_owner(object, object)

Elements that must be owned must have an owner. self.mustBeOwned() implies owner->notEmpty()

public bool Has_owner(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

IsInstanceOfType(IClass, bool)

public bool IsInstanceOfType(IClass type, bool includesSubtypes)

Parameters

type IClass
includesSubtypes bool

Returns

bool

MustBeOwned()

The query mustBeOwned() indicates whether elements of this type must have an owner. Subclasses of Element that do not require an owner must override this operation. result = true

public bool MustBeOwned()

Returns

bool

Not_own_self(object, object)

An element may not directly or indirectly own itself. not self.allOwnedElements()->includes(self)

public bool Not_own_self(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

OnAllOwnedElementsCalled(OperationCallEventArgs)

Raises the AllOwnedElementsCalled event

protected virtual void OnAllOwnedElementsCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnAllOwnedElementsCalling(OperationCallEventArgs)

Raises the AllOwnedElementsCalling event

protected virtual void OnAllOwnedElementsCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnContainerCalled(OperationCallEventArgs)

Raises the ContainerCalled event

protected virtual void OnContainerCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnContainerCalling(OperationCallEventArgs)

Raises the ContainerCalling event

protected virtual void OnContainerCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnDeleteCalled(OperationCallEventArgs)

Raises the DeleteCalled event

protected virtual void OnDeleteCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnDeleteCalling(OperationCallEventArgs)

Raises the DeleteCalling event

protected virtual void OnDeleteCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnGetMetaClassCalled(OperationCallEventArgs)

Raises the GetMetaClassCalled event

protected virtual void OnGetMetaClassCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnGetMetaClassCalling(OperationCallEventArgs)

Raises the GetMetaClassCalling event

protected virtual void OnGetMetaClassCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnHas_ownerCalled(OperationCallEventArgs)

Raises the Has_ownerCalled event

protected virtual void OnHas_ownerCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnHas_ownerCalling(OperationCallEventArgs)

Raises the Has_ownerCalling event

protected virtual void OnHas_ownerCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnIsInstanceOfTypeCalled(OperationCallEventArgs)

Raises the IsInstanceOfTypeCalled event

protected virtual void OnIsInstanceOfTypeCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnIsInstanceOfTypeCalling(OperationCallEventArgs)

Raises the IsInstanceOfTypeCalling event

protected virtual void OnIsInstanceOfTypeCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnMustBeOwnedCalled(OperationCallEventArgs)

Raises the MustBeOwnedCalled event

protected virtual void OnMustBeOwnedCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnMustBeOwnedCalling(OperationCallEventArgs)

Raises the MustBeOwnedCalling event

protected virtual void OnMustBeOwnedCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnNot_own_selfCalled(OperationCallEventArgs)

Raises the Not_own_selfCalled event

protected virtual void OnNot_own_selfCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnNot_own_selfCalling(OperationCallEventArgs)

Raises the Not_own_selfCalling event

protected virtual void OnNot_own_selfCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

Events

AllOwnedElementsCalled

Gets fired after the operation allOwnedElements got called

public event EventHandler<OperationCallEventArgs> AllOwnedElementsCalled

Event Type

EventHandler<OperationCallEventArgs>

AllOwnedElementsCalling

Gets fired before the operation allOwnedElements gets called

public event EventHandler<OperationCallEventArgs> AllOwnedElementsCalling

Event Type

EventHandler<OperationCallEventArgs>

ContainerCalled

Gets fired after the operation container got called

public event EventHandler<OperationCallEventArgs> ContainerCalled

Event Type

EventHandler<OperationCallEventArgs>

ContainerCalling

Gets fired before the operation container gets called

public event EventHandler<OperationCallEventArgs> ContainerCalling

Event Type

EventHandler<OperationCallEventArgs>

DeleteCalled

Gets fired after the operation delete got called

public event EventHandler<OperationCallEventArgs> DeleteCalled

Event Type

EventHandler<OperationCallEventArgs>

DeleteCalling

Gets fired before the operation delete gets called

public event EventHandler<OperationCallEventArgs> DeleteCalling

Event Type

EventHandler<OperationCallEventArgs>

GetMetaClassCalled

Gets fired after the operation getMetaClass got called

public event EventHandler<OperationCallEventArgs> GetMetaClassCalled

Event Type

EventHandler<OperationCallEventArgs>

GetMetaClassCalling

Gets fired before the operation getMetaClass gets called

public event EventHandler<OperationCallEventArgs> GetMetaClassCalling

Event Type

EventHandler<OperationCallEventArgs>

Has_ownerCalled

Gets fired after the operation has_owner got called

public event EventHandler<OperationCallEventArgs> Has_ownerCalled

Event Type

EventHandler<OperationCallEventArgs>

Has_ownerCalling

Gets fired before the operation has_owner gets called

public event EventHandler<OperationCallEventArgs> Has_ownerCalling

Event Type

EventHandler<OperationCallEventArgs>

IsInstanceOfTypeCalled

Gets fired after the operation isInstanceOfType got called

public event EventHandler<OperationCallEventArgs> IsInstanceOfTypeCalled

Event Type

EventHandler<OperationCallEventArgs>

IsInstanceOfTypeCalling

Gets fired before the operation isInstanceOfType gets called

public event EventHandler<OperationCallEventArgs> IsInstanceOfTypeCalling

Event Type

EventHandler<OperationCallEventArgs>

MustBeOwnedCalled

Gets fired after the operation mustBeOwned got called

public event EventHandler<OperationCallEventArgs> MustBeOwnedCalled

Event Type

EventHandler<OperationCallEventArgs>

MustBeOwnedCalling

Gets fired before the operation mustBeOwned gets called

public event EventHandler<OperationCallEventArgs> MustBeOwnedCalling

Event Type

EventHandler<OperationCallEventArgs>

Not_own_selfCalled

Gets fired after the operation not_own_self got called

public event EventHandler<OperationCallEventArgs> Not_own_selfCalled

Event Type

EventHandler<OperationCallEventArgs>

Not_own_selfCalling

Gets fired before the operation not_own_self gets called

public event EventHandler<OperationCallEventArgs> Not_own_selfCalling

Event Type

EventHandler<OperationCallEventArgs>