Software Disclaimer

Class UML 2.3::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
source : Element (1 *); -- source DirectedRelationship
target : Element (1 *); -- source DirectedRelationship
relatedElement : Element (1 *); -- source Relationship

Specifies the elements related by the Relationship.
Derived union with sources: (target, source, importingNamespace, importedElement)

ownedComment : Comment (0 *); -- source Element

The Comments owned by this element.
Subsets: Element.ownedElement

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