|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A representation of the model object 'Package'. A package is used to group elements, and provides a namespace for the grouped elements. 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.
The following features are supported:
UMLPackage.getPackage()
Field Summary |
Fields inherited from interface org.eclipse.uml2.uml.NamedElement |
SEPARATOR |
Method Summary | |
EList |
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. |
Package |
createNestedPackage(String name)
Creates a new Package , with the specified 'Name', and appends it to the 'Nested Package' reference list |
Package |
createNestedPackage(String name,
EClass eClass)
Creates a new Package , with the specified 'Name', and appends it to the 'Nested Package' reference list |
Class |
createOwnedClass(String name,
boolean isAbstract)
Creates a(n) (abstract) class with the specified name as an owned type of this package |
Enumeration |
createOwnedEnumeration(String name)
Creates a enumeration with the specified name as an owned type of this package |
Interface |
createOwnedInterface(String name)
Creates an interface with the specified name as an owned type of this package |
PrimitiveType |
createOwnedPrimitiveType(String name)
Creates a primitive type with the specified name as an owned type of this package |
Type |
createOwnedType(String name,
EClass eClass)
Creates a new Type , with the specified 'Name', and appends it to the 'Owned Type' reference list |
PackageableElement |
createPackagedElement(String name,
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 |
EList |
getAllAppliedProfiles()
Retrieves all the profiles that are applied to this package, including profiles applied to its nesting package(s) |
EList |
getAllProfileApplications()
Retrieves all the profile applications for this package, including profile applications for its nesting package(s) |
Profile |
getAppliedProfile(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(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 |
EList |
getAppliedProfiles()
Retrieves the profiles that are applied to this package |
Package |
getNestedPackage(String name)
Retrieves the first Package with the specified 'Name' from the 'Nested Package' reference list |
Package |
getNestedPackage(String name,
boolean ignoreCase,
EClass eClass,
boolean createOnDemand)
Retrieves the first Package with the specified 'Name' from the 'Nested Package' reference list |
EList |
getNestedPackages()
Returns the value of the 'Nested Package' reference list. |
Package |
getNestingPackage()
Returns the value of the 'Nesting Package' reference. |
Type |
getOwnedType(String name)
Retrieves the first Type with the specified 'Name' from the 'Owned Type' reference list |
Type |
getOwnedType(String name,
boolean ignoreCase,
EClass eClass,
boolean createOnDemand)
Retrieves the first Type with the specified 'Name' from the 'Owned Type' reference list |
EList |
getOwnedTypes()
Returns the value of the 'Owned Type' reference list. |
PackageableElement |
getPackagedElement(String name)
Retrieves the first PackageableElement with the specified 'Name' from the 'Packaged Element' containment reference list |
PackageableElement |
getPackagedElement(String name,
boolean ignoreCase,
EClass eClass,
boolean createOnDemand)
Retrieves the first PackageableElement with the specified 'Name' from the 'Packaged Element' containment reference list |
EList |
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 |
EList |
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 |
EList |
getProfileApplications()
Returns the value of the 'Profile Application' containment reference list. |
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 |
EList |
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(DiagnosticChain diagnostics,
Map context)
If an element that is owned by a package has visibility, it is public or private. |
EList |
visibleMembers()
The query visibleMembers() defines which members of a Package can be accessed outside it. |
Methods inherited from interface org.eclipse.uml2.uml.NamedElement |
allNamespaces, allOwningPackages, createDependency, createNameExpression, 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.emf.ecore.EModelElement |
getEAnnotation, getEAnnotations |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, 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.ParameterableElement |
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter |
Methods inherited from interface org.eclipse.uml2.uml.TemplateableElement |
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature |
Method Detail |
public EList getPackageMerges()
PackageMerge
.
It is bidirectional and its opposite is 'Receiving Package
'.
References the PackageMerges that are owned by this Package.
UMLPackage.getPackage_PackageMerge()
,
PackageMerge.getReceivingPackage()
public PackageMerge createPackageMerge(Package mergedPackage)
PackageMerge
, with the specified 'Merged Package', and appends it to the 'Package Merge' containment reference list.
mergedPackage
- The 'Merged Package' for the new PackageMerge
, or null
.
PackageMerge
.Package.getPackageMerges()
public PackageMerge getPackageMerge(Package mergedPackage)
PackageMerge
with the specified 'Merged Package' from the 'Package Merge' containment reference list.
mergedPackage
- The 'Merged Package' of the PackageMerge
to retrieve, or null
.
PackageMerge
with the specified 'Merged Package', or null
.Package.getPackageMerges()
public PackageMerge getPackageMerge(Package mergedPackage, boolean createOnDemand)
PackageMerge
with the specified 'Merged Package' from the 'Package Merge' containment reference list.
mergedPackage
- The 'Merged Package' of the PackageMerge
to retrieve, or null
.createOnDemand
- Whether to create a PackageMerge
on demand if not found.
PackageMerge
with the specified 'Merged Package', or null
.Package.getPackageMerges()
public EList getPackagedElements()
PackageableElement
.
Specifies the packageable elements that are owned by this Package.
UMLPackage.getPackage_PackagedElement()
public PackageableElement createPackagedElement(String name, EClass eClass)
PackageableElement
, with the specified 'Name', and appends it to the 'Packaged Element' containment reference list.
name
- The 'Name' for the new PackageableElement
, or null
.eClass
- The Ecore class of the PackageableElement
to create.
PackageableElement
.Package.getPackagedElements()
public PackageableElement getPackagedElement(String name)
PackageableElement
with the specified 'Name' from the 'Packaged Element' containment reference list.
name
- The 'Name' of the PackageableElement
to retrieve, or null
.
PackageableElement
with the specified 'Name', or null
.Package.getPackagedElements()
public PackageableElement getPackagedElement(String name, boolean ignoreCase, EClass eClass, boolean createOnDemand)
PackageableElement
with the specified 'Name' from the 'Packaged Element' containment reference list.
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.
PackageableElement
with the specified 'Name', or null
.Package.getPackagedElements()
public EList getOwnedTypes()
Type
.
It is bidirectional and its opposite is 'Package
'.
References the packaged elements that are Types.
UMLPackage.getPackage_OwnedType()
,
Type.getPackage()
public Type createOwnedType(String name, EClass eClass)
Type
, with the specified 'Name', and appends it to the 'Owned Type' reference list.
name
- The 'Name' for the new Type
, or null
.eClass
- The Ecore class of the Type
to create.
Type
.Package.getOwnedTypes()
public Type getOwnedType(String name)
Type
with the specified 'Name' from the 'Owned Type' reference list.
name
- The 'Name' of the Type
to retrieve, or null
.
Type
with the specified 'Name', or null
.Package.getOwnedTypes()
public Type getOwnedType(String name, boolean ignoreCase, EClass eClass, boolean createOnDemand)
Type
with the specified 'Name' from the 'Owned Type' reference list.
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.
Type
with the specified 'Name', or null
.Package.getOwnedTypes()
public EList getNestedPackages()
Package
.
It is bidirectional and its opposite is 'Nesting Package
'.
References the packaged elements that are Packages.
UMLPackage.getPackage_NestedPackage()
,
Package.getNestingPackage()
public Package createNestedPackage(String name, EClass eClass)
Package
, with the specified 'Name', and appends it to the 'Nested Package' reference list.
name
- The 'Name' for the new Package
, or null
.eClass
- The Ecore class of the Package
to create.
Package
.Package.getNestedPackages()
public Package getNestedPackage(String name)
Package
with the specified 'Name' from the 'Nested Package' reference list.
name
- The 'Name' of the Package
to retrieve, or null
.
Package
with the specified 'Name', or null
.Package.getNestedPackages()
public Package getNestedPackage(String name, boolean ignoreCase, EClass eClass, boolean createOnDemand)
Package
with the specified 'Name' from the 'Nested Package' reference list.
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.
Package
with the specified 'Name', or null
.Package.getNestedPackages()
public Package getNestingPackage()
Nested Package
'.
References the Package that owns this Package.
Package.setNestingPackage(Package)
,
UMLPackage.getPackage_NestingPackage()
,
Package.getNestedPackages()
public void setNestingPackage(Package value)
Nesting Package
' reference.
value
- the new value of the 'Nesting Package' reference.Package.getNestingPackage()
public EList getProfileApplications()
ProfileApplication
.
It is bidirectional and its opposite is 'Applying Package
'.
References the ProfileApplications that indicate which profiles have been applied to the Package.
UMLPackage.getPackage_ProfileApplication()
,
ProfileApplication.getApplyingPackage()
public ProfileApplication createProfileApplication()
ProfileApplication
and appends it to the 'Profile Application' containment reference list.
ProfileApplication
.Package.getProfileApplications()
public boolean validateElementsPublicOrPrivate(DiagnosticChain diagnostics, Map context)
public Package createNestedPackage(String name)
Package
, with the specified 'Name', and appends it to the 'Nested Package' reference list.
name
- The 'Name' for the new Package
, or null
.
Package
.Package.getNestedPackages()
public Class createOwnedClass(String name, boolean isAbstract)
public Enumeration createOwnedEnumeration(String name)
public PrimitiveType createOwnedPrimitiveType(String name)
public boolean isProfileApplied(Profile profile)
public EList applyProfile(Profile profile)
public EList unapplyProfile(Profile profile)
public EList getAppliedProfiles()
public Profile getAppliedProfile(String qualifiedName)
public Profile getAppliedProfile(String qualifiedName, boolean recurse)
public EList getAllProfileApplications()
public ProfileApplication getProfileApplication(Profile profile)
public ProfileApplication getProfileApplication(Profile profile, boolean recurse)
public Interface createOwnedInterface(String name)
public boolean isModelLibrary()
public EList getAllAppliedProfiles()
public EList visibleMembers()
public boolean makesVisible(NamedElement el)
|
Copyright 2003, 2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |