Package com.sodius.mdw.metamodel.uml21
Interface Transition
-
- All Superinterfaces:
Comparable<Object>
,Element
,org.eclipse.emf.ecore.EModelElement
,org.eclipse.emf.ecore.EObject
,MDWEObject
,MDWObject
,NamedElement
,Namespace
,org.eclipse.emf.common.notify.Notifier
,RedefinableElement
- All Known Subinterfaces:
ProtocolTransition
public interface Transition extends Namespace, RedefinableElement
A representation of the model object 'Transition'. A transition is a directed relationship between a source vertex and a target vertex. It may be part of a compound transition, which takes the state machine from one state configuration to another, representing the complete response of the state machine to an occurrence of an event of a particular type.The following features are supported:
- See Also:
UMLPackage.getTransition()
-
-
Field Summary
-
Fields inherited from interface com.sodius.mdw.metamodel.uml21.NamedElement
SEPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StateMachine
containingStateMachine()
The query containingStateMachine() returns the state machine that contains the transition either directly or transitively.Behavior
createEffect(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newBehavior
, with the specified 'Name', and sets the 'Effect' containment reference.Constraint
createGuard(String name)
Creates a newConstraint
,with the specified 'Name', and sets the 'Guard' reference.Constraint
createGuard(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newConstraint
, with the specified 'Name', and sets the 'Guard ' reference.Trigger
createTrigger(String name)
Creates a newTrigger
, with the specified 'Name', and appends it to the ' Trigger' containment reference list.Region
getContainer()
Returns the value of the 'Container' container reference.Behavior
getEffect()
Returns the value of the 'Effect' containment reference.Constraint
getGuard()
Returns the value of the 'Guard' reference.TransitionKind
getKind()
Returns the value of the 'Kind' attribute.Transition
getRedefinedTransition()
Returns the value of the 'Redefined Transition' reference.Vertex
getSource()
Returns the value of the 'Source' reference.Vertex
getTarget()
Returns the value of the 'Target' reference.Trigger
getTrigger(String name)
Retrieves the firstTrigger
with the specified 'Name' from the 'Trigger' containment reference list.Trigger
getTrigger(String name, boolean ignoreCase, boolean createOnDemand)
Retrieves the firstTrigger
with the specified 'Name' from the 'Trigger' containment reference list.MDWEList<Trigger>
getTriggers()
Returns the value of the 'Trigger' containment reference list.Classifier
redefinitionContext()
The redefinition context of a transition is the nearest containing statemachine.void
setContainer(Region value)
Sets the value of the 'Container
' container reference.void
setEffect(Behavior value)
Sets the value of the 'Effect
' containment reference.void
setGuard(Constraint value)
Sets the value of the 'Guard
' reference.void
setKind(TransitionKind value)
Sets the value of the 'Kind
' attribute.void
setRedefinedTransition(Transition value)
Sets the value of the 'Redefined Transition
' reference.void
setSource(Vertex value)
Sets the value of the 'Source
' reference.void
setTarget(Vertex value)
Sets the value of the 'Target
' reference.boolean
validateForkSegmentGuards(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A fork segment must not have guards or triggers.boolean
validateForkSegmentState(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A fork segment must always target a state.boolean
validateInitialTransition(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
An initial transition at the topmost level (region of a statemachine) either has no trigger or it has a trigger with the stereotype <>. boolean
validateJoinSegmentGuards(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A join segment must not have guards or triggers.boolean
validateJoinSegmentState(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A join segment must always originate from a state.boolean
validateOutgoingPseudostates(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
Transitions outgoing pseudostates may not have a trigger.boolean
validateSignaturesCompatible(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
In case of more than one trigger, the signatures of these must be compatible in case the parameters of the signal are assigned to local variables/attributes.-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.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 com.sodius.mdw.core.model.MDWObject
compareTo, eExtendedClass, eIsInstanceOf, eIsInstanceOf, eIsProfiled, eIsRemoved, eMetamodel, eMetaTypeName, eModel, eRemove, eSetUniqueID, eUniqueID, superScript, superScript, toBoolean, toBoolean, toByte, toByte, toChar, toChar, toDouble, toDouble, toFloat, toFloat, toInt, toInt, toList, toList, toList, toList, toList, toLong, toLong, toObject, toObject, toSet, toSet, toShort, toShort, toString, toString
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.Namespace
createElementImport, createElementImport, createOwnedDiagram, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedDiagrams, getOwnedDiagrams, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable
-
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
-
-
-
-
Method Detail
-
getKind
TransitionKind getKind()
Returns the value of the 'Kind' attribute. The default value is"external"
. The literals are from the enumerationTransitionKind
. Indicates the precise type of the transition.- Returns:
- the value of the 'Kind' attribute.
- See Also:
TransitionKind
,setKind(TransitionKind)
,UMLPackage.getTransition_Kind()
-
setKind
void setKind(TransitionKind value)
Sets the value of the 'Kind
' attribute.- Parameters:
value
- the new value of the 'Kind' attribute.- See Also:
TransitionKind
,getKind()
-
getContainer
Region getContainer()
Returns the value of the 'Container' container reference. It is bidirectional and its opposite is 'Transition
'. Designates the region that owns this transition.- Returns:
- the value of the 'Container' container reference.
- See Also:
setContainer(Region)
,UMLPackage.getTransition_Container()
,Region.getTransitions()
-
setContainer
void setContainer(Region value)
Sets the value of the 'Container
' container reference.- Parameters:
value
- the new value of the 'Container' container reference.- See Also:
getContainer()
-
getTarget
Vertex getTarget()
Returns the value of the 'Target' reference. It is bidirectional and its opposite is 'Incoming
'. Designates the target vertex that is reached when the transition is taken.- Returns:
- the value of the 'Target' reference.
- See Also:
setTarget(Vertex)
,UMLPackage.getTransition_Target()
,Vertex.getIncomings()
-
setTarget
void setTarget(Vertex value)
Sets the value of the 'Target
' reference.- Parameters:
value
- the new value of the 'Target' reference.- See Also:
getTarget()
-
getRedefinedTransition
Transition getRedefinedTransition()
Returns the value of the 'Redefined Transition' reference. The transition that is redefined by this transition.- Returns:
- the value of the 'Redefined Transition' reference.
- See Also:
setRedefinedTransition(Transition)
,UMLPackage.getTransition_RedefinedTransition()
-
setRedefinedTransition
void setRedefinedTransition(Transition value)
Sets the value of the 'Redefined Transition
' reference.- Parameters:
value
- the new value of the 'Redefined Transition' reference.- See Also:
getRedefinedTransition()
-
getGuard
Constraint getGuard()
Returns the value of the 'Guard' reference. A guard is a constraint that provides a fine-grained control over the firing of the transition. The guard is evaluated when an event occurrence is dispatched by the state machine. If the guard is true at that time, the transition may be enabled, otherwise, it is disabled. Guards should be pure expressions without side effects. Guard expressions with side effects are ill formed.- Returns:
- the value of the 'Guard' reference.
- See Also:
setGuard(Constraint)
,UMLPackage.getTransition_Guard()
-
setGuard
void setGuard(Constraint value)
Sets the value of the 'Guard
' reference.- Parameters:
value
- the new value of the 'Guard' reference.- See Also:
getGuard()
-
createGuard
Constraint createGuard(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newConstraint
, with the specified 'Name', and sets the 'Guard ' reference.- Parameters:
name
- The 'Name' for the newConstraint
, ornull
.eClass
- The Ecore class of theConstraint
to create.- Returns:
- The new
Constraint
. - See Also:
getGuard()
-
createGuard
Constraint createGuard(String name)
Creates a newConstraint
,with the specified 'Name', and sets the 'Guard' reference.- Parameters:
name
- The 'Name' for the newConstraint
, ornull
.- Returns:
- The new
Constraint
. - See Also:
getGuard()
-
getEffect
Behavior getEffect()
Returns the value of the 'Effect' containment reference. Specifies an optional behavior to be performed when the transition fires.- Returns:
- the value of the 'Effect' containment reference.
- See Also:
setEffect(Behavior)
,UMLPackage.getTransition_Effect()
-
setEffect
void setEffect(Behavior value)
Sets the value of the 'Effect
' containment reference.- Parameters:
value
- the new value of the 'Effect' containment reference.- See Also:
getEffect()
-
createEffect
Behavior createEffect(String name, org.eclipse.emf.ecore.EClass eClass)
Creates a newBehavior
, with the specified 'Name', and sets the 'Effect' containment reference.- Parameters:
name
- The 'Name' for the newBehavior
, ornull
.eClass
- The Ecore class of theBehavior
to create.- Returns:
- The new
Behavior
. - See Also:
getEffect()
-
getTriggers
MDWEList<Trigger> getTriggers()
Returns the value of the 'Trigger' containment reference list. The list contents are of typeTrigger
. Specifies the triggers that may fire the transition.- Returns:
- the value of the 'Trigger' containment reference list.
- See Also:
UMLPackage.getTransition_Trigger()
-
createTrigger
Trigger createTrigger(String name)
Creates a newTrigger
, with the specified 'Name', and appends it to the ' Trigger' containment reference list.- Parameters:
name
- The 'Name' for the newTrigger
, ornull
.- Returns:
- The new
Trigger
. - See Also:
getTriggers()
-
getTrigger
Trigger getTrigger(String name)
Retrieves the firstTrigger
with the specified 'Name' from the 'Trigger' containment reference list.- Parameters:
name
- The 'Name' of theTrigger
to retrieve, ornull
.- Returns:
- The first
Trigger
with the specified 'Name', ornull
. - See Also:
getTriggers()
-
getTrigger
Trigger getTrigger(String name, boolean ignoreCase, boolean createOnDemand)
Retrieves the firstTrigger
with the specified 'Name' from the 'Trigger' containment reference list.- Parameters:
name
- The 'Name' of theTrigger
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.createOnDemand
- Whether to create aTrigger
on demand if not found.- Returns:
- The first
Trigger
with the specified 'Name', ornull
. - See Also:
getTriggers()
-
getSource
Vertex getSource()
Returns the value of the 'Source' reference. It is bidirectional and its opposite is 'Outgoing
'. Designates the originating vertex (state or pseudostate) of the transition.- Returns:
- the value of the 'Source' reference.
- See Also:
setSource(Vertex)
,UMLPackage.getTransition_Source()
,Vertex.getOutgoings()
-
setSource
void setSource(Vertex value)
Sets the value of the 'Source
' reference.- Parameters:
value
- the new value of the 'Source' reference.- See Also:
getSource()
-
validateForkSegmentGuards
boolean validateForkSegmentGuards(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A fork segment must not have guards or triggers. (source.oclIsKindOf(Pseudostate) and source.kind = #fork) implies (guard->isEmpty() and trigger->isEmpty())
-
validateJoinSegmentGuards
boolean validateJoinSegmentGuards(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A join segment must not have guards or triggers. (target.oclIsKindOf(Pseudostate) and target.kind = #join) implies (guard->isEmpty() and trigger->isEmpty())
-
validateForkSegmentState
boolean validateForkSegmentState(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A fork segment must always target a state. (source.oclIsKindOf(Pseudostate) and source.kind = #fork) implies (target.oclIsKindOf(State))
-
validateJoinSegmentState
boolean validateJoinSegmentState(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A join segment must always originate from a state. (target.oclIsKindOf(Pseudostate) and target.kind = #join) implies (source.oclIsKindOf(State))
-
validateOutgoingPseudostates
boolean validateOutgoingPseudostates(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
Transitions outgoing pseudostates may not have a trigger. source.oclIsKindOf(Pseudostate) and ((source.kind <> #junction) and (source.kind <> #join) and (source.kind <> #initial)) implies trigger->isEmpty()
-
validateInitialTransition
boolean validateInitialTransition(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
An initial transition at the topmost level (region of a statemachine) either has no trigger or it has a trigger with the stereotype <>. self.source.oclIsKindOf(Pseudostate) implies (self.source.oclAsType(Pseudostate).kind = #initial) implies (self.source.container = self.stateMachine.top) implies ((self.trigger->isEmpty) or (self.trigger.stereotype.name = 'create'))
-
validateSignaturesCompatible
boolean validateSignaturesCompatible(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
In case of more than one trigger, the signatures of these must be compatible in case the parameters of the signal are assigned to local variables/attributes. true
-
redefinitionContext
Classifier redefinitionContext()
The redefinition context of a transition is the nearest containing statemachine. result = let sm = containingStateMachine() in if sm.context->isEmpty() or sm.general->notEmpty() then sm else sm.context endif
-
containingStateMachine
StateMachine containingStateMachine()
The query containingStateMachine() returns the state machine that contains the transition either directly or transitively. result = container.containingStateMachine()
-
-