| /* |
| * 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 |
| * Christian W. Damus (CEA) - 251963 |
| * Kenn Hussey (CEA) - 418466, 451350, 485756 |
| * Kenn Hussey - 535301 |
| * |
| */ |
| package org.eclipse.uml2.uml; |
| |
| import java.util.Map; |
| |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the model object '<em><b>Decision Node</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * <!-- begin-model-doc --> |
| * A DecisionNode is a ControlNode that chooses between outgoing ActivityEdges for the routing of tokens. |
| * <p>From package UML::Activities.</p> |
| * <!-- end-model-doc --> |
| * |
| * <p> |
| * The following features are supported: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.uml2.uml.DecisionNode#getDecisionInput <em>Decision Input</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.DecisionNode#getDecisionInputFlow <em>Decision Input Flow</em>}</li> |
| * </ul> |
| * |
| * @see org.eclipse.uml2.uml.UMLPackage#getDecisionNode() |
| * @model |
| * @generated |
| */ |
| public interface DecisionNode |
| extends ControlNode { |
| |
| /** |
| * Returns the value of the '<em><b>Decision Input</b></em>' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * A Behavior that is executed to provide an input to guard ValueSpecifications on ActivityEdges outgoing from the DecisionNode. |
| * <p>From package UML::Activities.</p> |
| * <!-- end-model-doc --> |
| * @return the value of the '<em>Decision Input</em>' reference. |
| * @see #setDecisionInput(Behavior) |
| * @see org.eclipse.uml2.uml.UMLPackage#getDecisionNode_DecisionInput() |
| * @model ordered="false" |
| * @generated |
| */ |
| Behavior getDecisionInput(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.uml2.uml.DecisionNode#getDecisionInput <em>Decision Input</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Decision Input</em>' reference. |
| * @see #getDecisionInput() |
| * @generated |
| */ |
| void setDecisionInput(Behavior value); |
| |
| /** |
| * Returns the value of the '<em><b>Decision Input Flow</b></em>' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * An additional ActivityEdge incoming to the DecisionNode that provides a decision input value for the guards ValueSpecifications on ActivityEdges outgoing from the DecisionNode. |
| * <p>From package UML::Activities.</p> |
| * <!-- end-model-doc --> |
| * @return the value of the '<em>Decision Input Flow</em>' reference. |
| * @see #setDecisionInputFlow(ObjectFlow) |
| * @see org.eclipse.uml2.uml.UMLPackage#getDecisionNode_DecisionInputFlow() |
| * @model ordered="false" |
| * @generated |
| */ |
| ObjectFlow getDecisionInputFlow(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.uml2.uml.DecisionNode#getDecisionInputFlow <em>Decision Input Flow</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Decision Input Flow</em>' reference. |
| * @see #getDecisionInputFlow() |
| * @generated |
| */ |
| void setDecisionInputFlow(ObjectFlow value); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * A DecisionNode has one or two incoming ActivityEdges and at least one outgoing ActivityEdge. |
| * (incoming->size() = 1 or incoming->size() = 2) and outgoing->size() > 0 |
| * @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 validateIncomingOutgoingEdges(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The ActivityEdges incoming to and outgoing from a DecisionNode, other than the decisionInputFlow (if any), must be either all ObjectFlows or all ControlFlows. |
| * let allEdges: Set(ActivityEdge) = incoming->union(outgoing) in |
| * let allRelevantEdges: Set(ActivityEdge) = if decisionInputFlow->notEmpty() then allEdges->excluding(decisionInputFlow) else allEdges endif in |
| * allRelevantEdges->forAll(oclIsKindOf(ControlFlow)) or allRelevantEdges->forAll(oclIsKindOf(ObjectFlow)) |
| * |
| * @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 validateEdges(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The decisionInputFlow of a DecisionNode must be an incoming ActivityEdge of the DecisionNode. |
| * incoming->includes(decisionInputFlow) |
| * @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 validateDecisionInputFlowIncoming(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * A decisionInput Behavior has no out parameters, no inout parameters, and one return parameter. |
| * decisionInput<>null implies |
| * (decisionInput.ownedParameter->forAll(par | |
| * par.direction <> ParameterDirectionKind::out and |
| * par.direction <> ParameterDirectionKind::inout ) and |
| * decisionInput.ownedParameter->one(par | |
| * par.direction <> ParameterDirectionKind::return)) |
| * @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 validateParameters(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * If the DecisionNode has no decisionInputFlow and an incoming ControlFlow, then any decisionInput Behavior has no in parameters. |
| * (decisionInput<>null and decisionInputFlow=null and incoming->exists(oclIsKindOf(ControlFlow))) implies |
| * decisionInput.inputParameters()->isEmpty() |
| * @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 validateZeroInputParameters(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * If the DecisionNode has no decisionInputFlow and an incoming ObjectFlow, then any decisionInput Behavior has one in Parameter whose type is the same as or a supertype of the type of object tokens offered on the incoming ObjectFlow. |
| * (decisionInput<>null and decisionInputFlow=null and incoming->forAll(oclIsKindOf(ObjectFlow))) implies |
| * decisionInput.inputParameters()->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 validateIncomingObjectOneInputParameter(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * If the DecisionNode has a decisionInputFlow and an incoming ControlFlow, then any decisionInput Behavior has one in Parameter whose type is the same as or a supertype of the type of object tokens offered on the decisionInputFlow. |
| * (decisionInput<>null and decisionInputFlow<>null and incoming->exists(oclIsKindOf(ControlFlow))) implies |
| * decisionInput.inputParameters()->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 validateIncomingControlOneInputParameter( |
| DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * If the DecisionNode has a decisionInputFlow and an second incoming ObjectFlow, then any decisionInput has two in Parameters, the first of which has a type that is the same as or a supertype of the type of object tokens offered on the non-decisionInputFlow and the second of which has a type that is the same as or a supertype of the type of object tokens offered on the decisionInputFlow. |
| * (decisionInput<>null and decisionInputFlow<>null and incoming->forAll(oclIsKindOf(ObjectFlow))) implies |
| * decisionInput.inputParameters()->size()=2 |
| * @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 validateTwoInputParameters(DiagnosticChain diagnostics, |
| Map<Object, Object> context); |
| |
| } // DecisionNode |