Table of Contents

Interface IPackage

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

The public interface for Package

[DefaultImplementationType(typeof(Package))]
[XmlDefaultImplementationType(typeof(Package))]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Package")]
public interface IPackage : ITemplateableElement, IPackageableElement, IParameterableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inherited Members

Properties

NestedPackage

References the packaged elements that are Packages. <p>From package UML::Packages.</p>

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

Property Value

IOrderedSetExpression<IPackage>

NestingPackage

References the Package that owns this Package. <p>From package UML::Packages.</p>

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

Property Value

IPackage

OwnedStereotype

References the Stereotypes that are owned by the Package. <p>From package UML::Packages.</p>

[Browsable(false)]
[XmlElementName("ownedStereotype")]
[XmlAttribute(false)]
[Containment]
IOrderedSetExpression<IStereotype> OwnedStereotype { get; }

Property Value

IOrderedSetExpression<IStereotype>

OwnedType

References the packaged elements that are Types. <p>From package UML::Packages.</p>

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

Property Value

IOrderedSetExpression<IType>

PackageMerge

References the PackageMerges that are owned by this Package. <p>From package UML::Packages.</p>

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

Property Value

IOrderedSetExpression<IPackageMerge>

PackagedElement

Specifies the packageable elements that are owned by this Package. <p>From package UML::Packages.</p>

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

Property Value

IListExpression<IPackageableElement>

ProfileApplication

References the ProfileApplications that indicate which profiles have been applied to the Package. <p>From package UML::Packages.</p>

[Browsable(false)]
[XmlElementName("profileApplication")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("applyingPackage")]
IOrderedSetExpression<IProfileApplication> ProfileApplication { get; }

Property Value

IOrderedSetExpression<IProfileApplication>

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. <p>From package UML::Packages.</p>

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

Property Value

string

Methods

AllApplicableStereotypes()

The query allApplicableStereotypes() returns all the directly or indirectly owned stereotypes, including stereotypes contained in sub-profiles. result = (let ownedPackages : Bag(Package) = ownedMember->select(oclIsKindOf(Package))->collect(oclAsType(Package)) in ownedStereotype->union(ownedPackages.allApplicableStereotypes())->flatten()->asSet() ) <p>From package UML::Packages.</p>

ISetExpression<IStereotype> AllApplicableStereotypes()

Returns

ISetExpression<IStereotype>

ApplyProfile(IProfile)

Applies the current definition of the specified profile to this package and automatically applies required stereotypes in the profile to elements within this package's namespace hieararchy. If a different definition is already applied, automatically migrates any associated stereotype values on a "best effort" basis (matching classifiers and structural features by name).

ISetExpression<IEObject> ApplyProfile(IProfile profile)

Parameters

profile IProfile

The profile to apply.

Returns

ISetExpression<IEObject>

ApplyProfiles(IEnumerable<IProfile>)

Applies the current definitions of the specified profiles to this package and automatically applies required stereotypes in the profiles to elements within this package's namespace hieararchy. If different definitions are already applied, automatically migrates any associated stereotype values on a "best effort" basis (matching classifiers and structural features by name).

ISetExpression<IEObject> ApplyProfiles(IEnumerable<IProfile> profiles)

Parameters

profiles IEnumerable<IProfile>

The profiles to apply.

Returns

ISetExpression<IEObject>

ContainingProfile()

The query containingProfile() returns the closest profile directly or indirectly containing this package (or this package itself, if it is a profile). result = (if self.oclIsKindOf(Profile) then self.oclAsType(Profile) else self.namespace.oclAsType(Package).containingProfile() endif) <p>From package UML::Packages.</p>

IProfile ContainingProfile()

Returns

IProfile

CreateOwnedClass(string, bool)

Creates a(n) (abstract) class with the specified name as an owned type of this package.

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 an owned type of this package.

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 an owned type of this package.

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 an owned type of this package.

IPrimitiveType CreateOwnedPrimitiveType(string name)

Parameters

name string

The name for the new primitive type, or null.

Returns

IPrimitiveType

CreateOwnedStereotype(string, bool)

Creates a(n) (abstract) stereotype with the specified name as an owned stereotype of this profile.

IStereotype CreateOwnedStereotype(string name, bool isAbstract)

Parameters

name string

The name for the new stereotype, or null.

isAbstract bool

Whether the new stereotype should be abstract.

Returns

IStereotype

Elements_public_or_private(object, object)

If an element that is owned by a package has visibility, it is public or private. packagedElement->forAll(e | e.visibility<> null implies e.visibility = VisibilityKind::public or e.visibility = VisibilityKind::private)

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

GetAllAppliedProfiles()

Retrieves all the profiles that are applied to this package, including profiles applied to its nesting package(s).

ISetExpression<IProfile> GetAllAppliedProfiles()

Returns

ISetExpression<IProfile>

GetAllProfileApplications()

Retrieves all the profile applications for this package, including profile applications for its nesting package(s).

ISetExpression<IProfileApplication> GetAllProfileApplications()

Returns

ISetExpression<IProfileApplication>

GetAppliedProfile(string)

Retrieves the profile with the specified qualified name that is applied to this package, or null if no such profile is applied.

IProfile GetAppliedProfile(string qualifiedName)

Parameters

qualifiedName string

The qualified name of the applied profile to retrieve.

Returns

IProfile

GetAppliedProfile(string, bool)

Retrieves the profile with the specified qualified name that is applied to this package or any of its nesting packages (if indicated), or null if no such profile is applied.

IProfile GetAppliedProfile(string qualifiedName, bool recurse)

Parameters

qualifiedName string

The qualified name of the applied profile to retrieve.

recurse bool

Whether to look in nesting packages.

Returns

IProfile

GetAppliedProfiles()

Retrieves the profiles that are applied to this package.

ISetExpression<IProfile> GetAppliedProfiles()

Returns

ISetExpression<IProfile>

GetNestedPackages()

Derivation for Package::/nestedPackage result = (packagedElement->select(oclIsKindOf(Package))->collect(oclAsType(Package))->asSet()) <p>From package UML::Packages.</p>

ISetExpression<IPackage> GetNestedPackages()

Returns

ISetExpression<IPackage>

GetOwnedStereotypes()

Derivation for Package::/ownedStereotype result = (packagedElement->select(oclIsKindOf(Stereotype))->collect(oclAsType(Stereotype))->asSet()) <p>From package UML::Packages.</p>

ISetExpression<IStereotype> GetOwnedStereotypes()

Returns

ISetExpression<IStereotype>

GetOwnedTypes()

Derivation for Package::/ownedType result = (packagedElement->select(oclIsKindOf(Type))->collect(oclAsType(Type))->asSet()) <p>From package UML::Packages.</p>

ISetExpression<IType> GetOwnedTypes()

Returns

ISetExpression<IType>

GetProfileApplication(IProfile)

Retrieves the application of the specified profile to this package, or null if no such profile is applied.

IProfileApplication GetProfileApplication(IProfile profile)

Parameters

profile IProfile

The profile whose application to retrieve.

Returns

IProfileApplication

GetProfileApplication(IProfile, bool)

Retrieves the application of the specified profile to this package or any of its nesting packages (if indicated), or null if no such profile is applied.

IProfileApplication GetProfileApplication(IProfile profile, bool recurse)

Parameters

profile IProfile

The profile whose application to retrieve.

recurse bool

Whether to look in nesting packages.

Returns

IProfileApplication

IsModelLibrary()

Determines whether this package is a model library.

bool IsModelLibrary()

Returns

bool

IsProfileApplied(IProfile)

Determines whether the specified profile is applied to this package.

bool IsProfileApplied(IProfile profile)

Parameters

profile IProfile

The profile in question.

Returns

bool

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. member->includes(el) result = (ownedMember->includes(el) or (elementImport->select(ei|ei.importedElement = VisibilityKind::public)->collect(importedElement.oclAsType(NamedElement))->includes(el)) or (packageImport->select(visibility = VisibilityKind::public)->collect(importedPackage.member->includes(el))->notEmpty())) <p>From package UML::Packages.</p>

bool MakesVisible(INamedElement el)

Parameters

el INamedElement

Returns

bool

UnapplyProfile(IProfile)

Unapplies the specified profile from this package and automatically unapplies stereotypes in the profile from elements within this package's namespace hieararchy.

ISetExpression<IEObject> UnapplyProfile(IProfile profile)

Parameters

profile IProfile

The profile to unapply.

Returns

ISetExpression<IEObject>

VisibleMembers()

The query visibleMembers() defines which members of a Package can be accessed outside it. result = (member->select( m | m.oclIsKindOf(PackageableElement) and self.makesVisible(m))->collect(oclAsType(PackageableElement))->asSet()) <p>From package UML::Packages.</p>

ISetExpression<IPackageableElement> VisibleMembers()

Returns

ISetExpression<IPackageableElement>