|
|||||||||||
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 a namespace for its members, and may contain other packages. Only packageable elements can be owned members of a package. By virtue of being a namespace, a package can import either individual members of other packages, or all the members of other packages. In addition a package can be merged with other packages.
The following features are supported:
Nested Package
Nesting Package
Owned Type
Owned Member
Package Merge
Applied Profile
Package Extension
UML2Package.getPackage()
Field Summary | |
static String |
copyright
|
Fields inherited from interface org.eclipse.uml2.NamedElement |
SEPARATOR |
Method Summary | |
void |
apply(Profile profile)
Applies the current version of the specified profile to this package; if a different version is already applied, automatically migrates any associated stereotype values on a "best effort" basis (matching classifiers and structural features by name). |
PackageableElement |
createOwnedMember(EClass eClass)
Creates a PackageableElement and appends it to the 'Owned Member' containment reference list |
PackageMerge |
createPackageExtension(EClass eClass)
Creates a PackageMerge and appends it to the 'Package Extension' containment reference list |
PackageMerge |
createPackageMerge(EClass eClass)
Creates a PackageMerge and appends it to the 'Package Merge' containment reference list |
Set |
getAllAppliedProfiles()
Retrieves the set of all profiles that are applied to this package, including profiles applied to its nesting package(s). |
EList |
getAppliedProfiles()
Returns the value of the 'Applied Profile' reference list. |
String |
getAppliedVersion(Profile profile)
Retrieves the version of the specified profile that is applied to this package or (one of) its nesting package(s). |
Namespace |
getNamespace()
|
Package |
getNestedPackage(String unqualifiedName)
Retrieves the 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. |
EList |
getOwnedElements()
|
PackageableElement |
getOwnedMember(String unqualifiedName)
Retrieves the PackageableElement with the specified name from the 'Owned Member' containment reference list |
EList |
getOwnedMembers()
Returns the value of the 'Owned Member' containment reference list. |
Type |
getOwnedType(String unqualifiedName)
Retrieves the Type with the specified name from the 'Owned Type' reference list |
EList |
getOwnedTypes()
Returns the value of the 'Owned Type' reference list. |
EList |
getPackageExtensions()
Returns the value of the 'Package Extension' containment reference list. |
EList |
getPackageImports()
|
EList |
getPackageMerges()
Returns the value of the 'Package Merge' containment reference list. |
boolean |
isApplied(Profile profile)
Determines whether the specified profile is applied to this package. |
boolean |
makesVisible(NamedElement el)
A query based on the following OCL expression:
el.visibility->isEmpty() or el.visibility = #public
|
boolean |
mustBeOwned()
A query based on the following OCL expression:
false
|
void |
unapply(Profile profile)
Unapplies the specified profile from this package. |
boolean |
validateElementsPublicOrPrivate(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
self.ownedElements->forAll(e | e.visibility->notEmpty() implies e.visbility = #public or e.visibility = #private)
|
Set |
visibleMembers()
A query based on the following OCL expression:
member->select( m | self.makesVisible(m))
|
Methods inherited from interface org.eclipse.uml2.Namespace |
createElementImport, createOwnedRule, createPackageImport, excludeCollisions, getElementImports, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMembers, getNamesOfMember, getOwnedRule, getOwnedRules, importedMember, importElement, importMembers, importPackage, membersAreDistinguishable, validateImportedMemberDerived, validateMembersAreDistinguishable |
Methods inherited from interface org.eclipse.uml2.NamedElement |
allNamespaces, createNameExpression, getClientDependencies, getClientDependency, getName, getNameExpression, getOwner, getQualifiedName, getVisibility, isDistinguishableFrom, qualifiedName, separator, setName, setNameExpression, setVisibility, validateNoName, validateQualifiedName, validateVisibilityNeedsOwnership |
Methods inherited from interface org.eclipse.uml2.TemplateableElement |
createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBindings, parameterableElements, setOwnedTemplateSignature |
Methods inherited from interface org.eclipse.uml2.Element |
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getValue, hasKeyword, isApplied, isRequired, removeKeyword, setValue, unapply, 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, 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.PackageableElement |
getPackageableElement_visibility, getVisibility, setPackageableElement_visibility, setVisibility |
Methods inherited from interface org.eclipse.uml2.ParameterableElement |
getOwner, getOwningParameter, getTemplateParameter, setOwningParameter, setTemplateParameter |
Field Detail |
public static final String copyright
Method Detail |
public EList getNestedPackages()
Package
.
It is bidirectional and its opposite is 'Nesting Package
'.
If the meaning of the 'Nested Package' reference list isn't clear, there really should be more of a description here...
References the owned members that are Packages. Subsets Package::ownedMember.
UML2Package.getPackage_NestedPackage()
,
getNestingPackage()
public Package getNestedPackage(String unqualifiedName)
Package
with the specified name from the 'Nested Package' reference list.
unqualifiedName
- The unqualified name of the Package
to retrieve.
Package
with the specified name, or null
.getNestedPackages()
public Package getNestingPackage()
Nested Package
'.
If the meaning of the 'Nesting Package' reference isn't clear, there really should be more of a description here...
UML2Package.getPackage_NestingPackage()
,
getNestedPackages()
public EList getOwnedTypes()
Type
.
It is bidirectional and its opposite is 'Package
'.
If the meaning of the 'Owned Type' reference list isn't clear, there really should be more of a description here...
References the owned members that are Types. Subsets Package::ownedMember.
UML2Package.getPackage_OwnedType()
,
Type.getPackage()
public Type getOwnedType(String unqualifiedName)
Type
with the specified name from the 'Owned Type' reference list.
unqualifiedName
- The unqualified name of the Type
to retrieve.
Type
with the specified name, or null
.getOwnedTypes()
public EList getOwnedMembers()
PackageableElement
.
If the meaning of the 'Owned Member' containment reference list isn't clear, there really should be more of a description here...
Specifies the members that are owned by this Package. Redefines Namespace::ownedMember.
getOwnedMembers
in interface Namespace
UML2Package.getPackage_OwnedMember()
public PackageableElement getOwnedMember(String unqualifiedName)
PackageableElement
with the specified name from the 'Owned Member' containment reference list.
unqualifiedName
- The unqualified name of the PackageableElement
to retrieve.
PackageableElement
with the specified name, or null
.getOwnedMembers()
public PackageableElement createOwnedMember(EClass eClass)
PackageableElement
and appends it to the 'Owned Member' containment reference list.
eClass
- The Ecore class of the PackageableElement
to create.
PackageableElement
.getOwnedMembers()
public EList getPackageMerges()
PackageMerge
.
It is bidirectional and its opposite is 'Merging Package
'.
If the meaning of the 'Package Merge' containment reference list isn't clear, there really should be more of a description here...
UML2Package.getPackage_PackageMerge()
,
PackageMerge.getMergingPackage()
public PackageMerge createPackageMerge(EClass eClass)
PackageMerge
and appends it to the 'Package Merge' containment reference list.
eClass
- The Ecore class of the PackageMerge
to create.
PackageMerge
.getPackageMerges()
public EList getAppliedProfiles()
ProfileApplication
.
If the meaning of the 'Applied Profile' reference list isn't clear, there really should be more of a description here...
UML2Package.getPackage_AppliedProfile()
public boolean validateElementsPublicOrPrivate(DiagnosticChain diagnostics, Map context)
self.ownedElements->forAll(e | e.visibility->notEmpty() implies e.visbility = #public or e.visibility = #private)
public EList getPackageExtensions()
PackageMerge
.
If the meaning of the 'Package Extension' containment reference list isn't clear, there really should be more of a description here...
UML2Package.getPackage_PackageExtension()
public PackageMerge createPackageExtension(EClass eClass)
PackageMerge
and appends it to the 'Package Extension' containment reference list.
eClass
- The Ecore class of the PackageMerge
to create.
PackageMerge
.getPackageExtensions()
public boolean mustBeOwned()
false
mustBeOwned
in interface Element
public Set visibleMembers()
member->select( m | self.makesVisible(m))
public boolean makesVisible(NamedElement el)
el.visibility->isEmpty() or el.visibility = #public
public Namespace getNamespace()
getNamespace
in interface NamedElement
public EList getOwnedElements()
getOwnedElements
in interface Namespace
public EList getPackageImports()
getPackageImports
in interface Namespace
UML2Package.getNamespace_PackageImport()
,
PackageImport.getImportingNamespace()
public boolean isApplied(Profile profile)
profile
- The profile to test for application.
true
if the profile is applied to this package;
false
otherwise.public Set getAllAppliedProfiles()
public void apply(Profile profile)
profile
- The profile to be applied.
IllegalArgumentException
- If the profile is not defined or its current version is
already applied.public void unapply(Profile profile)
profile
- The profile to be unapplied.
IllegalArgumentException
- If the profile is not applied to this package.public String getAppliedVersion(Profile profile)
profile
- The profile whose applied version to retrieve.
null
if not
applied.
|
Copyright 2003, 2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |