Interface IPackage
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
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
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
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
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
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
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
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
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
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
IProfileThe profile to apply.
Returns
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
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
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
stringThe name for the new class, or null.
isAbstract
boolWhether the new class should be abstract.
Returns
CreateOwnedEnumeration(string)
Creates a enumeration with the specified name as an owned type of this package.
IEnumeration CreateOwnedEnumeration(string name)
Parameters
name
stringThe name for the new enumeration, or null.
Returns
CreateOwnedInterface(string)
Creates an interface with the specified name as an owned type of this package.
IInterface CreateOwnedInterface(string name)
Parameters
name
stringThe name for the new interface, or null.
Returns
CreateOwnedPrimitiveType(string)
Creates a primitive type with the specified name as an owned type of this package.
IPrimitiveType CreateOwnedPrimitiveType(string name)
Parameters
name
stringThe name for the new primitive type, or null.
Returns
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
stringThe name for the new stereotype, or null.
isAbstract
boolWhether the new stereotype should be abstract.
Returns
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
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
GetAllAppliedProfiles()
Retrieves all the profiles that are applied to this package, including profiles applied to its nesting package(s).
ISetExpression<IProfile> GetAllAppliedProfiles()
Returns
GetAllProfileApplications()
Retrieves all the profile applications for this package, including profile applications for its nesting package(s).
ISetExpression<IProfileApplication> GetAllProfileApplications()
Returns
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
stringThe qualified name of the applied profile to retrieve.
Returns
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
stringThe qualified name of the applied profile to retrieve.
recurse
boolWhether to look in nesting packages.
Returns
GetAppliedProfiles()
Retrieves the profiles that are applied to this package.
ISetExpression<IProfile> GetAppliedProfiles()
Returns
GetNestedPackages()
Derivation for Package::/nestedPackage result = (packagedElement->select(oclIsKindOf(Package))->collect(oclAsType(Package))->asSet()) <p>From package UML::Packages.</p>
ISetExpression<IPackage> GetNestedPackages()
Returns
GetOwnedStereotypes()
Derivation for Package::/ownedStereotype result = (packagedElement->select(oclIsKindOf(Stereotype))->collect(oclAsType(Stereotype))->asSet()) <p>From package UML::Packages.</p>
ISetExpression<IStereotype> GetOwnedStereotypes()
Returns
GetOwnedTypes()
Derivation for Package::/ownedType result = (packagedElement->select(oclIsKindOf(Type))->collect(oclAsType(Type))->asSet()) <p>From package UML::Packages.</p>
ISetExpression<IType> GetOwnedTypes()
Returns
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
IProfileThe profile whose application to retrieve.
Returns
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
IProfileThe profile whose application to retrieve.
recurse
boolWhether to look in nesting packages.
Returns
IsModelLibrary()
Determines whether this package is a model library.
bool IsModelLibrary()
Returns
IsProfileApplied(IProfile)
Determines whether the specified profile is applied to this package.
bool IsProfileApplied(IProfile profile)
Parameters
profile
IProfileThe profile in question.
Returns
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
Returns
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
IProfileThe profile to unapply.
Returns
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()