Software Disclaimer

Class UML 2.4.1::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: DirectedRelationship

Direct Subclasses:

Class Precedence List: ElementImport, DirectedRelationship, Relationship, Element

Properties:

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.
{readonly}
Derived union with sources: (target, source, importingNamespace, importedElement)

ownedComment : Comment (0 *); -- source Element
ownedElement : Element (0 *); -- source Element
owner : Element (0 1); -- source Element

Constraints:

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].