Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.taglibs.rdc.scxml
Class SCXMLSemantics  view SCXMLSemantics download SCXMLSemantics.java

java.lang.Object
  extended byorg.apache.taglibs.rdc.scxml.SCXMLSemantics

public class SCXMLSemantics
extends java.lang.Object

This class encapsulates a particular SCXML semantics, that is a particular semantic interpretation of Harel Statecharts. The possible semantic interpretations are for example:

The purpose of this class is to separate the interpretation algorithm from the SCXMLExecutor and make it therefore pluggable. Semantics agnostic utility functions and common operators as defined in UML can be found in the SCXMLHelper or attached directly to the SCXML model elements. Specific semantics can be created by subclassing SCXMLSemantics, the current implementation aligns mostly with W3C SCXML July 5 public draft (that is, UML 1.5) however, certain aspects are taken from STATEMATE.


Field Summary
protected static org.apache.commons.logging.Log appLog
           
protected  TransitionTargetComparator ttc
           
 
Constructor Summary
SCXMLSemantics()
           
 
Method Summary
 void buildOnExitOnEntryLists(Step step, ErrorReporter errRep)
           
 void determineInitialStates(org.apache.taglibs.rdc.scxml.model.SCXML input, java.util.Set states, java.util.List entryList, ErrorReporter errRep)
           
 void determineTargetStates(java.util.Set states, ErrorReporter errRep)
           
 void enumerateReachableTransitions(org.apache.taglibs.rdc.scxml.model.SCXML stateMachine, Step step, ErrorReporter errRep)
           
 boolean eventMatch(java.lang.String transEvent, java.util.Set eventOccurrences)
          Implements prefix match, that is, if, for example, "mouse.click" is a member of eventOccurrences and a transition is triggered by "mouse", the method returns true.
 void executeActionList(java.util.List actions, java.util.Collection derivedEvents, SCXMLExecutor exec, ErrorReporter errRep)
           
 void executeActions(Step step, SCXMLExecutor exec, ErrorReporter errRep)
          Exectutes all OnExit/Transition/OnEntry transitional actions.
 void filterTransitionsSet(Step step, Evaluator evaluator, ErrorReporter errRep)
           
(package private)  java.util.Comparator getTTComparator()
          TransitionTargetComparator factory method
 org.apache.taglibs.rdc.scxml.model.SCXML normalizeStateMachine(org.apache.taglibs.rdc.scxml.model.SCXML input, ErrorReporter errRep)
           
 void seedTargetSet(Step step, ErrorReporter errRep)
           
 void updateHistoryStates(Step step, ErrorReporter errRep)
          Go over the exit list and update history information for relevant states.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

appLog

protected static org.apache.commons.logging.Log appLog

ttc

protected TransitionTargetComparator ttc
Constructor Detail

SCXMLSemantics

public SCXMLSemantics()
Method Detail

normalizeStateMachine

public org.apache.taglibs.rdc.scxml.model.SCXML normalizeStateMachine(org.apache.taglibs.rdc.scxml.model.SCXML input,
                                                                      ErrorReporter errRep)

determineInitialStates

public void determineInitialStates(org.apache.taglibs.rdc.scxml.model.SCXML input,
                                   java.util.Set states,
                                   java.util.List entryList,
                                   ErrorReporter errRep)
                            throws org.apache.taglibs.rdc.scxml.model.ModelException

executeActionList

public void executeActionList(java.util.List actions,
                              java.util.Collection derivedEvents,
                              SCXMLExecutor exec,
                              ErrorReporter errRep)
                       throws org.apache.taglibs.rdc.scxml.model.ModelException,
                              SCXMLExpressionException

executeActions

public void executeActions(Step step,
                           SCXMLExecutor exec,
                           ErrorReporter errRep)
                    throws org.apache.taglibs.rdc.scxml.model.ModelException
Exectutes all OnExit/Transition/OnEntry transitional actions.


enumerateReachableTransitions

public void enumerateReachableTransitions(org.apache.taglibs.rdc.scxml.model.SCXML stateMachine,
                                          Step step,
                                          ErrorReporter errRep)

filterTransitionsSet

public void filterTransitionsSet(Step step,
                                 Evaluator evaluator,
                                 ErrorReporter errRep)

seedTargetSet

public void seedTargetSet(Step step,
                          ErrorReporter errRep)

determineTargetStates

public void determineTargetStates(java.util.Set states,
                                  ErrorReporter errRep)
                           throws org.apache.taglibs.rdc.scxml.model.ModelException

buildOnExitOnEntryLists

public void buildOnExitOnEntryLists(Step step,
                                    ErrorReporter errRep)

updateHistoryStates

public void updateHistoryStates(Step step,
                                ErrorReporter errRep)
Go over the exit list and update history information for relevant states.


eventMatch

public boolean eventMatch(java.lang.String transEvent,
                          java.util.Set eventOccurrences)
Implements prefix match, that is, if, for example, "mouse.click" is a member of eventOccurrences and a transition is triggered by "mouse", the method returns true.


getTTComparator

final java.util.Comparator getTTComparator()
TransitionTargetComparator factory method