org.apache.taglibs.rdc.scxml.model
Class SCXML

java.lang.Object
  extended by org.apache.taglibs.rdc.scxml.model.SCXML
All Implemented Interfaces:
Observable

public class SCXML
extends java.lang.Object
implements Observable

The class in this SCXML object model that corresponds to the <scxml> root element, and serves as the "document root". It is also associated with the root Context, via which the SCXMLExecutor may access and the query state of the host environment.

Author:
Rahul Akolkar, Jaroslav Gergic

Field Summary
static java.lang.String XMLNS
          The SCXML XMLNS
 
Constructor Summary
SCXML()
          Constructor
 
Method Summary
 void addListener(SCXMLListener lst)
          Register a listener to this document root
 void addState(State state)
          Add a child state
 void addTarget(TransitionTarget target)
          Add a target to this SCXML document
 java.lang.String getInitialstate()
          Get the ID of the initial state
 State getInitialState()
          Get the initial State
 NotificationRegistry getNotificationRegistry()
          Get the notification registry
 Context getRootContext()
          Get the root Context for this document
 java.util.Map getStates()
          Get the children states
 java.util.Map getTargets()
          Get the targets map, whichis a Map of all States and Parallels associated with this state machine, keyed by their id
 java.lang.String getVersion()
          Get the SCXML document version
 java.lang.String getXmlns()
          Get the xmlns of this SCXML document
 void removeListener(SCXMLListener lst)
          Deregister a listener from this document root
 void setInitialState(State initialState)
          Set the initial State
 void setInitialstate(java.lang.String initialstate)
          Set the ID of the initial state
 void setRootContext(Context rootContext)
          Set the root Context for this document
 void setVersion(java.lang.String version)
          Set the SCXML document version
 void setXmlns(java.lang.String xmlns)
          Set the xmlns of this SCXML document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLNS

public static final java.lang.String XMLNS
The SCXML XMLNS

See Also:
Constant Field Values
Constructor Detail

SCXML

public SCXML()
Constructor

Method Detail

getInitialState

public State getInitialState()
Get the initial State

Returns:
Returns the initialstate.

setInitialState

public void setInitialState(State initialState)
Set the initial State

Parameters:
initialstate - The initialstate to set.

getStates

public java.util.Map getStates()
Get the children states

Returns:
Returns the states.

addState

public void addState(State state)
Add a child state

Parameters:
state - The state to be added to the states Map.

getTargets

public java.util.Map getTargets()
Get the targets map, whichis a Map of all States and Parallels associated with this state machine, keyed by their id

Returns:
Returns the targets.

addTarget

public void addTarget(TransitionTarget target)
Add a target to this SCXML document

Parameters:
target - The target to be added to the targets Map.

getVersion

public java.lang.String getVersion()
Get the SCXML document version

Returns:
Returns the version.

setVersion

public void setVersion(java.lang.String version)
Set the SCXML document version

Parameters:
version - The version to set.

getXmlns

public java.lang.String getXmlns()
Get the xmlns of this SCXML document

Returns:
Returns the xmlns.

setXmlns

public void setXmlns(java.lang.String xmlns)
Set the xmlns of this SCXML document

Parameters:
xmlns - The xmlns to set.

getNotificationRegistry

public NotificationRegistry getNotificationRegistry()
Get the notification registry

Returns:
Returns the notifReg.

getInitialstate

public java.lang.String getInitialstate()
Get the ID of the initial state

Returns:
Returns the initial state ID (used by XML Digester only).
See Also:
getInitialState()

setInitialstate

public void setInitialstate(java.lang.String initialstate)
Set the ID of the initial state

Parameters:
initialstate - The initial state ID (used by XML Digester only).
See Also:
setInitialState(State)

getRootContext

public Context getRootContext()
Get the root Context for this document

Returns:
Returns the rootContext.

setRootContext

public void setRootContext(Context rootContext)
Set the root Context for this document

Parameters:
rootContext - The rootContext to set.

addListener

public void addListener(SCXMLListener lst)
Register a listener to this document root

Specified by:
addListener in interface Observable
Parameters:
lst - The SCXMLListener to add Remarks: Only valid if StateMachine is non null!

removeListener

public void removeListener(SCXMLListener lst)
Deregister a listener from this document root

Specified by:
removeListener in interface Observable
Parameters:
lst - The SCXMLListener to remove Remarks: Only valid if StateMachine is non null!


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.