org.jvoicexml.interpreter.event
Class AbstractEventStrategy

java.lang.Object
  extended by org.jvoicexml.interpreter.event.AbstractEventStrategy
All Implemented Interfaces:
XmlWritable
Direct Known Subclasses:
ChildNodeEventStrategy, RecognitionEventStrategy

public abstract class AbstractEventStrategy
extends Object
implements XmlWritable

Strategy to process an event coming from the implementation platform.

Version:
$Revision: 216 $
Author:
Dirk Schnelle
See Also:

Copyright © 2005-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/


Constructor Summary
protected AbstractEventStrategy(VoiceXmlInterpreterContext ctx, VoiceXmlInterpreter ip, FormInterpretationAlgorithm algorithm, AbstractFormItem formItem, VoiceXmlNode n, String type)
          Construct a new object.
 
Method Summary
 int getCount()
          Get the count.
 String getEventType()
          Retrieves the event type.
protected  FormInterpretationAlgorithm getFormInterpretationAlgorithm()
          Retrieve the FIA.
protected  AbstractFormItem getFormItem()
          Retrieves the current form item.
protected  VoiceXmlInterpreter getVoiceXmlInterpreter()
          Retrieve the interpreter property.
protected  VoiceXmlInterpreterContext getVoiceXmlInterpreterContext()
          Retrieve the context property.
protected  VoiceXmlNode getVoiceXmlNode()
          Retrieves the child node with which to continue.
 String toString()
          Returns a string representation of the object.
 void writeChildrenXml(XmlWriter writer)
          Used to write any children of a node.
 void writeXml(XmlWriter writer)
          This is the primary method used to write an object and its children as XML text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractEventStrategy

protected AbstractEventStrategy(VoiceXmlInterpreterContext ctx,
                                VoiceXmlInterpreter ip,
                                FormInterpretationAlgorithm algorithm,
                                AbstractFormItem formItem,
                                VoiceXmlNode n,
                                String type)
Construct a new object.

Parameters:
ctx - The VoiceXML interpreter context.
ip - The VoiceXML interpreter.
algorithm - The FIA.
formItem - The current form item.
n - The child node with which to continue.
type - The event type.
Method Detail

getVoiceXmlInterpreterContext

protected final VoiceXmlInterpreterContext getVoiceXmlInterpreterContext()
Retrieve the context property.

Returns:
The VoiceXML interpreter context.

getVoiceXmlInterpreter

protected final VoiceXmlInterpreter getVoiceXmlInterpreter()
Retrieve the interpreter property.

Returns:
The VoiceXML interpreter.

getFormInterpretationAlgorithm

protected final FormInterpretationAlgorithm getFormInterpretationAlgorithm()
Retrieve the FIA.

Returns:
The current FIA.

getFormItem

protected final AbstractFormItem getFormItem()
Retrieves the current form item.

Returns:
The current form item.

getVoiceXmlNode

protected final VoiceXmlNode getVoiceXmlNode()
Retrieves the child node with which to continue.

Returns:
The child node with which to continue.

getEventType

public final String getEventType()
Retrieves the event type.

Returns:
The event type.

writeXml

public final void writeXml(XmlWriter writer)
                    throws IOException
This is the primary method used to write an object and its children as XML text.

Specified by:
writeXml in interface XmlWritable
Parameters:
writer - XMLWriter used when writing XML text.
Throws:
IOException - Error in writing.

writeChildrenXml

public void writeChildrenXml(XmlWriter writer)
                      throws IOException
Used to write any children of a node.

Specified by:
writeChildrenXml in interface XmlWritable
Parameters:
writer - XMLWriter used when writing XML text.
Throws:
IOException - Error in writing.

toString

public final String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.

getCount

public final int getCount()
Get the count.

Returns:
The count.


Copyright © 2005-2007 JVoiceXML group.