Interface Region

    • Method Detail

      • createSubvertex

        Vertex createSubvertex​(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()
      • createState

        State createState​(String name)
        Creates a Sub State for the current Region, called 'name'.
        Parameters:
        name - the name of the created State
        Returns:
        the created State
        Since:
        3.5.0
      • createFinalState

        FinalState createFinalState​(String name)
        Creates a Sub Final State for the current Region, called 'name'.
        Parameters:
        name - the name of the created Final State
        Returns:
        the created FinalState
        Since:
        3.5.0
      • createPseudostate

        Pseudostate createPseudostate​(String name,
                                      PseudostateKind kind)
        Creates a Sub Pseudo State for the current Region, called 'name'.
        Parameters:
        name - the name of the created Pseudo State
        the - kind of the Pseudo State
        Returns:
        the created Pseudo State
        Since:
        3.5.0
        See Also:
        PseudostateKind
      • getSubvertex

        Vertex getSubvertex​(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​(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

        MDWEList<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'. 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​(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()
      • getTransition

        Transition getTransition​(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​(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'. 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()
      • 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()
      • 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,
                                      Map 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
      • validateDeepHistoryVertex

        boolean validateDeepHistoryVertex​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                          Map 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
      • validateShallowHistoryVertex

        boolean validateShallowHistoryVertex​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                             Map 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
      • validateOwned

        boolean validateOwned​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                              Map 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())
      • 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)
        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