org.jvoicexml.interpreter.formitem
Class FieldFormItem

java.lang.Object
  extended by org.jvoicexml.interpreter.formitem.AbstractFormItem
      extended by org.jvoicexml.interpreter.formitem.InputItem
          extended by org.jvoicexml.interpreter.formitem.FieldFormItem
All Implemented Interfaces:
DialogConstruct, FormItem, PromptCountable, FormItemVisitable

public final class FieldFormItem
extends InputItem

An input item whose value is obtained via ASR or DTMF grammars.

Version:
$Revision: 110 $

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

Author:
Dirk Schnelle

Constructor Summary
FieldFormItem(VoiceXmlInterpreterContext context, VoiceXmlNode voiceNode)
          Create a new field input item.
 
Method Summary
 EventHandler accept(FormItemVisitor visitor)
          Execute the specific method of the visitor.
 Collection<Filled> getFilledElements()
          Get all nested <filled> elements.
 Collection<Grammar> getGrammars()
          Get all nested definitions of a <grammar>.
 Prompt getPrompt()
          Get the prompt belonging to this input field.
 Class<? extends Object> getShadowVariableContainer()
          Retrieves the implementation of the shadow var container for this input item.
 void setFormItemVariable(Object value)
          Sets the form item variable. Sets also the shadow variables.
 void setMarkname(String mark)
          Sets the markname.
 
Methods inherited from class org.jvoicexml.interpreter.formitem.InputItem
createShadowVarContainer, getEventCount, getPromptCount, getShadowVarContainerName, incrementEventCounter, incrementPromptCount, resetEventCounter, resetPromptCount
 
Methods inherited from class org.jvoicexml.interpreter.formitem.AbstractFormItem
getCatchElements, getContext, getExpr, getFormItemVariable, getName, getNode, isSelectable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jvoicexml.interpreter.formitem.PromptCountable
getName, getNode
 

Constructor Detail

FieldFormItem

public FieldFormItem(VoiceXmlInterpreterContext context,
                     VoiceXmlNode voiceNode)
Create a new field input item.

Parameters:
context - The current VoiceXmlInterpreterContext.
voiceNode - The corresponding xml node in the VoiceXML document.
Method Detail

accept

public EventHandler accept(FormItemVisitor visitor)
                    throws JVoiceXMLEvent
Execute the specific method of the visitor.

Parameters:
visitor - The visitor to use.
Returns:
The event handler to use for the processing.
Throws:
JVoiceXMLEvent - Error or event visiting the form item.

setFormItemVariable

public void setFormItemVariable(Object value)
Sets the form item variable. Sets also the shadow variables.

Specified by:
setFormItemVariable in interface FormItem
Overrides:
setFormItemVariable in class AbstractFormItem
Parameters:
value - New value for the form item variable.

setMarkname

public void setMarkname(String mark)
Sets the markname.

Parameters:
mark - The name of the mark.
Since:
0.5

getGrammars

public Collection<Grammar> getGrammars()
Get all nested definitions of a <grammar>.

Returns:
Collection about all nested <grammar> tags.

getFilledElements

public Collection<Filled> getFilledElements()
Get all nested <filled> elements.

Returns:
Collection about all nested <filled> tags.

getPrompt

public Prompt getPrompt()
Get the prompt belonging to this input field.

Returns:
Prompt to play, null if there is none.

getShadowVariableContainer

public Class<? extends Object> getShadowVariableContainer()
Retrieves the implementation of the shadow var container for this input item.

Specified by:
getShadowVariableContainer in class InputItem
Returns:
Class of the shadow var container, null if there is no shadow var container.


Copyright © 2005-2007 JVoiceXML group.