org.eclipse.uml2.uml
Interface Package

All Superinterfaces:
Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, NamedElement, Namespace, org.eclipse.emf.common.notify.Notifier, PackageableElement, ParameterableElement, TemplateableElement
All Known Subinterfaces:
Model, Profile

public interface Package
extends Namespace, PackageableElement, TemplateableElement

A representation of the model object 'Package'. A package can have one or more profile applications to indicate which profiles have been applied. Because a profile is a package, it is possible to apply a profile not only to packages, but also to profiles. Package specializes TemplateableElement and PackageableElement specializes ParameterableElement to specify that a package can be used as a template and a PackageableElement as a template parameter. A package is used to group elements, and provides a namespace for the grouped elements.

From package UML::Packages.

The following features are supported:

See Also:
UMLPackage.getPackage()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 org.eclipse.emf.common.util.EList<Stereotype> allApplicableStereotypes()
          The query allApplicableStereotypes() returns all the directly or indirectly owned stereotypes, including stereotypes contained in sub-profiles.
 org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> applyProfile(Profile profile)
          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.
 Profile containingProfile()
          The query containingProfile() returns the closest profile directly or indirectly containing this package (or this package itself, if it is a profile).
 Package createNestedPackage(java.lang.String name)
          Creates a new Package, with the specified 'Name', and appends it to the 'Nested Package' reference list
 Package createNestedPackage(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)
          Creates a new Package, with the specified 'Name', and appends it to the 'Nested Package' reference list
 Class createOwnedClass(java.lang.String name, boolean isAbstract)
          Creates a(n) (abstract) class with the specified name as an owned type of this package.
 Enumeration createOwnedEnumeration(java.lang.String name)
          Creates a enumeration with the specified name as an owned type of this package.
 Interface createOwnedInterface(java.lang.String name)
          Creates an interface with the specified name as an owned type of this package.
 PrimitiveType createOwnedPrimitiveType(java.lang.String name)
          Creates a primitive type with the specified name as an owned type of this package.
 Stereotype createOwnedStereotype(java.lang.String name, boolean isAbstract)
          Creates a(n) (abstract) stereotype with the specified name as an owned stereotype of this profile.
 Type createOwnedType(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)
          Creates a new Type, with the specified 'Name', and appends it to the 'Owned Type' reference list
 PackageableElement createPackagedElement(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)
          Creates a new PackageableElement, with the specified 'Name', and appends it to the 'Packaged Element' containment reference list
 PackageMerge createPackageMerge(Package mergedPackage)
          Creates a new PackageMerge, with the specified 'Merged Package', and appends it to the 'Package Merge' containment reference list
 ProfileApplication createProfileApplication()
          Creates a new ProfileApplication and appends it to the 'Profile Application' containment reference list
 org.eclipse.emf.common.util.EList<Profile> getAllAppliedProfiles()
          Retrieves all the profiles that are applied to this package, including profiles applied to its nesting package(s)
 org.eclipse.emf.common.util.EList<ProfileApplication> getAllProfileApplications()
          Retrieves all the profile applications for this package, including profile applications for its nesting package(s)
 Profile getAppliedProfile(java.lang.String qualifiedName)
          Retrieves the profile with the specified qualified name that is applied to this package, or null if no such profile is applied.
 Profile getAppliedProfile(java.lang.String qualifiedName, boolean recurse)
          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.
 org.eclipse.emf.common.util.EList<Profile> getAppliedProfiles()
          Retrieves the profiles that are applied to this package
 Package getNestedPackage(java.lang.String name)
          Retrieves the first Package with the specified 'Name' from the 'Nested Package' reference list
 Package getNestedPackage(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first Package with the specified 'Name' from the 'Nested Package' reference list
 org.eclipse.emf.common.util.EList<Package> getNestedPackages()
          Returns the value of the 'Nested Package' reference list.
 Package getNestingPackage()
          Returns the value of the 'Nesting Package' reference.
 Stereotype getOwnedStereotype(java.lang.String name)
          Retrieves the first Stereotype with the specified 'Name' from the 'Owned Stereotype' reference list
 Stereotype getOwnedStereotype(java.lang.String name, boolean ignoreCase)
          Retrieves the first Stereotype with the specified 'Name' from the 'Owned Stereotype' reference list
 org.eclipse.emf.common.util.EList<Stereotype> getOwnedStereotypes()
          Returns the value of the 'Owned Stereotype' reference list.
 Type getOwnedType(java.lang.String name)
          Retrieves the first Type with the specified 'Name' from the 'Owned Type' reference list
 Type getOwnedType(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first Type with the specified 'Name' from the 'Owned Type' reference list
 org.eclipse.emf.common.util.EList<Type> getOwnedTypes()
          Returns the value of the 'Owned Type' reference list.
 PackageableElement getPackagedElement(java.lang.String name)
          Retrieves the first PackageableElement with the specified 'Name' from the 'Packaged Element' containment reference list
 PackageableElement getPackagedElement(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first PackageableElement with the specified 'Name' from the 'Packaged Element' containment reference list
 org.eclipse.emf.common.util.EList<PackageableElement> getPackagedElements()
          Returns the value of the 'Packaged Element' containment reference list.
 PackageMerge getPackageMerge(Package mergedPackage)
          Retrieves the first PackageMerge with the specified 'Merged Package' from the 'Package Merge' containment reference list
 PackageMerge getPackageMerge(Package mergedPackage, boolean createOnDemand)
          Retrieves the first PackageMerge with the specified 'Merged Package' from the 'Package Merge' containment reference list
 org.eclipse.emf.common.util.EList<PackageMerge> getPackageMerges()
          Returns the value of the 'Package Merge' containment reference list.
 ProfileApplication getProfileApplication(Profile profile)
          Retrieves the application of the specified profile to this package, or null if no such profile is applied.
 ProfileApplication getProfileApplication(Profile profile, boolean recurse)
          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.
 org.eclipse.emf.common.util.EList<ProfileApplication> getProfileApplications()
          Returns the value of the 'Profile Application' containment reference list.
 java.lang.String getURI()
          Returns the value of the 'URI' attribute
 boolean isModelLibrary()
          Determines whether this package is a model library
 boolean isProfileApplied(Profile profile)
          Determines whether the specified profile is applied to this package.
 boolean makesVisible(NamedElement el)
          The query makesVisible() defines whether a Package makes an element visible outside itself.
 void setNestingPackage(Package value)
          Sets the value of the 'Nesting Package' reference
 void setURI(java.lang.String value)
          Sets the value of the 'URI' attribute
 org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> unapplyProfile(Profile profile)
          Unapplies the specified profile from this package and automatically unapplies stereotypes in the profile from elements within this package's namespace hieararchy.
 boolean validateElementsPublicOrPrivate(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If an element that is owned by a package has visibility, it is public or private.
 org.eclipse.emf.common.util.EList<PackageableElement> visibleMembers()
          The query visibleMembers() defines which members of a Package can be accessed outside it.
 
Methods inherited from interface org.eclipse.uml2.uml.Namespace
createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateCannotImportOwnedMembers, validateCannotImportSelf, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.PackageableElement
validateNamespaceNeedsVisibility
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature
 

Method Detail

getURI

java.lang.String getURI()
Returns the value of the 'URI' attribute. 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.

From package UML::Packages.

Returns:
the value of the 'URI' attribute.
See Also:
setURI(String), UMLPackage.getPackage_URI()

setURI

void setURI(java.lang.String value)
Sets the value of the 'URI' attribute.

Parameters:
value - the new value of the 'URI' attribute.
See Also:
getURI()

getPackageMerges

org.eclipse.emf.common.util.EList<PackageMerge> getPackageMerges()
Returns the value of the 'Package Merge' containment reference list. The list contents are of type PackageMerge. It is bidirectional and its opposite is 'Receiving Package'.

This feature subsets the following features:

References the PackageMerges that are owned by this Package.

From package UML::Packages.

Returns:
the value of the 'Package Merge' containment reference list.
See Also:
UMLPackage.getPackage_PackageMerge(), PackageMerge.getReceivingPackage()

createPackageMerge

PackageMerge createPackageMerge(Package mergedPackage)
Creates a new PackageMerge, with the specified 'Merged Package', and appends it to the 'Package Merge' containment reference list.

Parameters:
mergedPackage - The 'Merged Package' for the new PackageMerge, or null.
Returns:
The new PackageMerge.
See Also:
getPackageMerges()

getPackageMerge

PackageMerge getPackageMerge(Package mergedPackage)
Retrieves the first PackageMerge with the specified 'Merged Package' from the 'Package Merge' containment reference list.

Parameters:
mergedPackage - The 'Merged Package' of the PackageMerge to retrieve, or null.
Returns:
The first PackageMerge with the specified 'Merged Package', or null.
See Also:
getPackageMerges()

getPackageMerge

PackageMerge getPackageMerge(Package mergedPackage,
                             boolean createOnDemand)
Retrieves the first PackageMerge with the specified 'Merged Package' from the 'Package Merge' containment reference list.

Parameters:
mergedPackage - The 'Merged Package' of the PackageMerge to retrieve, or null.
createOnDemand - Whether to create a PackageMerge on demand if not found.
Returns:
The first PackageMerge with the specified 'Merged Package', or null.
See Also:
getPackageMerges()

getPackagedElements

org.eclipse.emf.common.util.EList<PackageableElement> getPackagedElements()
Returns the value of the 'Packaged Element' containment reference list. The list contents are of type PackageableElement.

This feature subsets the following features:

Specifies the packageable elements that are owned by this Package.

From package UML::Packages.

Returns:
the value of the 'Packaged Element' containment reference list.
See Also:
UMLPackage.getPackage_PackagedElement()

createPackagedElement

PackageableElement createPackagedElement(java.lang.String name,
                                         org.eclipse.emf.ecore.EClass eClass)
Creates a new PackageableElement, with the specified 'Name', and appends it to the 'Packaged Element' containment reference list.

Parameters:
name - The 'Name' for the new PackageableElement, or null.
eClass - The Ecore class of the PackageableElement to create.
Returns:
The new PackageableElement.
See Also:
getPackagedElements()

getPackagedElement

PackageableElement getPackagedElement(java.lang.String name)
Retrieves the first PackageableElement with the specified 'Name' from the 'Packaged Element' containment reference list.

Parameters:
name - The 'Name' of the PackageableElement to retrieve, or null.
Returns:
The first PackageableElement with the specified 'Name', or null.
See Also:
getPackagedElements()

getPackagedElement

PackageableElement getPackagedElement(java.lang.String name,
                                      boolean ignoreCase,
                                      org.eclipse.emf.ecore.EClass eClass,
                                      boolean createOnDemand)
Retrieves the first PackageableElement with the specified 'Name' from the 'Packaged Element' containment reference list.

Parameters:
name - The 'Name' of the PackageableElement to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the PackageableElement to retrieve, or null.
createOnDemand - Whether to create a PackageableElement on demand if not found.
Returns:
The first PackageableElement with the specified 'Name', or null.
See Also:
getPackagedElements()

getOwnedTypes

org.eclipse.emf.common.util.EList<Type> getOwnedTypes()
Returns the value of the 'Owned Type' reference list. The list contents are of type Type. It is bidirectional and its opposite is 'Package'.

This feature subsets the following features:

References the packaged elements that are Types.

From package UML::Packages.

Returns:
the value of the 'Owned Type' reference list.
See Also:
UMLPackage.getPackage_OwnedType(), Type.getPackage()

createOwnedType

Type createOwnedType(java.lang.String name,
                     org.eclipse.emf.ecore.EClass eClass)
Creates a new Type, with the specified 'Name', and appends it to the 'Owned Type' reference list.

Parameters:
name - The 'Name' for the new Type, or null.
eClass - The Ecore class of the Type to create.
Returns:
The new Type.
See Also:
getOwnedTypes()

getOwnedType

Type getOwnedType(java.lang.String name)
Retrieves the first Type with the specified 'Name' from the 'Owned Type' reference list.

Parameters:
name - The 'Name' of the Type to retrieve, or null.
Returns:
The first Type with the specified 'Name', or null.
See Also:
getOwnedTypes()

getOwnedType

Type getOwnedType(java.lang.String name,
                  boolean ignoreCase,
                  org.eclipse.emf.ecore.EClass eClass,
                  boolean createOnDemand)
Retrieves the first Type with the specified 'Name' from the 'Owned Type' reference list.

Parameters:
name - The 'Name' of the Type to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Type to retrieve, or null.
createOnDemand - Whether to create a Type on demand if not found.
Returns:
The first Type with the specified 'Name', or null.
See Also:
getOwnedTypes()

getNestedPackages

org.eclipse.emf.common.util.EList<Package> getNestedPackages()
Returns the value of the 'Nested Package' reference list. The list contents are of type Package. It is bidirectional and its opposite is 'Nesting Package'.

This feature subsets the following features:

References the packaged elements that are Packages.

From package UML::Packages.

Returns:
the value of the 'Nested Package' reference list.
See Also:
UMLPackage.getPackage_NestedPackage(), getNestingPackage()

createNestedPackage

Package createNestedPackage(java.lang.String name,
                            org.eclipse.emf.ecore.EClass eClass)
Creates a new Package, with the specified 'Name', and appends it to the 'Nested Package' reference list.

Parameters:
name - The 'Name' for the new Package, or null.
eClass - The Ecore class of the Package to create.
Returns:
The new Package.
See Also:
getNestedPackages()

createNestedPackage

Package createNestedPackage(java.lang.String name)
Creates a new Package, with the specified 'Name', and appends it to the 'Nested Package' reference list.

Parameters:
name - The 'Name' for the new Package, or null.
Returns:
The new Package.
See Also:
getNestedPackages()

getNestedPackage

Package getNestedPackage(java.lang.String name)
Retrieves the first Package with the specified 'Name' from the 'Nested Package' reference list.

Parameters:
name - The 'Name' of the Package to retrieve, or null.
Returns:
The first Package with the specified 'Name', or null.
See Also:
getNestedPackages()

getNestedPackage

Package getNestedPackage(java.lang.String name,
                         boolean ignoreCase,
                         org.eclipse.emf.ecore.EClass eClass,
                         boolean createOnDemand)
Retrieves the first Package with the specified 'Name' from the 'Nested Package' reference list.

Parameters:
name - The 'Name' of the Package to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Package to retrieve, or null.
createOnDemand - Whether to create a Package on demand if not found.
Returns:
The first Package with the specified 'Name', or null.
See Also:
getNestedPackages()

getNestingPackage

Package getNestingPackage()
Returns the value of the 'Nesting Package' reference. It is bidirectional and its opposite is 'Nested Package'.

This feature subsets the following features:

References the Package that owns this Package.

From package UML::Packages.

Returns:
the value of the 'Nesting Package' reference.
See Also:
setNestingPackage(Package), UMLPackage.getPackage_NestingPackage(), getNestedPackages()

setNestingPackage

void setNestingPackage(Package value)
Sets the value of the 'Nesting Package' reference.

Parameters:
value - the new value of the 'Nesting Package' reference.
See Also:
getNestingPackage()

getOwnedStereotypes

org.eclipse.emf.common.util.EList<Stereotype> getOwnedStereotypes()
Returns the value of the 'Owned Stereotype' reference list. The list contents are of type Stereotype.

This feature subsets the following features:

References the Stereotypes that are owned by the Package.

From package UML::Packages.

Returns:
the value of the 'Owned Stereotype' reference list.
See Also:
UMLPackage.getPackage_OwnedStereotype()

getOwnedStereotype

Stereotype getOwnedStereotype(java.lang.String name)
Retrieves the first Stereotype with the specified 'Name' from the 'Owned Stereotype' reference list.

Parameters:
name - The 'Name' of the Stereotype to retrieve, or null.
Returns:
The first Stereotype with the specified 'Name', or null.
See Also:
getOwnedStereotypes()

getOwnedStereotype

Stereotype getOwnedStereotype(java.lang.String name,
                              boolean ignoreCase)
Retrieves the first Stereotype with the specified 'Name' from the 'Owned Stereotype' reference list.

Parameters:
name - The 'Name' of the Stereotype to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first Stereotype with the specified 'Name', or null.
See Also:
getOwnedStereotypes()

getProfileApplications

org.eclipse.emf.common.util.EList<ProfileApplication> getProfileApplications()
Returns the value of the 'Profile Application' containment reference list. The list contents are of type ProfileApplication. It is bidirectional and its opposite is 'Applying Package'.

This feature subsets the following features:

References the ProfileApplications that indicate which profiles have been applied to the Package.

From package UML::Packages.

Returns:
the value of the 'Profile Application' containment reference list.
See Also:
UMLPackage.getPackage_ProfileApplication(), ProfileApplication.getApplyingPackage()

createProfileApplication

ProfileApplication createProfileApplication()
Creates a new ProfileApplication and appends it to the 'Profile Application' containment reference list.

Returns:
The new ProfileApplication.
See Also:
getProfileApplications()

validateElementsPublicOrPrivate

boolean validateElementsPublicOrPrivate(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                        java.util.Map<java.lang.Object,java.lang.Object> context)
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)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

createOwnedClass

Class createOwnedClass(java.lang.String name,
                       boolean isAbstract)
Creates a(n) (abstract) class with the specified name as an owned type of this package.

Parameters:
name - The name for the new class, or null.
isAbstract - Whether the new class should be abstract.

createOwnedEnumeration

Enumeration createOwnedEnumeration(java.lang.String name)
Creates a enumeration with the specified name as an owned type of this package.

Parameters:
name - The name for the new enumeration, or null.

createOwnedPrimitiveType

PrimitiveType createOwnedPrimitiveType(java.lang.String name)
Creates a primitive type with the specified name as an owned type of this package.

Parameters:
name - The name for the new primitive type, or null.

createOwnedStereotype

Stereotype createOwnedStereotype(java.lang.String name,
                                 boolean isAbstract)
Creates a(n) (abstract) stereotype with the specified name as an owned stereotype of this profile.

Parameters:
name - The name for the new stereotype, or null.
isAbstract - Whether the new stereotype should be abstract.

isProfileApplied

boolean isProfileApplied(Profile profile)
Determines whether the specified profile is applied to this package.

Parameters:
profile - The profile in question.

applyProfile

org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> applyProfile(Profile profile)
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).

Parameters:
profile - The profile to apply.

unapplyProfile

org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> unapplyProfile(Profile profile)
Unapplies the specified profile from this package and automatically unapplies stereotypes in the profile from elements within this package's namespace hieararchy.

Parameters:
profile - The profile to unapply.

allApplicableStereotypes

org.eclipse.emf.common.util.EList<Stereotype> 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() )

From package UML::Packages.


containingProfile

Profile 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)

From package UML::Packages.


getAppliedProfiles

org.eclipse.emf.common.util.EList<Profile> getAppliedProfiles()
Retrieves the profiles that are applied to this package.


getAppliedProfile

Profile getAppliedProfile(java.lang.String qualifiedName)
Retrieves the profile with the specified qualified name that is applied to this package, or null if no such profile is applied.

Parameters:
qualifiedName - The qualified name of the applied profile to retrieve.

getAppliedProfile

Profile getAppliedProfile(java.lang.String qualifiedName,
                          boolean recurse)
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.

Parameters:
qualifiedName - The qualified name of the applied profile to retrieve.
recurse - Whether to look in nesting packages.

getAllProfileApplications

org.eclipse.emf.common.util.EList<ProfileApplication> getAllProfileApplications()
Retrieves all the profile applications for this package, including profile applications for its nesting package(s).


getProfileApplication

ProfileApplication getProfileApplication(Profile profile)
Retrieves the application of the specified profile to this package, or null if no such profile is applied.

Parameters:
profile - The profile whose application to retrieve.

getProfileApplication

ProfileApplication getProfileApplication(Profile profile,
                                         boolean recurse)
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.

Parameters:
profile - The profile whose application to retrieve.
recurse - Whether to look in nesting packages.

createOwnedInterface

Interface createOwnedInterface(java.lang.String name)
Creates an interface with the specified name as an owned type of this package.

Parameters:
name - The name for the new interface, or null.

isModelLibrary

boolean isModelLibrary()
Determines whether this package is a model library.


getAllAppliedProfiles

org.eclipse.emf.common.util.EList<Profile> getAllAppliedProfiles()
Retrieves all the profiles that are applied to this package, including profiles applied to its nesting package(s).


visibleMembers

org.eclipse.emf.common.util.EList<PackageableElement> 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())

From package UML::Packages.


makesVisible

boolean makesVisible(NamedElement el)
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()))

From package UML::Packages.


Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.