blob: cc4253882b9d335dbfb7f95c82d3f3eab33ea4d0 [file] [log] [blame]
/*
* Copyright (c) 2005, 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: LinkAction.java,v 1.7 2006/12/14 15:49:28 khussey Exp $
*/
package org.eclipse.uml2.uml;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Link Action</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* LinkAction is an abstract class for all link actions that identify their links by the objects at the ends of the links and by the qualifiers at ends of the links.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.LinkAction#getEndData <em>End Data</em>}</li>
* <li>{@link org.eclipse.uml2.uml.LinkAction#getInputValues <em>Input Value</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getLinkAction()
* @model abstract="true"
* @generated
*/
public interface LinkAction
extends Action {
/**
* Returns the value of the '<em><b>End Data</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.LinkEndData}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Data identifying one end of a link by the objects on its ends and qualifiers.
* <!-- end-model-doc -->
* @return the value of the '<em>End Data</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getLinkAction_EndData()
* @model type="org.eclipse.uml2.uml.LinkEndData" containment="true" resolveProxies="true" lower="2" ordered="false"
* @generated
*/
EList<LinkEndData> getEndData();
/**
* Creates a new {@link org.eclipse.uml2.uml.LinkEndData} and appends it to the '<em><b>End Data</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.LinkEndData} to create.
* @return The new {@link org.eclipse.uml2.uml.LinkEndData}.
* @see #getEndData()
* @generated
*/
LinkEndData createEndData(EClass eClass);
/**
* Creates a new {@link org.eclipse.uml2.uml.LinkEndData} and appends it to the '<em><b>End Data</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return The new {@link org.eclipse.uml2.uml.LinkEndData}.
* @see #getEndData()
* @generated
*/
LinkEndData createEndData();
/**
* Returns the value of the '<em><b>Input Value</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.InputPin}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Pins taking end objects and qualifier values as input.
* <!-- end-model-doc -->
* @return the value of the '<em>Input Value</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getLinkAction_InputValue()
* @model type="org.eclipse.uml2.uml.InputPin" containment="true" resolveProxies="true" required="true" ordered="false"
* @generated
*/
EList<InputPin> getInputValues();
/**
* Creates a new {@link org.eclipse.uml2.uml.InputPin}, with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', and appends it to the '<em><b>Input Value</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.InputPin}, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' for the new {@link org.eclipse.uml2.uml.InputPin}, or <code>null</code>.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.InputPin} to create.
* @return The new {@link org.eclipse.uml2.uml.InputPin}.
* @see #getInputValues()
* @generated
*/
InputPin createInputValue(String name, Type type, EClass eClass);
/**
* Creates a new {@link org.eclipse.uml2.uml.InputPin}, with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', and appends it to the '<em><b>Input Value</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.InputPin}, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' for the new {@link org.eclipse.uml2.uml.InputPin}, or <code>null</code>.
* @return The new {@link org.eclipse.uml2.uml.InputPin}.
* @see #getInputValues()
* @generated
*/
InputPin createInputValue(String name, Type type);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.InputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Input Value</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.InputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.InputPin} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.InputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getInputValues()
* @generated
*/
InputPin getInputValue(String name, Type type);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.InputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Input Value</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.InputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.InputPin} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.InputPin} to retrieve, or <code>null</code>.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.InputPin} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.InputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getInputValues()
* @generated
*/
InputPin getInputValue(String name, Type type, boolean ignoreCase,
EClass eClass, boolean createOnDemand);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The association ends of the link end data must all be from the same association and include all and only the association ends of that association.
* self.endData->collect(end) = self.association()->collect(connection))
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSameAssociation(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The association ends of the link end data must not be static.
* self.endData->forall(end.oclisKindOf(NavigableEnd) implies end.isStatic = #false
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateNotStatic(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The input pins of the action are the same as the pins of the link end data and insertion pins.
* self.input->asSet() =
* let ledpins : Set = self.endData->collect(value) in
* if self.oclIsKindOf(LinkEndCreationData)
* then ledpins->union(self.endData.oclAsType(LinkEndCreationData).insertAt)
* else ledpins
*
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateSamePins(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The association operates on LinkAction. It returns the association of the action.
* result = self.endData->asSequence().first().end.association
* <!-- end-model-doc -->
* @model required="true" ordered="false"
* @generated
*/
Association association();
} // LinkAction