Class UML 2.3::ElementImport
Description:
An element import identifies an element in another package, and allows
the element to be referenced using its name without a qualifier.
Direct Superclasses: DirectedRelationshipDirect Subclasses: Class Precedence List: ElementImport,
DirectedRelationship,
Relationship,
ElementProperties:
![](/se-interop/image/down-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
alias : String (0 1); -- source
ElementImport![](/se-interop/image/down-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
importedElement :
PackageableElement (1 1); -- source
ElementImport![](/se-interop/image/down-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
importingNamespace :
Namespace (1 1); -- source
ElementImport![](/se-interop/image/right-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
visibility :
VisibilityKind (1 1); -- source
ElementImport Specifies the visibility of the imported PackageableElement within the
importing Package. The default visibility is the same as that of the imported
element. If the imported element does not have a visibility, it is possible
to add visibility to the element import.
Default value: PUBLIC
![](/se-interop/image/right-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
source :
Element (1 *); -- source
DirectedRelationship Specifies the sources of the DirectedRelationship.
{
readonly}
Derived union with sources: (importingNamespace)
Subsets: Relationship.relatedElement
![](/se-interop/image/down-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
target :
Element (1 *); -- source
DirectedRelationship![](/se-interop/image/down-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
relatedElement :
Element (1 *); -- source
Relationship![](/se-interop/image/down-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
ownedComment :
Comment (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
ownedElement :
Element (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=129733%3A3CF2D79E778066DE15AA98E04183810E)
owner :
Element (0 1); -- source
ElementConstraints:
Signature: CMOF_14_3_7b() : Boolean;
Description: see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/element-import-is-not-public
see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/element-import-has-alias
Expression: visibility = VisibilityKind::public and alias->isEmpty()
Signature: visibility_public_or_private() : Boolean;
Description: The visibility of an ElementImport is either public or private.
Expression: self.visibility = #public or self.visibility = #private
Signature: imported_element_is_public() : Boolean;
Description: An importedElement has either public visibility or no visibility at all.
Expression: self.importedElement.visibility.notEmpty() implies self.importedElement.visibility = #public
Operations:
Signature: getName() : String;
Description: The query getName() returns the name under which the imported PackageableElement will be known in the importing namespace.
Expression: result = if self.alias->notEmpty() then
self.alias
else
self.importedElement.name
endif
Send questions or comments to
[email protected].