Class UML 2.5::Package
Description:
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.
Direct Superclasses: PackageableElement,
TemplateableElement,
NamespaceDirect Subclasses: Profile,
ModelClass Precedence List: Package,
PackageableElement,
ParameterableElement,
TemplateableElement,
Namespace,
NamedElement,
ElementProperties:
![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
URI : String (0 1); -- source
Package![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
nestedPackage :
Package (0 *); -- source
Package![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
nestingPackage :
Package (0 1); -- source
Package![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
ownedStereotype :
Stereotype (0 *); -- source
Package![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
ownedType :
Type (0 *); -- source
Package![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
packageMerge :
PackageMerge (0 *); -- source
Package![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
packagedElement :
PackageableElement (0 *); -- source
Package![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
profileApplication :
ProfileApplication (0 *); -- source
Package![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
visibility :
VisibilityKind (0 1); -- source
PackageableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
owningTemplateParameter :
TemplateParameter (0 1); -- source
ParameterableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
templateParameter :
TemplateParameter (0 1); -- source
ParameterableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
ownedTemplateSignature :
TemplateSignature (0 1); -- source
TemplateableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
templateBinding :
TemplateBinding (0 *); -- source
TemplateableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
elementImport :
ElementImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
importedMember :
PackageableElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
member :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
ownedMember :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
ownedRule :
Constraint (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
packageImport :
PackageImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
clientDependency :
Dependency (0 *); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
name : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
nameExpression :
StringExpression (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
namespace :
Namespace (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
qualifiedName : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
ownedComment :
Comment (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
ownedElement :
Element (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=86081%3AECE2D39B37E5149FFDFF6BE940532EE4)
owner :
Element (0 1); -- source
ElementConstraints:
Signature: CMOF_14_3_9() : Boolean;
Description: [9] A CMOF metamodel is restricted to use the concrete metaclasses from UML's Kernel
The OCL used here is not normative.Editor's notes: not investigated
Expression: self->closure(ownedElement)->forAll(e | e.isWithinCMOFSubset())
Original: self->closure(ownedElement)->forAll(e | e.Element::isWithinCMOFSubset())
Operations:
Signature: visibleMembers() : PackageableElement;
Description: The query visibleMembers() defines which members of a Package can be accessed
outside it.
Expression: result = (member->select( m | m.oclIsKindOf(PackageableElement) and self.makesVisible(m))->collect(oclAsType(PackageableElement))->asSet())
Signature: ownedType.1() : Type;
Description: Derivation for Package::/ownedType
Expression: result = (packagedElement->select(oclIsKindOf(Type))->collect(oclAsType(Type))->asSet())
Signature: ownedStereotype.1() : Stereotype;
Description: Derivation for Package::/ownedStereotype
Expression: result = (packagedElement->select(oclIsKindOf(Stereotype))->collect(oclAsType(Stereotype))->asSet())
Signature: nestedPackage.1() : Package;
Description: Derivation for Package::/nestedPackage
Expression: result = (packagedElement->select(oclIsKindOf(Package))->collect(oclAsType(Package))->asSet())
Signature: mustBeOwned() : Boolean;
Description: The query mustBeOwned() indicates whether elements of this type must have
an owner.
Expression: result = (false)
Signature: makesVisible(el : NamedElement; ) : Boolean;
Description: 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.
Expression: 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()))
Signature: containingProfile() : Profile;
Description: The query containingProfile() returns the closest profile directly or indirectly
containing this package (or this package itself, if it is a profile).
The OCL used here is not normative.Editor's notes: Call recursive on namespace (which may be a Profile) not on namepsace.oslAsType(Package).
Requires change to the Profile method also.
Expression: if self.oclIsKindOf(Profile)
then self.oclAsType(Profile)
else self.namespace.containingProfile()
endif
Original: result = (if self.oclIsKindOf(Profile) then self.oclAsType(Profile) else self.namespace.oclAsType(Package).containingProfile() endif)
Signature: allApplicableStereotypes() : Stereotype;
Description: The query allApplicableStereotypes() returns all the directly or indirectly
owned stereotypes, including stereotypes contained in sub-profiles.
Expression: result = (let ownedPackages : Bag(Package) = ownedMember->select(oclIsKindOf(Package))->collect(oclAsType(Package)) in ownedStereotype->union(ownedPackages.allApplicableStereotypes())->flatten()->asSet() )
Send questions or comments to
[email protected].