org.eclipse.uml2
Interface ElementImport

All Superinterfaces:
DirectedRelationship, Element, EModelElement, EObject, Notifier, Relationship

public interface ElementImport
extends DirectedRelationship

A representation of the model object 'Element Import'. An element import is defined as a directed relationship between an importing namespace and a packageable element. The name of the packageable element or its alias is to be added to the namespace of the importing namespace. It is also possible to control whether the imported element can be further imported.

The following features are supported:

See Also:
UML2Package.getElementImport()

Field Summary
static String copyright
           
 
Method Summary
 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.
 String getName()
           A query based on the following OCL expression: if self.alias->notEmpty() then self.alias else self.importedElement.name endif
 Element getOwner()
           
 EList getSources()
           
 EList getTargets()
           
 VisibilityKind getVisibility()
          Returns the value of the 'Visibility' attribute.
 void setAlias(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
 boolean validateImportedElementIsPublic(DiagnosticChain diagnostics, Map context)
           An invariant constraint based on the following OCL expression: self.importedElement.visibility.notEmpty() implies self.importedElement.visibility = #public
 boolean validateVisibilityPublicOrPrivate(DiagnosticChain diagnostics, Map context)
           An invariant constraint based on the following OCL expression: self.visibility = #public or self.visibility = #private
 
Methods inherited from interface org.eclipse.uml2.DirectedRelationship
getRelatedElements
 
Methods inherited from interface org.eclipse.uml2.Element
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getValue, hasKeyword, isApplied, isRequired, mustBeOwned, removeKeyword, setValue, unapply, 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, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Field Detail

copyright

public static final String copyright

See Also:
Constant Field Values
Method Detail

getVisibility

public VisibilityKind getVisibility()
Returns the value of the 'Visibility' attribute. The literals are from the enumeration VisibilityKind.

If the meaning of the 'Visibility' attribute isn't clear, there really should be more of a description here...

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.

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

setVisibility

public 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

public String getAlias()
Returns the value of the 'Alias' attribute. The default value is "".

If the meaning of the 'Alias' attribute isn't clear, there really should be more of a description here...

Specifies the name that should be added to the namespace of the importing Pack-age in lieu of the name of the imported PackagableElement. The aliased name must not clash with any other member name in the importing Package. By default, no alias is used.

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

setAlias

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

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

getImportedElement

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

If the meaning of the 'Imported Element' reference isn't clear, there really should be more of a description here...

Specifies the PackageableElement whose name is to be added to a Namespace. Subsets DirectedRelationship::target.

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

setImportedElement

public 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

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

If the meaning of the 'Importing Namespace' container reference isn't clear, there really should be more of a description here...

Specifies the Namespace that imports a PackageableElement from another Package. Subsets DirectedRelationship::source and Element::owner.

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

setImportingNamespace

public 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

public boolean validateVisibilityPublicOrPrivate(DiagnosticChain diagnostics,
                                                 Map context)
An invariant constraint based on the following OCL expression: self.visibility = #public or self.visibility = #private


validateImportedElementIsPublic

public boolean validateImportedElementIsPublic(DiagnosticChain diagnostics,
                                               Map context)
An invariant constraint based on the following OCL expression: self.importedElement.visibility.notEmpty() implies self.importedElement.visibility = #public


getName

public String getName()
A query based on the following OCL expression: if self.alias->notEmpty() then self.alias else self.importedElement.name endif


getTargets

public EList getTargets()

Specified by:
getTargets in interface DirectedRelationship
Returns:
the value of the 'Target' reference list.
See Also:
UML2Package.getDirectedRelationship_Target()

getSources

public EList getSources()

Specified by:
getSources in interface DirectedRelationship
Returns:
the value of the 'Source' reference list.
See Also:
UML2Package.getDirectedRelationship_Source()

getOwner

public Element getOwner()

Specified by:
getOwner in interface Element
Returns:
the value of the 'Owner' reference.
See Also:
UML2Package.getElement_Owner(), Element.getOwnedElements()

Copyright 2003, 2004 IBM Corporation and others.
All Rights Reserved.