Table of Contents

Class Package

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

A package is used to group elements, and provides a namespace for the grouped elements.

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

Constructors

Package()

Creates a new instance

public Package()

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

NestedPackage

References the packaged elements that are Packages.

[Browsable(false)]
[XmlElementName("nestedPackage")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("nestingPackage")]
public IOrderedSetExpression<IPackage> NestedPackage { get; }

Property Value

IOrderedSetExpression<IPackage>

NestingPackage

References the Package that owns this Package.

[Browsable(false)]
[XmlElementName("nestingPackage")]
[XmlAttribute(true)]
[XmlOpposite("nestedPackage")]
public IPackage NestingPackage { get; set; }

Property Value

IPackage

OwnedType

References the packaged elements that are Types.

[Browsable(false)]
[XmlElementName("ownedType")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("package")]
public IOrderedSetExpression<IType> OwnedType { get; }

Property Value

IOrderedSetExpression<IType>

PackageMerge

References the PackageMerges that are owned by this Package.

[Browsable(false)]
[XmlElementName("packageMerge")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("receivingPackage")]
public IOrderedSetExpression<IPackageMerge> PackageMerge { get; }

Property Value

IOrderedSetExpression<IPackageMerge>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

URI

Provides an identifier for the package that can be used for many purposes. A URI is the universally unique identification of the package following the IETF URI specification, RFC 2396 http://www.ietf.org/rfc/rfc2396.txt and it must comply with those syntax rules.

[XmlAttribute(true)]
public string URI { get; set; }

Property Value

string

Methods

Elements_public_or_private(object, object)

If an element that is owned by a package has visibility, it is public or private. self.ownedElements->forAll(e | e.visibility->notEmpty() implies e.visbility = #public or e.visibility = #private)

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

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

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

MakesVisible(INamedElement)

The query makesVisible() defines whether a Package makes an element visible outside itself. Elements with no visibility and elements with public visibility are made visible. result = (ownedMember->includes(el)) or (elementImport->select(ei|ei.importedElement = #public)->collect(ei|ei.importedElement)->includes(el)) or (packageImport->select(pi|pi.visibility = #public)->collect(pi|pi.importedPackage.member->includes(el))->notEmpty()) self.member->includes(el)

public bool MakesVisible(INamedElement el)

Parameters

el INamedElement

Returns

bool

OnElements_public_or_privateCalled(OperationCallEventArgs)

Raises the Elements_public_or_privateCalled event

protected virtual void OnElements_public_or_privateCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnElements_public_or_privateCalling(OperationCallEventArgs)

Raises the Elements_public_or_privateCalling event

protected virtual void OnElements_public_or_privateCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnMakesVisibleCalled(OperationCallEventArgs)

Raises the MakesVisibleCalled event

protected virtual void OnMakesVisibleCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnMakesVisibleCalling(OperationCallEventArgs)

Raises the MakesVisibleCalling event

protected virtual void OnMakesVisibleCalling(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnNestingPackageChanged(ValueChangedEventArgs)

Raises the NestingPackageChanged event

protected virtual void OnNestingPackageChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnNestingPackageChanging(ValueChangedEventArgs)

Raises the NestingPackageChanging event

protected virtual void OnNestingPackageChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnParentChanged(IModelElement, IModelElement)

Gets called when the parent model element of the current model element changes

protected override void OnParentChanged(IModelElement newParent, IModelElement oldParent)

Parameters

newParent IModelElement

The new parent model element

oldParent IModelElement

The old parent model element

OnParentChanging(IModelElement, IModelElement)

Gets called when the parent model element of the current model element is about to change

protected override void OnParentChanging(IModelElement newParent, IModelElement oldParent)

Parameters

newParent IModelElement

The new parent model element

oldParent IModelElement

The old parent model element

OnURIChanged(ValueChangedEventArgs)

Raises the URIChanged event

protected virtual void OnURIChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnURIChanging(ValueChangedEventArgs)

Raises the URIChanging event

protected virtual void OnURIChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnVisibleMembersCalled(OperationCallEventArgs)

Raises the VisibleMembersCalled event

protected virtual void OnVisibleMembersCalled(OperationCallEventArgs eventArgs)

Parameters

eventArgs OperationCallEventArgs

The event data

OnVisibleMembersCalling(OperationCallEventArgs)

Raises the VisibleMembersCalling event

protected virtual void OnVisibleMembersCalling(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

VisibleMembers()

The query visibleMembers() defines which members of a Package can be accessed outside it. result = member->select( m | self.makesVisible(m))

public ISetExpression<IPackageableElement> VisibleMembers()

Returns

ISetExpression<IPackageableElement>

Events

Elements_public_or_privateCalled

Gets fired after the operation elements_public_or_private got called

public event EventHandler<OperationCallEventArgs> Elements_public_or_privateCalled

Event Type

EventHandler<OperationCallEventArgs>

Elements_public_or_privateCalling

Gets fired before the operation elements_public_or_private gets called

public event EventHandler<OperationCallEventArgs> Elements_public_or_privateCalling

Event Type

EventHandler<OperationCallEventArgs>

MakesVisibleCalled

Gets fired after the operation makesVisible got called

public event EventHandler<OperationCallEventArgs> MakesVisibleCalled

Event Type

EventHandler<OperationCallEventArgs>

MakesVisibleCalling

Gets fired before the operation makesVisible gets called

public event EventHandler<OperationCallEventArgs> MakesVisibleCalling

Event Type

EventHandler<OperationCallEventArgs>

NestingPackageChanged

Gets fired when the NestingPackage property changed its value

public event EventHandler<ValueChangedEventArgs> NestingPackageChanged

Event Type

EventHandler<ValueChangedEventArgs>

NestingPackageChanging

Gets fired before the NestingPackage property changes its value

public event EventHandler<ValueChangedEventArgs> NestingPackageChanging

Event Type

EventHandler<ValueChangedEventArgs>

URIChanged

Gets fired when the URI property changed its value

public event EventHandler<ValueChangedEventArgs> URIChanged

Event Type

EventHandler<ValueChangedEventArgs>

URIChanging

Gets fired before the URI property changes its value

public event EventHandler<ValueChangedEventArgs> URIChanging

Event Type

EventHandler<ValueChangedEventArgs>

VisibleMembersCalled

Gets fired after the operation visibleMembers got called

public event EventHandler<OperationCallEventArgs> VisibleMembersCalled

Event Type

EventHandler<OperationCallEventArgs>

VisibleMembersCalling

Gets fired before the operation visibleMembers gets called

public event EventHandler<OperationCallEventArgs> VisibleMembersCalling

Event Type

EventHandler<OperationCallEventArgs>