org.eclipse.uml2.uml
Interface ElementImport

All Superinterfaces:
DirectedRelationship, Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier, Relationship

public interface ElementImport
extends DirectedRelationship

A representation of the model object 'Element Import'. 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.

From package UML::CommonStructure.

The following features are supported:

See Also:
UMLPackage.getElementImport()

Method Summary
 java.lang.String getAlias()
          Returns the value of the 'Alias' attribute
 PackageableElement getImportedElement()
          Returns the value of the 'Imported Element' reference.
 Namespace getImportingNamespace()
          Returns the value of the 'Importing Namespace' container reference.
 java.lang.String getName()
          The query getName() returns the name under which the imported PackageableElement will be known in the importing namespace.
 VisibilityKind getVisibility()
          Returns the value of the 'Visibility' attribute.
 boolean isSetAlias()
          Returns whether the value of the 'Alias' attribute is set
 void setAlias(java.lang.String value)
          Sets the value of the 'Alias' attribute
 void setImportedElement(PackageableElement value)
          Sets the value of the 'Imported Element' reference
 void setImportingNamespace(Namespace value)
          Sets the value of the 'Importing Namespace' container reference
 void setVisibility(VisibilityKind value)
          Sets the value of the 'Visibility' attribute
 void unsetAlias()
          Unsets the value of the 'Alias' attribute
 boolean validateImportedElementIsPublic(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          An importedElement has either public visibility or no visibility at all.
 boolean validateVisibilityPublicOrPrivate(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The visibility of an ElementImport is either public or private.
 
Methods inherited from interface org.eclipse.uml2.uml.DirectedRelationship
getSources, getTargets
 
Methods inherited from interface org.eclipse.uml2.uml.Relationship
getRelatedElements
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getVisibility

VisibilityKind getVisibility()
Returns the value of the 'Visibility' attribute. The default value is "public". The literals are from the enumeration VisibilityKind. 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.

From package UML::CommonStructure.

Returns:
the value of the 'Visibility' attribute.
See Also:
VisibilityKind, setVisibility(VisibilityKind), UMLPackage.getElementImport_Visibility()

setVisibility

void setVisibility(VisibilityKind value)
Sets the value of the 'Visibility' attribute.

Parameters:
value - the new value of the 'Visibility' attribute.
See Also:
VisibilityKind, getVisibility()

getAlias

java.lang.String getAlias()
Returns the value of the 'Alias' attribute. Specifies the name that should be added to the importing Namespace in lieu of the name of the imported PackagableElement. The alias must not clash with any other member in the importing Namespace. By default, no alias is used.

From package UML::CommonStructure.

Returns:
the value of the 'Alias' attribute.
See Also:
isSetAlias(), unsetAlias(), setAlias(String), UMLPackage.getElementImport_Alias()

setAlias

void setAlias(java.lang.String value)
Sets the value of the 'Alias' attribute.

Parameters:
value - the new value of the 'Alias' attribute.
See Also:
isSetAlias(), unsetAlias(), getAlias()

unsetAlias

void unsetAlias()
Unsets the value of the 'Alias' attribute.

See Also:
isSetAlias(), getAlias(), setAlias(String)

isSetAlias

boolean isSetAlias()
Returns whether the value of the 'Alias' attribute is set.

Returns:
whether the value of the 'Alias' attribute is set.
See Also:
unsetAlias(), getAlias(), setAlias(String)

getImportedElement

PackageableElement getImportedElement()
Returns the value of the 'Imported Element' reference.

This feature subsets the following features:

Specifies the PackageableElement whose name is to be added to a Namespace.

From package UML::CommonStructure.

Returns:
the value of the 'Imported Element' reference.
See Also:
setImportedElement(PackageableElement), UMLPackage.getElementImport_ImportedElement()

setImportedElement

void setImportedElement(PackageableElement value)
Sets the value of the 'Imported Element' reference.

Parameters:
value - the new value of the 'Imported Element' reference.
See Also:
getImportedElement()

getImportingNamespace

Namespace getImportingNamespace()
Returns the value of the 'Importing Namespace' container reference. It is bidirectional and its opposite is 'Element Import'.

This feature subsets the following features:

Specifies the Namespace that imports a PackageableElement from another Namespace.

From package UML::CommonStructure.

Returns:
the value of the 'Importing Namespace' container reference.
See Also:
setImportingNamespace(Namespace), UMLPackage.getElementImport_ImportingNamespace(), Namespace.getElementImports()

setImportingNamespace

void setImportingNamespace(Namespace value)
Sets the value of the 'Importing Namespace' container reference.

Parameters:
value - the new value of the 'Importing Namespace' container reference.
See Also:
getImportingNamespace()

validateVisibilityPublicOrPrivate

boolean validateVisibilityPublicOrPrivate(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)
The visibility of an ElementImport is either public or private. visibility = VisibilityKind::public or visibility = VisibilityKind::private

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateImportedElementIsPublic

boolean validateImportedElementIsPublic(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                        java.util.Map<java.lang.Object,java.lang.Object> context)
An importedElement has either public visibility or no visibility at all. importedElement.visibility <> null implies importedElement.visibility = VisibilityKind::public

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

getName

java.lang.String getName()
The query getName() returns the name under which the imported PackageableElement will be known in the importing namespace. result = (if alias->notEmpty() then alias else importedElement.name endif)

From package UML::CommonStructure.


Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.