org.eclipse.uml2.uml
Interface Clause

All Superinterfaces:
Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier

public interface Clause
extends Element

A representation of the model object 'Clause'. A Clause is an Element that represents a single branch of a ConditionalNode, including a test and a body section. The body section is executed only if (but not necessarily if) the test section evaluates to true.

From package UML::Actions.

The following features are supported:

See Also:
UMLPackage.getClause()

Method Summary
 org.eclipse.emf.common.util.EList<ExecutableNode> getBodies()
          Returns the value of the 'Body' reference list.
 ExecutableNode getBody(java.lang.String name)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Body' reference list
 ExecutableNode getBody(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Body' reference list
 OutputPin getBodyOutput(java.lang.String name, Type type)
          Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Body Output' reference list
 OutputPin getBodyOutput(java.lang.String name, Type type, boolean ignoreCase)
          Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Body Output' reference list
 org.eclipse.emf.common.util.EList<OutputPin> getBodyOutputs()
          Returns the value of the 'Body Output' reference list.
 OutputPin getDecider()
          Returns the value of the 'Decider' reference
 org.eclipse.emf.common.util.EList<Clause> getPredecessorClauses()
          Returns the value of the 'Predecessor Clause' reference list.
 org.eclipse.emf.common.util.EList<Clause> getSuccessorClauses()
          Returns the value of the 'Successor Clause' reference list.
 ExecutableNode getTest(java.lang.String name)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Test' reference list
 ExecutableNode getTest(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Test' reference list
 org.eclipse.emf.common.util.EList<ExecutableNode> getTests()
          Returns the value of the 'Test' reference list.
 void setDecider(OutputPin value)
          Sets the value of the 'Decider' reference
 boolean validateBodyOutputPins(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The bodyOutput Pins are OutputPins on Actions in the body of the Clause.
 boolean validateDeciderOutput(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The decider Pin must be on an Action in the test section of the Clause and must be of type Boolean with multiplicity 1..1.
 boolean validateTestAndBody(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The test and body parts of a ConditionalNode must be disjoint with each other.
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getTests

org.eclipse.emf.common.util.EList<ExecutableNode> getTests()
Returns the value of the 'Test' reference list. The list contents are of type ExecutableNode. The set of ExecutableNodes that are executed in order to provide a test result for the Clause.

From package UML::Actions.

Returns:
the value of the 'Test' reference list.
See Also:
UMLPackage.getClause_Test()

getTest

ExecutableNode getTest(java.lang.String name)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Test' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
getTests()

getTest

ExecutableNode getTest(java.lang.String name,
                       boolean ignoreCase,
                       org.eclipse.emf.ecore.EClass eClass)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Test' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
getTests()

getBodies

org.eclipse.emf.common.util.EList<ExecutableNode> getBodies()
Returns the value of the 'Body' reference list. The list contents are of type ExecutableNode. The set of ExecutableNodes that are executed if the test evaluates to true and the Clause is chosen over other Clauses within the ConditionalNode that also have tests that evaluate to true.

From package UML::Actions.

Returns:
the value of the 'Body' reference list.
See Also:
UMLPackage.getClause_Body()

getBody

ExecutableNode getBody(java.lang.String name)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Body' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
getBodies()

getBody

ExecutableNode getBody(java.lang.String name,
                       boolean ignoreCase,
                       org.eclipse.emf.ecore.EClass eClass)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Body' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
getBodies()

getPredecessorClauses

org.eclipse.emf.common.util.EList<Clause> getPredecessorClauses()
Returns the value of the 'Predecessor Clause' reference list. The list contents are of type Clause. It is bidirectional and its opposite is 'Successor Clause'. A set of Clauses whose tests must all evaluate to false before this Clause can evaluate its test.

From package UML::Actions.

Returns:
the value of the 'Predecessor Clause' reference list.
See Also:
UMLPackage.getClause_PredecessorClause(), getSuccessorClauses()

getSuccessorClauses

org.eclipse.emf.common.util.EList<Clause> getSuccessorClauses()
Returns the value of the 'Successor Clause' reference list. The list contents are of type Clause. It is bidirectional and its opposite is 'Predecessor Clause'. A set of Clauses that may not evaluate their tests unless the test for this Clause evaluates to false.

From package UML::Actions.

Returns:
the value of the 'Successor Clause' reference list.
See Also:
UMLPackage.getClause_SuccessorClause(), getPredecessorClauses()

getDecider

OutputPin getDecider()
Returns the value of the 'Decider' reference. An OutputPin on an Action in the test section whose Boolean value determines the result of the test.

From package UML::Actions.

Returns:
the value of the 'Decider' reference.
See Also:
setDecider(OutputPin), UMLPackage.getClause_Decider()

setDecider

void setDecider(OutputPin value)
Sets the value of the 'Decider' reference.

Parameters:
value - the new value of the 'Decider' reference.
See Also:
getDecider()

getBodyOutputs

org.eclipse.emf.common.util.EList<OutputPin> getBodyOutputs()
Returns the value of the 'Body Output' reference list. The list contents are of type OutputPin. The OutputPins on Actions within the body section whose values are moved to the result OutputPins of the containing ConditionalNode after execution of the body.

From package UML::Actions.

Returns:
the value of the 'Body Output' reference list.
See Also:
UMLPackage.getClause_BodyOutput()

getBodyOutput

OutputPin getBodyOutput(java.lang.String name,
                        Type type)
Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Body Output' reference list.

Parameters:
name - The 'Name' of the OutputPin to retrieve, or null.
type - The 'Type' of the OutputPin to retrieve, or null.
Returns:
The first OutputPin with the specified 'Name', and 'Type', or null.
See Also:
getBodyOutputs()

getBodyOutput

OutputPin getBodyOutput(java.lang.String name,
                        Type type,
                        boolean ignoreCase)
Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Body Output' reference list.

Parameters:
name - The 'Name' of the OutputPin to retrieve, or null.
type - The 'Type' of the OutputPin to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first OutputPin with the specified 'Name', and 'Type', or null.
See Also:
getBodyOutputs()

validateDeciderOutput

boolean validateDeciderOutput(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                              java.util.Map<java.lang.Object,java.lang.Object> context)
The decider Pin must be on an Action in the test section of the Clause and must be of type Boolean with multiplicity 1..1. test.oclAsType(Action).allActions().output->includes(decider) and decider.type = Boolean and decider.is(1,1)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateTestAndBody

boolean validateTestAndBody(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                            java.util.Map<java.lang.Object,java.lang.Object> context)
The test and body parts of a ConditionalNode must be disjoint with each other. test->intersection(_'body')->isEmpty()

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateBodyOutputPins

boolean validateBodyOutputPins(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                               java.util.Map<java.lang.Object,java.lang.Object> context)
The bodyOutput Pins are OutputPins on Actions in the body of the Clause. _'body'.oclAsType(Action).allActions().output->includesAll(bodyOutput)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.