blob: fb0c052c388bb7d97c0c13fb304fe925b6f9ccd6 [file] [log] [blame]
/*
* Copyright (c) 2003, 2004 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: RedefinableElement.java,v 1.12 2005/06/02 15:02:47 khussey Exp $
*/
package org.eclipse.uml2;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Redefinable Element</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A redefinable element is a named element that can be redefined in the context of a generalization. RedefinableElement is an abstract metaclass.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.RedefinableElement#getRedefinitionContexts <em>Redefinition Context</em>}</li>
* <li>{@link org.eclipse.uml2.RedefinableElement#isLeaf <em>Is Leaf</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.UML2Package#getRedefinableElement()
* @model abstract="true"
* @generated
*/
public interface RedefinableElement extends NamedElement{
/**
* <!-- 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>Is Leaf</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Is Leaf</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Indicates whether it is possible to further specialize a RedefinableElement. If the value is true, then it is not possible to further specialize the RedefinableElement. Default value is false.
* <!-- end-model-doc -->
* @return the value of the '<em>Is Leaf</em>' attribute.
* @see #setIsLeaf(boolean)
* @see org.eclipse.uml2.UML2Package#getRedefinableElement_IsLeaf()
* @model default="false" dataType="org.eclipse.uml2.Boolean"
* @generated
*/
boolean isLeaf();
/**
* Sets the value of the '{@link org.eclipse.uml2.RedefinableElement#isLeaf <em>Is Leaf</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Leaf</em>' attribute.
* @see #isLeaf()
* @generated
*/
void setIsLeaf(boolean value);
/**
* Returns the value of the '<em><b>Redefinition Context</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.Classifier}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Redefinition Context</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* the contexts that this element may be redefined from. This is a derived union.
* <!-- end-model-doc -->
* @return the value of the '<em>Redefinition Context</em>' reference list.
* @see org.eclipse.uml2.UML2Package#getRedefinableElement_RedefinitionContext()
* @model type="org.eclipse.uml2.Classifier" transient="true" changeable="false" derived="true"
* @generated
*/
EList getRedefinitionContexts();
/**
* Retrieves the {@link org.eclipse.uml2.Classifier} with the specified '<em><b>Name</b></em>' from the '<em><b>Redefinition Context</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.Classifier} to retrieve.
* @return The {@link org.eclipse.uml2.Classifier} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getRedefinitionContexts()
* @generated
*/
Classifier getRedefinitionContext(String unqualifiedName);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A query based on the following OCL expression:
* <code>
* false
* </code>
* <!-- end-model-doc -->
* @model dataType="org.eclipse.uml2.Boolean"
* @generated
*/
boolean isConsistentWith(RedefinableElement redefinee);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A query based on the following OCL expression:
* <code>
* self.redefinitionContext->exists(c | redefinable.redefinitionContext->exists(r | c.allParents()->includes(r)))
* </code>
* <!-- end-model-doc -->
* @model dataType="org.eclipse.uml2.Boolean"
* @generated
*/
boolean isRedefinitionContextValid(RedefinableElement redefinable);
/**
* Returns the value of the '<em><b>Redefined Element</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.RedefinableElement}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* redefinable element that is being redefined by this element. This is a derived union.
* <!-- end-model-doc -->
* @return the value of the '<em>Redefined Element</em>' reference list.
* @see org.eclipse.uml2.UML2Package#getRedefinableElement_RedefinedElement()
* @model type="org.eclipse.uml2.RedefinableElement" transient="true" changeable="false" derived="true" ordered="false"
* @generated
*/
EList getRedefinedElements();
/**
* Retrieves the {@link org.eclipse.uml2.RedefinableElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Redefined Element</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.RedefinableElement} to retrieve.
* @return The {@link org.eclipse.uml2.RedefinableElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getRedefinedElements()
* @generated
*/
RedefinableElement getRedefinedElement(String name);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An invariant constraint based on the following OCL expression:
* <code>
* self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e))
* </code>
* <!-- end-model-doc -->
* @model dataType="org.eclipse.uml2.Boolean"
* @generated
*/
boolean validateRedefinitionContextValid(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An invariant constraint based on the following OCL expression:
* <code>
* self.redefinedElement->forAll(re | re.isConsistentWith(self))
* </code>
* <!-- end-model-doc -->
* @model dataType="org.eclipse.uml2.Boolean"
* @generated
*/
boolean validateRedefinitionConsistent(DiagnosticChain diagnostics, Map context);
} // RedefinableElement