org.eclipse.uml2.uml
Interface Region

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

public interface Region
extends Namespace, RedefinableElement

A representation of the model object 'Region'. A region is an orthogonal part of either a composite state or a state machine. It contains states and transitions.

The following features are supported:

See Also:
UMLPackage.getRegion()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 boolean belongsToPSM()
          The operation belongsToPSM () checks if the region belongs to a protocol state machine result = if not stateMachine->isEmpty() then oclIsTypeOf(ProtocolStateMachine) else if not state->isEmpty() then state.container.belongsToPSM () else false
 StateMachine containingStateMachine()
          The operation containingStateMachine() returns the sate machine in which this Region is defined result = if stateMachine->isEmpty() then state.containingStateMachine() else stateMachine endif
 Vertex createSubvertex(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)
          Creates a new Vertex, with the specified 'Name', and appends it to the 'Subvertex' containment reference list
 Transition createTransition(java.lang.String name)
          Creates a new Transition, with the specified 'Name', and appends it to the 'Transition' containment reference list
 Transition createTransition(java.lang.String name, org.eclipse.emf.ecore.EClass eClass)
          Creates a new Transition, with the specified 'Name', and appends it to the 'Transition' containment reference list
 Region getExtendedRegion()
          Returns the value of the 'Extended Region' reference.
 State getState()
          Returns the value of the 'State' container reference.
 StateMachine getStateMachine()
          Returns the value of the 'State Machine' container reference.
 Vertex getSubvertex(java.lang.String name)
          Retrieves the first Vertex with the specified 'Name' from the 'Subvertex' containment reference list
 Vertex getSubvertex(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first Vertex with the specified 'Name' from the 'Subvertex' containment reference list
 org.eclipse.emf.common.util.EList<Vertex> getSubvertices()
          Returns the value of the 'Subvertex' containment reference list.
 Transition getTransition(java.lang.String name)
          Retrieves the first Transition with the specified 'Name' from the 'Transition' containment reference list
 Transition getTransition(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass, boolean createOnDemand)
          Retrieves the first Transition with the specified 'Name' from the 'Transition' containment reference list
 org.eclipse.emf.common.util.EList<Transition> getTransitions()
          Returns the value of the 'Transition' containment reference list.
 boolean isRedefinitionContextValid(Region redefined)
           This operation redefines the following operations: 'Is Redefinition Context Valid'
 Classifier redefinitionContext()
          The redefinition context of a region is the nearest containing statemachine result = let sm = containingStateMachine() in if sm.context->isEmpty() or sm.general->notEmpty() then sm else sm.context endif
 void setExtendedRegion(Region value)
          Sets the value of the 'Extended Region' reference
 void setState(State value)
          Sets the value of the 'State' container reference
 void setStateMachine(StateMachine value)
          Sets the value of the 'State Machine' container reference
 boolean validateDeepHistoryVertex(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          A region can have at most one deep history vertex self.subvertex->select (v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #deepHistory)->size() <= 1
 boolean validateInitialVertex(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          A region can have at most one initial vertex self.subvertex->select (v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #initial)->size() <= 1
 boolean validateOwned(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If a Region is owned by a StateMachine, then it cannot also be owned by a State and vice versa.
 boolean validateShallowHistoryVertex(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          A region can have at most one shallow history vertex self.subvertex->select(v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #shallowHistory)->size() <= 1
 
Methods inherited from interface org.eclipse.uml2.uml.Namespace
createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, 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 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, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, 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 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, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getSubvertices

org.eclipse.emf.common.util.EList<Vertex> getSubvertices()
Returns the value of the 'Subvertex' containment reference list. The list contents are of type Vertex. It is bidirectional and its opposite is 'Container'.

This feature subsets the following features:

The set of vertices that are owned by this region.

Returns:
the value of the 'Subvertex' containment reference list.
See Also:
UMLPackage.getRegion_Subvertex(), Vertex.getContainer()

createSubvertex

Vertex createSubvertex(java.lang.String name,
                       org.eclipse.emf.ecore.EClass eClass)
Creates a new Vertex, with the specified 'Name', and appends it to the 'Subvertex' containment reference list.

Parameters:
name - The 'Name' for the new Vertex, or null.
eClass - The Ecore class of the Vertex to create.
Returns:
The new Vertex.
See Also:
getSubvertices()

getSubvertex

Vertex getSubvertex(java.lang.String name)
Retrieves the first Vertex with the specified 'Name' from the 'Subvertex' containment reference list.

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

getSubvertex

Vertex getSubvertex(java.lang.String name,
                    boolean ignoreCase,
                    org.eclipse.emf.ecore.EClass eClass,
                    boolean createOnDemand)
Retrieves the first Vertex with the specified 'Name' from the 'Subvertex' containment reference list.

Parameters:
name - The 'Name' of the Vertex to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Vertex to retrieve, or null.
createOnDemand - Whether to create a Vertex on demand if not found.
Returns:
The first Vertex with the specified 'Name', or null.
See Also:
getSubvertices()

getTransitions

org.eclipse.emf.common.util.EList<Transition> getTransitions()
Returns the value of the 'Transition' containment reference list. The list contents are of type Transition. It is bidirectional and its opposite is 'Container'.

This feature subsets the following features:

The set of transitions owned by the region. Note that internal transitions are owned by a region, but applies to the source state.

Returns:
the value of the 'Transition' containment reference list.
See Also:
UMLPackage.getRegion_Transition(), Transition.getContainer()

createTransition

Transition createTransition(java.lang.String name,
                            org.eclipse.emf.ecore.EClass eClass)
Creates a new Transition, with the specified 'Name', and appends it to the 'Transition' containment reference list.

Parameters:
name - The 'Name' for the new Transition, or null.
eClass - The Ecore class of the Transition to create.
Returns:
The new Transition.
See Also:
getTransitions()

createTransition

Transition createTransition(java.lang.String name)
Creates a new Transition, with the specified 'Name', and appends it to the 'Transition' containment reference list.

Parameters:
name - The 'Name' for the new Transition, or null.
Returns:
The new Transition.
See Also:
getTransitions()

getTransition

Transition getTransition(java.lang.String name)
Retrieves the first Transition with the specified 'Name' from the 'Transition' containment reference list.

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

getTransition

Transition getTransition(java.lang.String name,
                         boolean ignoreCase,
                         org.eclipse.emf.ecore.EClass eClass,
                         boolean createOnDemand)
Retrieves the first Transition with the specified 'Name' from the 'Transition' containment reference list.

Parameters:
name - The 'Name' of the Transition to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Transition to retrieve, or null.
createOnDemand - Whether to create a Transition on demand if not found.
Returns:
The first Transition with the specified 'Name', or null.
See Also:
getTransitions()

getState

State getState()
Returns the value of the 'State' container reference. It is bidirectional and its opposite is 'Region'.

This feature subsets the following features:

The State that owns the Region. If a Region is owned by a State, then it cannot also be owned by a StateMachine.

Returns:
the value of the 'State' container reference.
See Also:
setState(State), UMLPackage.getRegion_State(), State.getRegions()

setState

void setState(State value)
Sets the value of the 'State' container reference.

Parameters:
value - the new value of the 'State' container reference.
See Also:
getState()

getExtendedRegion

Region getExtendedRegion()
Returns the value of the 'Extended Region' reference.

This feature subsets the following features:

The region of which this region is an extension.

Returns:
the value of the 'Extended Region' reference.
See Also:
setExtendedRegion(Region), UMLPackage.getRegion_ExtendedRegion()

setExtendedRegion

void setExtendedRegion(Region value)
Sets the value of the 'Extended Region' reference.

Parameters:
value - the new value of the 'Extended Region' reference.
See Also:
getExtendedRegion()

getStateMachine

StateMachine getStateMachine()
Returns the value of the 'State Machine' container reference. It is bidirectional and its opposite is 'Region'.

This feature subsets the following features:

The StateMachine that owns the Region. If a Region is owned by a StateMachine, then it cannot also be owned by a State.

Returns:
the value of the 'State Machine' container reference.
See Also:
setStateMachine(StateMachine), UMLPackage.getRegion_StateMachine(), StateMachine.getRegions()

setStateMachine

void setStateMachine(StateMachine value)
Sets the value of the 'State Machine' container reference.

Parameters:
value - the new value of the 'State Machine' container reference.
See Also:
getStateMachine()

validateInitialVertex

boolean validateInitialVertex(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                              java.util.Map<java.lang.Object,java.lang.Object> context)
A region can have at most one initial vertex self.subvertex->select (v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #initial)->size() <= 1

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

validateDeepHistoryVertex

boolean validateDeepHistoryVertex(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)
A region can have at most one deep history vertex self.subvertex->select (v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #deepHistory)->size() <= 1

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

validateShallowHistoryVertex

boolean validateShallowHistoryVertex(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)
A region can have at most one shallow history vertex self.subvertex->select(v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #shallowHistory)->size() <= 1

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

validateOwned

boolean validateOwned(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                      java.util.Map<java.lang.Object,java.lang.Object> context)
If a Region is owned by a StateMachine, then it cannot also be owned by a State and vice versa. (stateMachine->notEmpty() implies state->isEmpty()) and (state->notEmpty() implies stateMachine->isEmpty())

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

redefinitionContext

Classifier redefinitionContext()
The redefinition context of a region is the nearest containing statemachine result = let sm = containingStateMachine() in if sm.context->isEmpty() or sm.general->notEmpty() then sm else sm.context endif


isRedefinitionContextValid

boolean isRedefinitionContextValid(Region redefined)

This operation redefines the following operations:

The query isRedefinitionContextValid() specifies whether the redefinition contexts of a region are properly related to the redefinition contexts of the specified region to allow this element to redefine the other. The containing statemachine/state of a redefining region must redefine the containing statemachine/state of the redefined region. result = true


containingStateMachine

StateMachine containingStateMachine()
The operation containingStateMachine() returns the sate machine in which this Region is defined result = if stateMachine->isEmpty() then state.containingStateMachine() else stateMachine endif


belongsToPSM

boolean belongsToPSM()
The operation belongsToPSM () checks if the region belongs to a protocol state machine result = if not stateMachine->isEmpty() then oclIsTypeOf(ProtocolStateMachine) else if not state->isEmpty() then state.container.belongsToPSM () else false


Copyright 2003, 2007 IBM Corporation and others.
All Rights Reserved.