devs.speechpackage
Class DialogManager.DialogNode

java.lang.Object
  extended by devs.speechpackage.DialogManager.DialogNode
Enclosing class:
DialogManager

 class DialogManager.DialogNode
extends java.lang.Object

Represents a node in the dialog


Constructor Summary
DialogManager.DialogNode(java.lang.String name, DialogNodeBehavior behavior)
          Creates a dialog node with the given name an application behavior
 
Method Summary
(package private)  void enter()
          Enters the node, prepares it for recognition
(package private)  void exit()
          Exits the node
 DialogManager getDialogManager()
           
 edu.cmu.sphinx.jsapi.JSGFGrammar getGrammar()
          Returns the JSGF Grammar for the dialog manager that contains this node
 java.lang.String getName()
          Gets the name of the node
(package private)  void init()
          Initializes the node
(package private)  java.lang.String recognize()
          Performs recognition at the node.
 void trace(java.lang.String msg)
          Traces a message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogManager.DialogNode

DialogManager.DialogNode(java.lang.String name,
                         DialogNodeBehavior behavior)
Creates a dialog node with the given name an application behavior

Parameters:
name - the name of the node
behavior - the application behavor for the node
Method Detail

init

void init()
Initializes the node


enter

void enter()
     throws java.io.IOException
Enters the node, prepares it for recognition

Throws:
java.io.IOException

recognize

java.lang.String recognize()
                     throws javax.speech.recognition.GrammarException
Performs recognition at the node.

Returns:
the result tag
Throws:
javax.speech.recognition.GrammarException

exit

void exit()
Exits the node


getName

public java.lang.String getName()
Gets the name of the node

Returns:
the name of the node

getGrammar

public edu.cmu.sphinx.jsapi.JSGFGrammar getGrammar()
Returns the JSGF Grammar for the dialog manager that contains this node

Returns:
the grammar

trace

public void trace(java.lang.String msg)
Traces a message

Parameters:
msg - the message to trace

getDialogManager

public DialogManager getDialogManager()