Software Disclaimer

Class UML 2.5::ElementImport

Description:

An ElementImport identifies a NamedElement in a Namespace other than the one that owns that NamedElement and allows the NamedElement to be referenced using an unqualified name in the Namespace owning the ElementImport.

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

Specifies the visibility of the imported PackageableElement within the importingNamespace, i.e., whether the importedElement will in turn be visible to other Namespaces. If the ElementImport is public, the importedElement will be visible outside the importingNamespace while, if the ElementImport is private, it will not.
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

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()

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 alias->notEmpty() then alias else importedElement.name endif)



Send questions or comments to [email protected].