net.dpml.metro.tools
Class StateDataType

java.lang.Object
  extended bynet.dpml.metro.tools.StateDataType

public class StateDataType
extends Object

Utility datatype supporting State instance construction.

Version:
1.0.0
Author:
Digital Product Meta Library

Method Summary
 InterfaceDataType createInterface()
          Add an interface within this state.
 OperationDataType createOperation()
          Add an operation within this state.
 StateDataType createState()
          Add a substate within the state.
 TransitionDataType createTransition()
          Add an transition within this state.
 TriggerDataType createTrigger()
          Add an trigger to the state.
 void setClass(String classname)
          Set a classname from which to resolve an embedded state graph.
 void setName(String name)
          Set the state name.
 void setTerminal(boolean flag)
          Mark the state as a terminal state.
 void setUri(URI uri)
          Set a uri from which to resolve an encoded state graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setName

public void setName(String name)
Set the state name. Note that state names are only applicable to substates. A state name assigned to the root state will be ignored.

Parameters:
name - the name of the state

setUri

public void setUri(URI uri)
Set a uri from which to resolve an encoded state graph. May only applied to a root state.

Parameters:
uri - a uri referencing a state graph artifact

setClass

public void setClass(String classname)
Set a classname from which to resolve an embedded state graph. May only applied to a root state. May not be used in conjuction with other attributes or nested elements.

Parameters:
classname - the classname of a class containing a collocated xgraph resource

setTerminal

public void setTerminal(boolean flag)
Mark the state as a terminal state.

Parameters:
flag - true if this is a terminal state

createState

public StateDataType createState()
Add a substate within the state.

Returns:
the sub-state datatype

createOperation

public OperationDataType createOperation()
Add an operation within this state.

Returns:
the operation datatype

createInterface

public InterfaceDataType createInterface()
Add an interface within this state.

Returns:
the interface datatype

createTransition

public TransitionDataType createTransition()
Add an transition within this state.

Returns:
the operation datatype

createTrigger

public TriggerDataType createTrigger()
Add an trigger to the state.

Returns:
the trigger datatype