Description
ProfileApplication is a kind of PackageImport that adds the capability to state that a Profile is applied to a Package.
Attributes
No additional attributes.
Associations
importedProfile: Profile [1] |
References the Profiles that is applied to a Package through this ProfileApplication.. Sub- sets PackageImport::importedPackage. |
Constraints
No additional constraints.
Semantics
One or more profiles may be applied at will to a package that is created from the same metamodel that is extended by the
profile. Applying a profile means that it is allowed, but not necessarily required, to apply the stereotypes that are defined
as part of the profile. It is possible to apply multiple profiles to a package as long as they do not have conflicting
constraints. If a profile that is being applied depends on other profiles, then those profiles must be applied first.
When a profile is applied, instances of the appropriate stereotypes should be created for those elements that are instances
of metaclasses with required extensions. The model is not well-formed without these instances.
Once a profile has been applied to a package, it is allowed to remove the applied profile at will. Removing a profile
implies that all elements that are instances of elements defined in a profile are deleted. A profile that has been applied
cannot be removed unless other applied profiles that depend on it are first removed.
The removal of an applied profile leaves the instances of elements from the referenced metamodel intact. It is only the
instances of the elements from the profile that are deleted. This means that for example a profiled UML model can always
be interchanged with another tool that does not support the profile and be interpreted as a pure UML model.
Notation
The names of Profiles are shown using a dashed arrow with an open stick arrowhead from the package to the applied
profile. The keyword «apply» is shown near the arrow.
If multiple applied profiles have stereotypes with the same name, it may be necessary to qualify the name of the
stereotype (with the profile name).
Examples
Given the profiles Java and EJB, Figure 116 shows how these have been applied to the package WebShopping.