Table of Contents

Class Element

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

An element can own comments. Element is an abstract metaclass with no superclass. It is used as the common superclass for all metaclasses in the infrastructure library.

[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#//Element")]
public abstract class Element : ModelElement, IElement, 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. Subsets Element::ownedElement. 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 IModelElement Delete()

Returns

IModelElement

Equals(object)

public bool Equals(object otherElement)

Parameters

otherElement object

Returns

bool

Get(IProperty)

public object Get(IProperty property)

Parameters

property IProperty

Returns

object

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
context object

Returns

bool

Invoke(IOperation, IArgument)

public object Invoke(IOperation op, IArgument arguments)

Parameters

op IOperation
arguments IArgument

Returns

object

IsInstanceOfType(IClass, bool)

public bool IsInstanceOfType(IClass type, bool includeSubtypes)

Parameters

type IClass
includeSubtypes bool

Returns

bool

IsSet(IProperty)

public bool IsSet(IProperty property)

Parameters

property IProperty

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
context object

Returns

bool

Set(IProperty, object)

public IModelElement Set(IProperty property, object value)

Parameters

property IProperty
value object

Returns

IModelElement

Unset(IProperty)

public IModelElement Unset(IProperty property)

Parameters

property IProperty

Returns

IModelElement

Verify(bool)

public void Verify(bool deepVerify)

Parameters

deepVerify bool