Package com.sodius.mdw.metamodel.uml21
Interface StateMachine
-
- All Superinterfaces:
Behavior
,BehavioredClassifier
,Class
,Classifier
,Comparable<Object>
,Element
,org.eclipse.emf.ecore.EModelElement
,EncapsulatedClassifier
,org.eclipse.emf.ecore.EObject
,MDWEObject
,MDWObject
,NamedElement
,Namespace
,org.eclipse.emf.common.notify.Notifier
,PackageableElement
,ParameterableElement
,RedefinableElement
,StructuredClassifier
,TemplateableElement
,Type
- All Known Subinterfaces:
ProtocolStateMachine
public interface StateMachine extends Behavior
A representation of the model object 'State Machine'. State machines can be used to express the behavior of part of a system. Behavior is modeled as a traversal of a graph of state nodes interconnected by one or more joined transition arcs that are triggered by the dispatching of series of (event) occurrences. During this traversal, the state machine executes a series of activities associated with various elements of the state machine.The following features are supported:
- See Also:
UMLPackage.getStateMachine()
-
-
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 boolean
ancestor(State s1, State s2)
The query ancestor(s1, s2) checks whether s2 is an ancestor state of state s1.Pseudostate
createConnectionPoint(String name)
Creates a newPseudostate
, with the specified 'Name', and appends it to the ' Connection Point' containment reference list.Region
createRegion(String name)
Creates a newRegion
, with the specified 'Name', and appends it to the ' Region' containment reference list.Pseudostate
getConnectionPoint(String name)
Retrieves the firstPseudostate
with the specified 'Name' from the ' Connection Point' containment reference list.Pseudostate
getConnectionPoint(String name, boolean ignoreCase, boolean createOnDemand)
Retrieves the firstPseudostate
with the specified 'Name' from the ' Connection Point' containment reference list.MDWEList<Pseudostate>
getConnectionPoints()
Returns the value of the 'Connection Point' containment reference list.StateMachine
getExtendedStateMachine(String name)
Retrieves the firstStateMachine
with the specified 'Name' from the ' Extended State Machine' reference list.StateMachine
getExtendedStateMachine(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstStateMachine
with the specified 'Name' from the ' Extended State Machine' reference list.MDWEList<StateMachine>
getExtendedStateMachines()
Returns the value of the 'Extended State Machine' reference list.Region
getRegion(String name)
Retrieves the firstRegion
with the specified 'Name' from the 'Region' containment reference list.Region
getRegion(String name, boolean ignoreCase, boolean createOnDemand)
Retrieves the firstRegion
with the specified 'Name' from the 'Region' containment reference list.MDWEList<Region>
getRegions()
Returns the value of the 'Region' containment reference list.State
getSubmachineState(String name)
Retrieves the firstState
with the specified 'Name' from the ' Submachine State' reference list.State
getSubmachineState(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstState
with the specified 'Name' from the ' Submachine State' reference list.MDWEList<State>
getSubmachineStates()
Returns the value of the 'Submachine State' reference list.boolean
isRedefinitionContextValid(StateMachine redefined)
The query isRedefinitionContextValid() specifies whether the redefinition contexts of a statemachine are properly related to the redefinition contexts of the specified statemachine to allow this element to redefine the other.Namespace
LCA(State s1, State s2)
The operation LCA(s1,s2) returns an orthogonal state or region which is the least common ancestor of states s1 and s2, based on the statemachine containment hierarchy.boolean
validateClassifierContext(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
The classifier context of a state machine cannot be an interface.boolean
validateConnectionPoints(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
The connection points of a state machine are pseudostates of kind entry point or exit point.boolean
validateContextClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
The context classifier of the method state machine of a behavioral feature must be the classifier that owns the behavioral feature.boolean
validateMethod(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A state machine as the method for a behavioral feature cannot have entry/exit connection points.-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.Behavior
createOwnedParameter, createOwnedParameterSet, createPostcondition, createPostcondition, createPrecondition, createPrecondition, getContext, getOwnedParameter, getOwnedParameter, getOwnedParameters, getOwnedParameterSet, getOwnedParameterSet, getOwnedParameterSets, getPostcondition, getPostcondition, getPostconditions, getPrecondition, getPrecondition, getPreconditions, getRedefinedBehavior, getRedefinedBehavior, getRedefinedBehaviors, getSpecification, isReentrant, setIsReentrant, setSpecification, validateFeatureOfContextClassifier, validateMostOneBehaviour, validateMustRealize, validateParametersMatch
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.BehavioredClassifier
createClassifierBehavior, createInterfaceRealization, createOwnedBehavior, createOwnedTrigger, getAllImplementedInterfaces, getClassifierBehavior, getImplementedInterfaces, getInterfaceRealization, getInterfaceRealization, getInterfaceRealizations, getOwnedBehavior, getOwnedBehavior, getOwnedBehaviors, getOwnedTrigger, getOwnedTrigger, getOwnedTriggers, setClassifierBehavior, validateClassBehavior
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.Class
createNestedClassifier, createOwnedOperation, createOwnedOperation, createOwnedReception, getExtension, getExtension, getExtensions, getNestedClassifier, getNestedClassifier, getNestedClassifiers, getOwnedOperation, getOwnedOperation, getOwnedOperations, getOwnedReception, getOwnedReception, getOwnedReceptions, getSuperClass, getSuperClass, getSuperClasses, isActive, isMetaclass, setIsActive, validatePassiveClass
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.Classifier
allFeatures, allParents, conformsTo, createCollaborationUse, createGeneralization, createOwnedUseCase, createRepresentation, createSubstitution, getAllAttributes, getAllOperations, getAllUsedInterfaces, getAttribute, getAttribute, getAttributes, getCollaborationUse, getCollaborationUse, getCollaborationUses, getFeature, getFeature, getFeatures, getGeneral, getGeneral, getGeneralization, getGeneralization, getGeneralizations, getGenerals, getInheritedMember, getInheritedMember, getInheritedMembers, getOperation, getOperation, getOperations, getOwnedUseCase, getOwnedUseCase, getOwnedUseCases, getPowertypeExtent, getPowertypeExtent, getPowertypeExtents, getRedefinedClassifier, getRedefinedClassifier, getRedefinedClassifiers, getRepresentation, getSubstitution, getSubstitution, getSubstitutions, getUseCase, getUseCase, getUseCases, getUsedInterfaces, hasVisibilityOf, inherit, inheritableMembers, isAbstract, isFinalSpecialization, maySpecializeType, parents, setIsAbstract, setIsFinalSpecialization, setRepresentation, validateGeneralizationHierarchies, validateMapsToGeneralizationSet, validateNoCyclesInGeneralization, validateSpecializeType
-
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 com.sodius.mdw.metamodel.uml21.EncapsulatedClassifier
createOwnedPort, getOwnedPort, getOwnedPort, getOwnedPorts
-
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.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.StructuredClassifier
createOwnedAttribute, createOwnedAttribute, createOwnedAttribute, createOwnedConnector, getOwnedAttribute, getOwnedAttribute, getOwnedAttributes, getOwnedConnector, getOwnedConnector, getOwnedConnectors, getPart, getPart, getParts, getRole, getRole, getRoles, validateMultiplicities
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature
-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.Type
conformsTo, createAssociation, getAssociations, getPackage, setPackage
-
-
-
-
Method Detail
-
getRegions
MDWEList<Region> getRegions()
Returns the value of the 'Region' containment reference list. The list contents are of typeRegion
. It is bidirectional and its opposite is 'State Machine
'. The regions owned directly by the state machine.- Returns:
- the value of the 'Region' containment reference list.
- See Also:
UMLPackage.getStateMachine_Region()
,Region.getStateMachine()
-
createRegion
Region createRegion(String name)
Creates a newRegion
, with the specified 'Name', and appends it to the ' Region' containment reference list.- Parameters:
name
- The 'Name' for the newRegion
, ornull
.- Returns:
- The new
Region
. - See Also:
getRegions()
-
getRegion
Region getRegion(String name)
Retrieves the firstRegion
with the specified 'Name' from the 'Region' containment reference list.- Parameters:
name
- The 'Name' of theRegion
to retrieve, ornull
.- Returns:
- The first
Region
with the specified 'Name', ornull
. - See Also:
getRegions()
-
getRegion
Region getRegion(String name, boolean ignoreCase, boolean createOnDemand)
Retrieves the firstRegion
with the specified 'Name' from the 'Region' containment reference list.- Parameters:
name
- The 'Name' of theRegion
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.createOnDemand
- Whether to create aRegion
on demand if not found.- Returns:
- The first
Region
with the specified 'Name', ornull
. - See Also:
getRegions()
-
getSubmachineStates
MDWEList<State> getSubmachineStates()
Returns the value of the 'Submachine State' reference list. The list contents are of typeState
. It is bidirectional and its opposite is 'Submachine
'. References the submachine(s) in case of a submachine state. Multiple machines are referenced in case of a concurrent state.- Returns:
- the value of the 'Submachine State' reference list.
- See Also:
UMLPackage.getStateMachine_SubmachineState()
,State.getSubmachine()
-
getSubmachineState
State getSubmachineState(String name)
Retrieves the firstState
with the specified 'Name' from the ' Submachine State' reference list.- Parameters:
name
- The 'Name' of theState
to retrieve, ornull
.- Returns:
- The first
State
with the specified 'Name', ornull
. - See Also:
getSubmachineStates()
-
getSubmachineState
State getSubmachineState(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstState
with the specified 'Name' from the ' Submachine State' reference list.- Parameters:
name
- The 'Name' of theState
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.eClass
- The Ecore class of theState
to retrieve, ornull
.- Returns:
- The first
State
with the specified 'Name', ornull
. - See Also:
getSubmachineStates()
-
getConnectionPoints
MDWEList<Pseudostate> getConnectionPoints()
Returns the value of the 'Connection Point' containment reference list. The list contents are of typePseudostate
. It is bidirectional and its opposite is 'State Machine
'. The connection points defined for this state machine. They represent the interface of the state machine when used as part of submachine state.- Returns:
- the value of the 'Connection Point' containment reference list.
- See Also:
UMLPackage.getStateMachine_ConnectionPoint()
,Pseudostate.getStateMachine()
-
createConnectionPoint
Pseudostate createConnectionPoint(String name)
Creates a newPseudostate
, with the specified 'Name', and appends it to the ' Connection Point' containment reference list.- Parameters:
name
- The 'Name' for the newPseudostate
, ornull
.- Returns:
- The new
Pseudostate
. - See Also:
getConnectionPoints()
-
getConnectionPoint
Pseudostate getConnectionPoint(String name)
Retrieves the firstPseudostate
with the specified 'Name' from the ' Connection Point' containment reference list.- Parameters:
name
- The 'Name' of thePseudostate
to retrieve, ornull
.- Returns:
- The first
Pseudostate
with the specified 'Name', ornull
. - See Also:
getConnectionPoints()
-
getConnectionPoint
Pseudostate getConnectionPoint(String name, boolean ignoreCase, boolean createOnDemand)
Retrieves the firstPseudostate
with the specified 'Name' from the ' Connection Point' containment reference list.- Parameters:
name
- The 'Name' of thePseudostate
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.createOnDemand
- Whether to create aPseudostate
on demand if not found.- Returns:
- The first
Pseudostate
with the specified 'Name', ornull
. - See Also:
getConnectionPoints()
-
getExtendedStateMachines
MDWEList<StateMachine> getExtendedStateMachines()
Returns the value of the 'Extended State Machine' reference list. The list contents are of typeStateMachine
. The state machines of which this is an extension.- Returns:
- the value of the 'Extended State Machine' reference list.
- See Also:
UMLPackage.getStateMachine_ExtendedStateMachine()
-
getExtendedStateMachine
StateMachine getExtendedStateMachine(String name)
Retrieves the firstStateMachine
with the specified 'Name' from the ' Extended State Machine' reference list.- Parameters:
name
- The 'Name' of theStateMachine
to retrieve, ornull
.- Returns:
- The first
StateMachine
with the specified 'Name', ornull
. - See Also:
getExtendedStateMachines()
-
getExtendedStateMachine
StateMachine getExtendedStateMachine(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstStateMachine
with the specified 'Name' from the ' Extended State Machine' reference list.- Parameters:
name
- The 'Name' of theStateMachine
to retrieve, ornull
.ignoreCase
- Whether to ignore case inString
comparisons.eClass
- The Ecore class of theStateMachine
to retrieve, ornull
.- Returns:
- The first
StateMachine
with the specified 'Name', ornull
. - See Also:
getExtendedStateMachines()
-
validateClassifierContext
boolean validateClassifierContext(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
The classifier context of a state machine cannot be an interface. context->notEmpty() implies not context.oclIsKindOf(Interface)
-
validateContextClassifier
boolean validateContextClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
The context classifier of the method state machine of a behavioral feature must be the classifier that owns the behavioral feature. specification->notEmpty() implies (context->notEmpty() and specification->featuringClassifier->exists (c | c = context))
-
validateConnectionPoints
boolean validateConnectionPoints(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
The connection points of a state machine are pseudostates of kind entry point or exit point. conectionPoint->forAll (c | c.kind = #entryPoint or c.kind = #exitPoint)
-
validateMethod
boolean validateMethod(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)
A state machine as the method for a behavioral feature cannot have entry/exit connection points. specification->notEmpty() implies connectionPoint->isEmpty()
-
LCA
Namespace LCA(State s1, State s2)
The operation LCA(s1,s2) returns an orthogonal state or region which is the least common ancestor of states s1 and s2, based on the statemachine containment hierarchy. true
-
ancestor
boolean ancestor(State s1, State s2)
The query ancestor(s1, s2) checks whether s2 is an ancestor state of state s1. context StateMachine::ancestor (s1 : State, s2 : State) : Boolean result = if (s2 = s1) then true else if (s1.container->isEmpty) then true else if (s2.container->isEmpty) then false else (ancestor (s1, s2.container))
-
isRedefinitionContextValid
boolean isRedefinitionContextValid(StateMachine redefined)
The query isRedefinitionContextValid() specifies whether the redefinition contexts of a statemachine are properly related to the redefinition contexts of the specified statemachine to allow this element to redefine the other. The containing classifier of a redefining statemachine must redefine the containing classifier of the redefined statemachine. result = true
-
-