org.jvoicexml.interpreter.formitem
Class FieldShadowVarContainer

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by org.jvoicexml.interpreter.formitem.FieldShadowVarContainer
All Implemented Interfaces:
Serializable, EventCountable, PromptCountable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public final class FieldShadowVarContainer
extends org.mozilla.javascript.ScriptableObject
implements EventCountable, PromptCountable

Component that provides a container for the shadowed variables of a field. See http://www.w3.org/TR/voicexml20/#dml2.3.1 for details.

Since:
0.3.1
Version:
$Revision: 2476 $
Author:
Torben Hardt, Dirk Schnelle-Walka
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
FieldShadowVarContainer()
          Constructs a new object.
 
Method Summary
 String getClassName()
          Return the name of the class.
 float getConfidence()
          Gets the current confidence.
 int getEventCount(String type)
          Retrieve the counter for the given event type.
 String getInputmode()
          Gets the current inputmode.
 Object getInterpretation()
          Gets the current interpretation.
 String getMarkname()
          Sets the markname.
 String getName()
          Retrieves the name.
 VoiceXmlNode getNode()
          Retrieves the corresponding node in the VoiceXML document.
 int getPromptCount()
          Retrieves the value of the prompt counter.
 String getUtterance()
          Gets the current utterance.
 void incrementEventCounter(JVoiceXMLEvent event)
          Increment counters for all events that have the same name as the given event or have a name that is a prefix of the given event.
 void incrementPromptCount()
          Increments the prompt counter.
 void jsContructor()
          This method is a callback for rhino which gets called on instantiation.
 void resetEventCounter()
          Reset the counter for all events.
 void resetPromptCount()
          Resets the prompt counter.
 void setConfidence(float conf)
          Sets the confidence.
 void setField(InputItem inputItem)
          Sets the related InputItem.
 void setInputmode(String mode)
          Sets the current inputmode.
 void setInterpretation(String inter)
          Sets the interpretation.
 void setMarkname(String mark)
          Sets the markname.
 void setResult(RecognitionResult result)
          Uses the given result to fill the fields.
 void setUtterance(String utter)
          Sets the utterance.
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldShadowVarContainer

public FieldShadowVarContainer()
Constructs a new object.

Method Detail

jsContructor

public void jsContructor()
This method is a callback for rhino which gets called on instantiation. (virtual js constructor)


setResult

public void setResult(RecognitionResult result)
Uses the given result to fill the fields.

Parameters:
result - the recognition result.
Since:
0.7

getConfidence

public float getConfidence()
Gets the current confidence.

Returns:
the current confidence

getInputmode

public String getInputmode()
Gets the current inputmode.

Returns:
the current inputmode

setInputmode

public void setInputmode(String mode)
Sets the current inputmode.

Parameters:
mode - the input mode.

getInterpretation

public Object getInterpretation()
Gets the current interpretation.

Returns:
the current interpretation

getUtterance

public String getUtterance()
Gets the current utterance.

Returns:
the current utterance

setConfidence

public void setConfidence(float conf)
Sets the confidence.

Parameters:
conf - the new confidence

setInterpretation

public void setInterpretation(String inter)
Sets the interpretation.

Parameters:
inter - the new interpretation

setUtterance

public void setUtterance(String utter)
Sets the utterance.

Parameters:
utter - the new utterance

getMarkname

public String getMarkname()
Sets the markname.

Returns:
The name of the mark.
Since:
0.6

setMarkname

public void setMarkname(String mark)
Sets the markname.

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

getClassName

public String getClassName()
Return the name of the class. This is typically the same name as the constructor.

Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject
Returns:
Name of the class.

setField

public void setField(InputItem inputItem)
Sets the related InputItem.

Parameters:
inputItem - the related item.
Since:
0.6

getEventCount

public int getEventCount(String type)
Retrieve the counter for the given event type.

Specified by:
getEventCount in interface EventCountable
Parameters:
type - Event type.
Returns:
Count for the given event type.

incrementEventCounter

public void incrementEventCounter(JVoiceXMLEvent event)
Increment counters for all events that have the same name as the given event or have a name that is a prefix of the given event.

Specified by:
incrementEventCounter in interface EventCountable
Parameters:
event - Event to increment.

resetEventCounter

public void resetEventCounter()
Reset the counter for all events.

Specified by:
resetEventCounter in interface EventCountable

getName

public String getName()
Retrieves the name.

Specified by:
getName in interface PromptCountable
Returns:
Name of the countable.

getNode

public VoiceXmlNode getNode()
Retrieves the corresponding node in the VoiceXML document.

Specified by:
getNode in interface PromptCountable
Returns:
Corresponding node in the VoiceXML document.

getPromptCount

public int getPromptCount()
Retrieves the value of the prompt counter.

Specified by:
getPromptCount in interface PromptCountable
Returns:
Value of the prompt counter.

incrementPromptCount

public void incrementPromptCount()
Increments the prompt counter.

Specified by:
incrementPromptCount in interface PromptCountable

resetPromptCount

public void resetPromptCount()
Resets the prompt counter.

Specified by:
resetPromptCount in interface PromptCountable


Copyright © 2005-2010JVoiceXML group.