Package com.sodius.mdw.metamodel.uml21
Interface Package
-
- All Superinterfaces:
Comparable<Object>,Element,org.eclipse.emf.ecore.EModelElement,org.eclipse.emf.ecore.EObject,MDWEObject,MDWObject,NamedElement,Namespace,org.eclipse.emf.common.notify.Notifier,PackageableElement,ParameterableElement,TemplateableElement
public interface Package extends Namespace, PackageableElement, TemplateableElement
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:
- See Also:
UMLPackage.getPackage()
-
-
Field Summary
-
Fields inherited from interface com.sodius.mdw.metamodel.uml21.NamedElement
SEPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.MDWEList<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.PackagecreateNestedPackage(String name)Creates a newPackage, with the specified 'Name', and appends it to the ' Nested Package' reference list.PackagecreateNestedPackage(String name, org.eclipse.emf.ecore.EClass eClass)Creates a newPackage, with the specified 'Name', and appends it to the ' Nested Package' reference list.ClasscreateOwnedClass(String name, boolean isAbstract)Creates a(n) (abstract) class with the specified name as an owned type of this package.EnumerationcreateOwnedEnumeration(String name)Creates a enumeration with the specified name as an owned type of this package.InterfacecreateOwnedInterface(String name)Creates an interface with the specified name as an owned type of this package.PrimitiveTypecreateOwnedPrimitiveType(String name)Creates a primitive type with the specified name as an owned type of this package.TypecreateOwnedType(String name, org.eclipse.emf.ecore.EClass eClass)Creates a newType, with the specified 'Name', and appends it to the ' Owned Type' reference list.PackageableElementcreatePackagedElement(String name, org.eclipse.emf.ecore.EClass eClass)Creates a newPackageableElement, with the specified 'Name', and appends it to the ' Packaged Element' containment reference list.PackageMergecreatePackageMerge(Package mergedPackage)Creates a newPackageMerge, with the specified 'Merged Package', and appends it to the ' Package Merge' containment reference list.ProfileApplicationcreateProfileApplication()Creates a newProfileApplicationand appends it to the 'Profile Application' containment reference list.MDWEList<Profile>getAllAppliedProfiles()Retrieves all the profiles that are applied to this package, including profiles applied to its nesting package(s).MDWEList<ProfileApplication>getAllProfileApplications()Retrieves all the profile applications for this package, including profile applications for its nesting package(s).ProfilegetAppliedProfile(String qualifiedName)Retrieves the profile with the specified qualified name that is applied to this package, or null if no such profile is applied.ProfilegetAppliedProfile(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.MDWEList<Profile>getAppliedProfiles()Retrieves the profiles that are applied to this package.PackagegetNestedPackage(String name)Retrieves the firstPackagewith the specified 'Name' from the ' Nested Package' reference list.PackagegetNestedPackage(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)Retrieves the firstPackagewith the specified 'Name' from the ' Nested Package' reference list.MDWEList<Package>getNestedPackages()Returns the value of the 'Nested Package' reference list.PackagegetNestingPackage()Returns the value of the 'Nesting Package' reference.TypegetOwnedType(String name)Retrieves the firstTypewith the specified 'Name' from the 'Owned Type' reference list.TypegetOwnedType(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)Retrieves the firstTypewith the specified 'Name' from the 'Owned Type' reference list.MDWEList<Type>getOwnedTypes()Returns the value of the 'Owned Type' reference list.PackageableElementgetPackagedElement(String name)Retrieves the firstPackageableElementwith the specified 'Name' from the ' Packaged Element' containment reference list.PackageableElementgetPackagedElement(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)Retrieves the firstPackageableElementwith the specified 'Name' from the ' Packaged Element' containment reference list.MDWEList<PackageableElement>getPackagedElements()Returns the value of the 'Packaged Element' containment reference list.PackageMergegetPackageMerge(Package mergedPackage)Retrieves the firstPackageMergewith the specified 'Merged Package' from the ' Package Merge' containment reference list.PackageMergegetPackageMerge(Package mergedPackage, boolean createOnDemand)Retrieves the firstPackageMergewith the specified 'Merged Package' from the ' Package Merge' containment reference list.MDWEList<PackageMerge>getPackageMerges()Returns the value of the 'Package Merge' containment reference list.ProfileApplicationgetProfileApplication(Profile profile)Retrieves the application of the specified profile to this package, or null if no such profile is applied.ProfileApplicationgetProfileApplication(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.MDWEList<ProfileApplication>getProfileApplications()Returns the value of the 'Profile Application' containment reference list.booleanisModelLibrary()Determines whether this package is a model library.booleanisProfileApplied(Profile profile)Determines whether the specified profile is applied to this package.booleanmakesVisible(NamedElement el)The query makesVisible() defines whether a Package makes an element visible outside itself.voidsetNestingPackage(Package value)Sets the value of the 'Nesting Package' reference.MDWEList<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.booleanvalidateElementsPublicOrPrivate(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)If an element that is owned by a package has visibility, it is public or private.MDWEList<PackageableElement>visibleMembers()The query visibleMembers() defines which members of a Package can be accessed outside it.-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.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 com.sodius.mdw.core.model.MDWObject
compareTo, eExtendedClass, eIsInstanceOf, eIsInstanceOf, eIsProfiled, eIsRemoved, eMetamodel, eMetaTypeName, eModel, eRemove, eSetUniqueID, eUniqueID, superScript, superScript, toBoolean, toBoolean, toByte, toByte, toChar, toChar, toDouble, toDouble, toFloat, toFloat, toInt, toInt, toList, toList, toList, toList, toList, toLong, toLong, toObject, toObject, toSet, toSet, toShort, toShort, toString, toString
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.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 com.sodius.mdw.metamodel.uml21.Namespace
createElementImport, createElementImport, createOwnedDiagram, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedDiagrams, getOwnedDiagrams, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable
-
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature
-
-
-
-
Method Detail
-
getPackageMerges
MDWEList<PackageMerge> getPackageMerges()
Returns the value of the 'Package Merge' containment reference list. The list contents are of typePackageMerge. It is bidirectional and its opposite is 'Receiving Package'. References the PackageMerges that are owned by this Package.- Returns:
- the value of the 'Package Merge' containment reference list.
- See Also:
UMLPackage.getPackage_PackageMerge(),PackageMerge.getReceivingPackage()
-
createPackageMerge
PackageMerge createPackageMerge(Package mergedPackage)
Creates a newPackageMerge, with the specified 'Merged Package', and appends it to the ' Package Merge' containment reference list.- Parameters:
mergedPackage- The 'Merged Package' for the newPackageMerge, ornull.- Returns:
- The new
PackageMerge. - See Also:
getPackageMerges()
-
getPackageMerge
PackageMerge getPackageMerge(Package mergedPackage)
Retrieves the firstPackageMergewith the specified 'Merged Package' from the ' Package Merge' containment reference list.- Parameters:
mergedPackage- The 'Merged Package' of thePackageMergeto retrieve, ornull.- Returns:
- The first
PackageMergewith the specified 'Merged Package', ornull. - See Also:
getPackageMerges()
-
getPackageMerge
PackageMerge getPackageMerge(Package mergedPackage, boolean createOnDemand)
Retrieves the firstPackageMergewith the specified 'Merged Package' from the ' Package Merge' containment reference list.- Parameters:
mergedPackage- The 'Merged Package' of thePackageMergeto retrieve, ornull.createOnDemand- Whether to create aPackageMergeon demand if not found.- Returns:
- The first
PackageMergewith the specified 'Merged Package', ornull. - See Also:
getPackageMerges()
-
getPackagedElements
MDWEList<PackageableElement> getPackagedElements()
Returns the value of the 'Packaged Element' containment reference list. The list contents are of typePackageableElement. Specifies the packageable elements that are owned by this Package.- Returns:
- the value of the 'Packaged Element' containment reference list.
- See Also:
UMLPackage.getPackage_PackagedElement()
-
createPackagedElement
PackageableElement createPackagedElement(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newPackageableElement, with the specified 'Name', and appends it to the ' Packaged Element' containment reference list.- Parameters:
name- The 'Name' for the newPackageableElement, ornull.eClass- The Ecore class of thePackageableElementto create.- Returns:
- The new
PackageableElement. - See Also:
getPackagedElements()
-
getPackagedElement
PackageableElement getPackagedElement(String name)
Retrieves the firstPackageableElementwith the specified 'Name' from the ' Packaged Element' containment reference list.- Parameters:
name- The 'Name' of thePackageableElementto retrieve, ornull.- Returns:
- The first
PackageableElementwith the specified 'Name', ornull. - See Also:
getPackagedElements()
-
getPackagedElement
PackageableElement getPackagedElement(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
Retrieves the firstPackageableElementwith the specified 'Name' from the ' Packaged Element' containment reference list.- Parameters:
name- The 'Name' of thePackageableElementto retrieve, ornull.ignoreCase- Whether to ignore case inStringcomparisons.eClass- The Ecore class of thePackageableElementto retrieve, ornull.createOnDemand- Whether to create aPackageableElementon demand if not found.- Returns:
- The first
PackageableElementwith the specified 'Name', ornull. - See Also:
getPackagedElements()
-
getOwnedTypes
MDWEList<Type> getOwnedTypes()
Returns the value of the 'Owned Type' reference list. The list contents are of typeType. It is bidirectional and its opposite is 'Package'. References the packaged elements that are Types.- Returns:
- the value of the 'Owned Type' reference list.
- See Also:
UMLPackage.getPackage_OwnedType(),Type.getPackage()
-
createOwnedType
Type createOwnedType(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newType, with the specified 'Name', and appends it to the ' Owned Type' reference list.- Parameters:
name- The 'Name' for the newType, ornull.eClass- The Ecore class of theTypeto create.- Returns:
- The new
Type. - See Also:
getOwnedTypes()
-
getOwnedType
Type getOwnedType(String name)
Retrieves the firstTypewith the specified 'Name' from the 'Owned Type' reference list.- Parameters:
name- The 'Name' of theTypeto retrieve, ornull.- Returns:
- The first
Typewith the specified 'Name', ornull. - See Also:
getOwnedTypes()
-
getOwnedType
Type getOwnedType(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
Retrieves the firstTypewith the specified 'Name' from the 'Owned Type' reference list.- Parameters:
name- The 'Name' of theTypeto retrieve, ornull.ignoreCase- Whether to ignore case inStringcomparisons.eClass- The Ecore class of theTypeto retrieve, ornull.createOnDemand- Whether to create aTypeon demand if not found.- Returns:
- The first
Typewith the specified 'Name', ornull. - See Also:
getOwnedTypes()
-
getNestedPackages
MDWEList<Package> getNestedPackages()
Returns the value of the 'Nested Package' reference list. The list contents are of typePackage. It is bidirectional and its opposite is 'Nesting Package'. References the packaged elements that are Packages.- Returns:
- the value of the 'Nested Package' reference list.
- See Also:
UMLPackage.getPackage_NestedPackage(),getNestingPackage()
-
createNestedPackage
Package createNestedPackage(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newPackage, with the specified 'Name', and appends it to the ' Nested Package' reference list.- Parameters:
name- The 'Name' for the newPackage, ornull.eClass- The Ecore class of thePackageto create.- Returns:
- The new
Package. - See Also:
getNestedPackages()
-
getNestedPackage
Package getNestedPackage(String name)
Retrieves the firstPackagewith the specified 'Name' from the ' Nested Package' reference list.- Parameters:
name- The 'Name' of thePackageto retrieve, ornull.- Returns:
- The first
Packagewith the specified 'Name', ornull. - See Also:
getNestedPackages()
-
getNestedPackage
Package getNestedPackage(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
Retrieves the firstPackagewith the specified 'Name' from the ' Nested Package' reference list.- Parameters:
name- The 'Name' of thePackageto retrieve, ornull.ignoreCase- Whether to ignore case inStringcomparisons.eClass- The Ecore class of thePackageto retrieve, ornull.createOnDemand- Whether to create aPackageon demand if not found.- Returns:
- The first
Packagewith the specified 'Name', ornull. - See Also:
getNestedPackages()
-
getNestingPackage
Package getNestingPackage()
Returns the value of the 'Nesting Package' reference. It is bidirectional and its opposite is 'Nested Package'. References the Package that owns this Package.- 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()
-
getProfileApplications
MDWEList<ProfileApplication> getProfileApplications()
Returns the value of the 'Profile Application' containment reference list. The list contents are of typeProfileApplication. It is bidirectional and its opposite is 'Applying Package'. References the ProfileApplications that indicate which profiles have been applied to the Package.- Returns:
- the value of the 'Profile Application' containment reference list.
- See Also:
UMLPackage.getPackage_ProfileApplication(),ProfileApplication.getApplyingPackage()
-
createProfileApplication
ProfileApplication createProfileApplication()
Creates a newProfileApplicationand 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, Map context)If an element that is owned by a package has visibility, it is public or private. self.ownedElements->forAll(e | e.visibility->notEmpty() implies e.visbility = #public or e.visibility = #private)
-
createNestedPackage
Package createNestedPackage(String name)
Creates a newPackage, with the specified 'Name', and appends it to the ' Nested Package' reference list.- Parameters:
name- The 'Name' for the newPackage, ornull.- Returns:
- The new
Package. - See Also:
getNestedPackages()
-
createOwnedClass
Class createOwnedClass(String name, boolean isAbstract)
Creates a(n) (abstract) class with the specified name as an owned type of this package.
-
createOwnedEnumeration
Enumeration createOwnedEnumeration(String name)
Creates a enumeration with the specified name as an owned type of this package.
-
createOwnedPrimitiveType
PrimitiveType createOwnedPrimitiveType(String name)
Creates a primitive type with the specified name as an owned type of this package.
-
isProfileApplied
boolean isProfileApplied(Profile profile)
Determines whether the specified profile is applied to this package.
-
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.
-
applyProfile
MDWEList<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).
-
unapplyProfile
MDWEList<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.
-
getAppliedProfiles
MDWEList<Profile> getAppliedProfiles()
Retrieves the profiles that are applied to this package.
-
getAppliedProfile
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.
-
getAppliedProfile
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.
-
getAllProfileApplications
MDWEList<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.
-
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.
-
createOwnedInterface
Interface createOwnedInterface(String name)
Creates an interface with the specified name as an owned type of this package.
-
isModelLibrary
boolean isModelLibrary()
Determines whether this package is a model library.
-
getAllAppliedProfiles
MDWEList<Profile> getAllAppliedProfiles()
Retrieves all the profiles that are applied to this package, including profiles applied to its nesting package(s).
-
visibleMembers
MDWEList<PackageableElement> visibleMembers()
The query visibleMembers() defines which members of a Package can be accessed outside it. result = member->select( m | self.makesVisible(m))
-
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. self.member->includes(el) result = (ownedMember->includes(el)) or (elementImport->select(ei|ei.importedElement = #public)->collect(ei|ei.importedElement)->includes(el)) or (packageImport->select(pi|pi.visibility = #public)->collect(pi|pi.importedPackage.member->includes(el))->notEmpty())
-
-