blob: 85f2f15f3a3baaf6d8774ef849d5f525b2810b0a [file] [log] [blame]
/*
* Copyright (c) 2003, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - initial API and implementation
*
* $Id: ElementImport.java,v 1.14 2006/05/26 18:16:52 khussey Exp $
*/
package org.eclipse.uml2;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Element Import</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* 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.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.ElementImport#getVisibility <em>Visibility</em>}</li>
* <li>{@link org.eclipse.uml2.ElementImport#getAlias <em>Alias</em>}</li>
* <li>{@link org.eclipse.uml2.ElementImport#getImportedElement <em>Imported Element</em>}</li>
* <li>{@link org.eclipse.uml2.ElementImport#getImportingNamespace <em>Importing Namespace</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.UML2Package#getElementImport()
* @model
* @generated
*/
public interface ElementImport extends DirectedRelationship {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String copyright = "Copyright (c) IBM Corporation and others."; //$NON-NLS-1$
/**
* Returns the value of the '<em><b>Visibility</b></em>' attribute.
* The literals are from the enumeration {@link org.eclipse.uml2.VisibilityKind}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Visibility</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* 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.
* <!-- end-model-doc -->
* @return the value of the '<em>Visibility</em>' attribute.
* @see org.eclipse.uml2.VisibilityKind
* @see #setVisibility(VisibilityKind)
* @see org.eclipse.uml2.UML2Package#getElementImport_Visibility()
* @model
* @generated
*/
VisibilityKind getVisibility();
/**
* Sets the value of the '{@link org.eclipse.uml2.ElementImport#getVisibility <em>Visibility</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Visibility</em>' attribute.
* @see org.eclipse.uml2.VisibilityKind
* @see #getVisibility()
* @generated
*/
void setVisibility(VisibilityKind value);
/**
* Returns the value of the '<em><b>Alias</b></em>' attribute.
* The default value is <code>""</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Alias</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* 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.
* <!-- end-model-doc -->
* @return the value of the '<em>Alias</em>' attribute.
* @see #setAlias(String)
* @see org.eclipse.uml2.UML2Package#getElementImport_Alias()
* @model default="" dataType="org.eclipse.uml2.String"
* @generated
*/
String getAlias();
/**
* Sets the value of the '{@link org.eclipse.uml2.ElementImport#getAlias <em>Alias</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Alias</em>' attribute.
* @see #getAlias()
* @generated
*/
void setAlias(String value);
/**
* Returns the value of the '<em><b>Imported Element</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Imported Element</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Specifies the PackageableElement whose name is to be added to a Namespace. Subsets DirectedRelationship::target.
* <!-- end-model-doc -->
* @return the value of the '<em>Imported Element</em>' reference.
* @see #setImportedElement(PackageableElement)
* @see org.eclipse.uml2.UML2Package#getElementImport_ImportedElement()
* @model required="true"
* @generated
*/
PackageableElement getImportedElement();
/**
* Sets the value of the '{@link org.eclipse.uml2.ElementImport#getImportedElement <em>Imported Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Imported Element</em>' reference.
* @see #getImportedElement()
* @generated
*/
void setImportedElement(PackageableElement value);
/**
* Returns the value of the '<em><b>Importing Namespace</b></em>' container reference.
* It is bidirectional and its opposite is '{@link org.eclipse.uml2.Namespace#getElementImports <em>Element Import</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Importing Namespace</em>' container reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Specifies the Namespace that imports a PackageableElement from another Package. Subsets DirectedRelationship::source and Element::owner.
* <!-- end-model-doc -->
* @return the value of the '<em>Importing Namespace</em>' container reference.
* @see #setImportingNamespace(Namespace)
* @see org.eclipse.uml2.UML2Package#getElementImport_ImportingNamespace()
* @see org.eclipse.uml2.Namespace#getElementImports
* @model opposite="elementImport" required="true"
* @generated
*/
Namespace getImportingNamespace();
/**
* Sets the value of the '{@link org.eclipse.uml2.ElementImport#getImportingNamespace <em>Importing Namespace</em>}' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Importing Namespace</em>' container reference.
* @see #getImportingNamespace()
* @generated
*/
void setImportingNamespace(Namespace value);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An invariant constraint based on the following OCL expression:
* <code>
* self.visibility = #public or self.visibility = #private
* </code>
* <!-- end-model-doc -->
* @model dataType="org.eclipse.uml2.Boolean"
* @generated
*/
boolean validateVisibilityPublicOrPrivate(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An invariant constraint based on the following OCL expression:
* <code>
* self.importedElement.visibility.notEmpty() implies self.importedElement.visibility = #public
* </code>
* <!-- end-model-doc -->
* @model dataType="org.eclipse.uml2.Boolean"
* @generated
*/
boolean validateImportedElementIsPublic(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A query based on the following OCL expression:
* <code>
* if self.alias->notEmpty() then
* self.alias
* else
* self.importedElement.name
* endif
* </code>
* <!-- end-model-doc -->
* @model kind="operation" dataType="org.eclipse.uml2.String"
* @generated
*/
String getName();
} // ElementImport