Software Disclaimer

Class UML 2.4.1::ElementImport


An element import identifies an element in another package, and allows the element to be referenced using its name without a qualifier.

Direct Superclasses: DirectedRelationship

Direct Subclasses:

Class Precedence List: ElementImport, DirectedRelationship, Relationship, Element


alias : String (0 1); -- source ElementImport
importedElement : PackageableElement (1 1); -- source ElementImport
importingNamespace : Namespace (1 1); -- source ElementImport
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

source : Element (1 *); -- source DirectedRelationship
target : Element (1 *); -- source DirectedRelationship
relatedElement : Element (1 *); -- source Relationship
ownedComment : Comment (0 *); -- source Element
ownedElement : Element (0 *); -- source Element
owner : Element (0 1); -- source Element


Signature: CMOF_14_3_7b() : Boolean;
Description: see also: see also:
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


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 endif

Send questions or comments to