blob: 636a9b1ce97f32f36d2d3ac701b14ee85a62fdb5 [file] [log] [blame]
/*
* Copyright (c) 2005, 2018 IBM Corporation, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* IBM - initial API and implementation
* Kenn Hussey (CEA) - 327039, 418466, 451350
* Christian W. Damus (CEA) - 251963
* Kenn Hussey - 535301
*
*/
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>Unmarshall Action</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* An UnmarshallAction is an Action that retrieves the values of the StructuralFeatures of an object and places them on OutputPins.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.eclipse.uml2.uml.UnmarshallAction#getObject <em>Object</em>}</li>
* <li>{@link org.eclipse.uml2.uml.UnmarshallAction#getResults <em>Result</em>}</li>
* <li>{@link org.eclipse.uml2.uml.UnmarshallAction#getUnmarshallType <em>Unmarshall Type</em>}</li>
* </ul>
*
* @see org.eclipse.uml2.uml.UMLPackage#getUnmarshallAction()
* @model
* @generated
*/
public interface UnmarshallAction
extends Action {
/**
* Returns the value of the '<em><b>Result</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.OutputPin}.
* <p>
* This feature subsets the following features:
* </p>
* <ul>
* <li>'{@link org.eclipse.uml2.uml.Action#getOutputs() <em>Output</em>}'</li>
* </ul>
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The OutputPins on which are placed the values of the StructuralFeatures of the input object.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Result</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getUnmarshallAction_Result()
* @model containment="true" resolveProxies="true" required="true"
* @generated
*/
EList<OutputPin> getResults();
/**
* Creates a new {@link org.eclipse.uml2.uml.OutputPin}, with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', and appends it to the '<em><b>Result</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.OutputPin}, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' for the new {@link org.eclipse.uml2.uml.OutputPin}, or <code>null</code>.
* @return The new {@link org.eclipse.uml2.uml.OutputPin}.
* @see #getResults()
* @generated
*/
OutputPin createResult(String name, Type type);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Result</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.OutputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.OutputPin} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getResults()
* @generated
*/
OutputPin getResult(String name, Type type);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Result</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.OutputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.OutputPin} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.OutputPin} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getResults()
* @generated
*/
OutputPin getResult(String name, Type type, boolean ignoreCase,
boolean createOnDemand);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the '<em><b>Result</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.OutputPin} to retrieve, or <code>null</code>.
* @param type The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.OutputPin} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @return The first {@link org.eclipse.uml2.uml.OutputPin} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
* @see #getResults()
* @generated NOT
*/
OutputPin getResult(String name, Type type, boolean ignoreCase);
/**
* Returns the value of the '<em><b>Unmarshall Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The type of the object to be unmarshalled.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Unmarshall Type</em>' reference.
* @see #setUnmarshallType(Classifier)
* @see org.eclipse.uml2.uml.UMLPackage#getUnmarshallAction_UnmarshallType()
* @model required="true" ordered="false"
* @generated
*/
Classifier getUnmarshallType();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.UnmarshallAction#getUnmarshallType <em>Unmarshall Type</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Unmarshall Type</em>' reference.
* @see #getUnmarshallType()
* @generated
*/
void setUnmarshallType(Classifier value);
/**
* Returns the value of the '<em><b>Object</b></em>' containment reference.
* <p>
* This feature subsets the following features:
* </p>
* <ul>
* <li>'{@link org.eclipse.uml2.uml.Action#getInputs() <em>Input</em>}'</li>
* </ul>
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The InputPin that gives the object to be unmarshalled.
* <p>From package UML::Actions.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Object</em>' containment reference.
* @see #setObject(InputPin)
* @see org.eclipse.uml2.uml.UMLPackage#getUnmarshallAction_Object()
* @model containment="true" resolveProxies="true" required="true" ordered="false"
* @generated
*/
InputPin getObject();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.UnmarshallAction#getObject <em>Object</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Object</em>' containment reference.
* @see #getObject()
* @generated
*/
void setObject(InputPin value);
/**
* Creates a new {@link org.eclipse.uml2.uml.InputPin}, with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', and sets the '<em><b>Object</b></em>' containment reference.
* <!-- 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 #getObject()
* @generated
*/
InputPin createObject(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 sets the '<em><b>Object</b></em>' containment reference.
* <!-- 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 #getObject()
* @generated
*/
InputPin createObject(String name, Type type);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The multiplicity of the object InputPin is 1..1
* object.is(1,1)
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateMultiplicityOfObject(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The type of the object InputPin conform to the unmarshallType.
* object.type.conformsTo(unmarshallType)
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateObjectType(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The number of result outputPins must be the same as the number of attributes of the unmarshallType.
* unmarshallType.allAttributes()->size() = result->size()
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateNumberOfResult(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The type, ordering and multiplicity of each attribute of the unmarshallType must be compatible with the type, ordering and multiplicity of the corresponding result OutputPin.
* let attribute:OrderedSet(Property) = unmarshallType.allAttributes() in
* Sequence{1..result->size()}->forAll(i |
* attribute->at(i).type.conformsTo(result->at(i).type) and
* attribute->at(i).isOrdered=result->at(i).isOrdered and
* attribute->at(i).compatibleWith(result->at(i)))
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateTypeOrderingAndMultiplicity(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The unmarshallType must have at least one StructuralFeature.
* unmarshallType.allAttributes()->size() >= 1
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateStructuralFeature(DiagnosticChain diagnostics,
Map<Object, Object> context);
} // UnmarshallAction