Table of Contents

Class Component

Namespace
NMF.Interop.Uml
Assembly
NMF.UMLInterop.dll

A Component represents a modular part of a system that encapsulates its contents and whose manifestation is replaceable within its environment. <p>From package UML::StructuredClassifiers.</p>

[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Component")]
public class Component : Class, IComponent, IClass, IBehavioredClassifier, IEncapsulatedClassifier, IStructuredClassifier, IClassifier, ITemplateableElement, IType, IPackageableElement, IParameterableElement, IRedefinableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
Component
Implements
Inherited Members

Constructors

Component()

Creates a new instance

public Component()

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

IsIndirectlyInstantiated

If true, the Component is defined at design-time, but at run-time (or execution-time) an object specified by the Component does not exist, that is, the Component is instantiated indirectly, through the instantiation of its realizing Classifiers or parts. <p>From package UML::StructuredClassifiers.</p>

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

Property Value

bool

PackagedElement

The set of PackageableElements that a Component owns. In the namespace of a Component, all model elements that are involved in or related to its definition may be owned or imported explicitly. These may include e.g., Classes, Interfaces, Components, Packages, UseCases, Dependencies (e.g., mappings), and Artifacts. <p>From package UML::StructuredClassifiers.</p>

[Browsable(false)]
[XmlElementName("packagedElement")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IPackageableElement> PackagedElement { get; }

Property Value

IOrderedSetExpression<IPackageableElement>

Realization

The set of Realizations owned by the Component. Realizations reference the Classifiers of which the Component is an abstraction; i.e., that realize its behavior. <p>From package UML::StructuredClassifiers.</p>

[Browsable(false)]
[XmlElementName("realization")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("abstraction")]
public IOrderedSetExpression<IComponentRealization> Realization { get; }

Property Value

IOrderedSetExpression<IComponentRealization>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

Methods

CreateOwnedClass(string, bool)

Creates a(n) (abstract) class with the specified name as a packaged element of this component.

public IClass CreateOwnedClass(string name, bool isAbstract)

Parameters

name string

The name for the new class, or null.

isAbstract bool

Whether the new class should be abstract.

Returns

IClass

CreateOwnedEnumeration(string)

Creates a enumeration with the specified name as a packaged element of this component.

public IEnumeration CreateOwnedEnumeration(string name)

Parameters

name string

The name for the new enumeration, or null.

Returns

IEnumeration

CreateOwnedInterface(string)

Creates an interface with the specified name as a packaged element of this component.

public IInterface CreateOwnedInterface(string name)

Parameters

name string

The name for the new interface, or null.

Returns

IInterface

CreateOwnedPrimitiveType(string)

Creates a primitive type with the specified name as a packaged element of this component.

public IPrimitiveType CreateOwnedPrimitiveType(string name)

Parameters

name string

The name for the new primitive type, or null.

Returns

IPrimitiveType

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

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

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

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

GetProvideds()

Derivation for Component::/provided result = (let ris : Set(Interface) = allRealizedInterfaces(), realizingClassifiers : Set(Classifier) = self.realization.realizingClassifier->union(self.allParents()->collect(realization.realizingClassifier))->asSet(), allRealizingClassifiers : Set(Classifier) = realizingClassifiers->union(realizingClassifiers.allParents())->asSet(), realizingClassifierInterfaces : Set(Interface) = allRealizingClassifiers->iterate(c; rci : Set(Interface) = Set{} | rci->union(c.allRealizedInterfaces())), ports : Set(Port) = self.ownedPort->union(allParents()->collect(ownedPort))->asSet(), providedByPorts : Set(Interface) = ports.provided->asSet() in ris->union(realizingClassifierInterfaces) ->union(providedByPorts)->asSet()) <p>From package UML::StructuredClassifiers.</p>

public ISetExpression<IInterface> GetProvideds()

Returns

ISetExpression<IInterface>

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

GetRequireds()

Derivation for Component::/required result = (let uis : Set(Interface) = allUsedInterfaces(), realizingClassifiers : Set(Classifier) = self.realization.realizingClassifier->union(self.allParents()->collect(realization.realizingClassifier))->asSet(), allRealizingClassifiers : Set(Classifier) = realizingClassifiers->union(realizingClassifiers.allParents())->asSet(), realizingClassifierInterfaces : Set(Interface) = allRealizingClassifiers->iterate(c; rci : Set(Interface) = Set{} | rci->union(c.allUsedInterfaces())), ports : Set(Port) = self.ownedPort->union(allParents()->collect(ownedPort))->asSet(), usedByPorts : Set(Interface) = ports.required->asSet() in uis->union(realizingClassifierInterfaces)->union(usedByPorts)->asSet() ) <p>From package UML::StructuredClassifiers.</p>

public ISetExpression<IInterface> GetRequireds()

Returns

ISetExpression<IInterface>

No_nested_classifiers(object, object)

A Component cannot nest Classifiers. nestedClassifier->isEmpty()

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

No_packaged_elements(object, object)

A Component nested in a Class cannot have any packaged elements. nestingClass <> null implies packagedElement->isEmpty()

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

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