|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.speakright.core.SRResults
public class SRResults
Holds the results sent back by the VoiceXML platform. These are the results of executing the previous page, and include user input, errors, and events (like disconnect).
| Nested Class Summary | |
|---|---|
static class |
SRResults.ResultCode
Result code sent back by the VoiceXML platform, indicating the result of running the most recent VoiceXML page that we sent it. |
class |
SRResults.Slot
Holds information about a single slot. |
| Field Summary | |
|---|---|
boolean |
m_confirmationWasRejected
|
java.lang.String |
m_input
|
SRLocations |
m_locations
|
int |
m_overallConfidence
|
SRResults.ResultCode |
m_resultCode
|
java.lang.String |
m_transferResult
|
boolean |
m_validateSucceeded
|
| Constructor Summary | |
|---|---|
SRResults()
|
|
SRResults(RawCGIParams params)
Load from a set of CGI params (in a HTTP GET or POST). |
|
SRResults(java.lang.String input)
|
|
SRResults(java.lang.String input,
SRResults.ResultCode resultCode)
|
|
| Method Summary | |
|---|---|
void |
addSlot(java.lang.String slotName,
java.lang.String value)
Add a slot and its value. |
void |
addSlot(java.lang.String slotName,
java.lang.String value,
int confidence)
Add a slot and its value. |
SRResults.Slot |
findSlot(java.lang.String slotName)
The Slot object for the given slot |
SRResults.Slot |
getIthSlot(int index)
Get the i-th slot in these results. |
SRLocations |
getLocations()
get current resource file locations. |
java.lang.String |
getSlot(java.lang.String slotName)
Get the value of the given slot. |
boolean |
hasSlot(java.lang.String slotName)
Return true if the slot exists. |
void |
loadFrom(SRResults saved)
Restore previous results. |
int |
slotCount()
Get the number of slots in these results |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String m_input
public int m_overallConfidence
public SRResults.ResultCode m_resultCode
public java.lang.String m_transferResult
public boolean m_validateSucceeded
public boolean m_confirmationWasRejected
public SRLocations m_locations
| Constructor Detail |
|---|
public SRResults()
public SRResults(java.lang.String input)
public SRResults(java.lang.String input,
SRResults.ResultCode resultCode)
public SRResults(RawCGIParams params)
params - | Method Detail |
|---|
public void loadFrom(SRResults saved)
saved - saved results from a previous executepublic SRLocations getLocations()
IFlowContext
getLocations in interface IFlowContext
public void addSlot(java.lang.String slotName,
java.lang.String value)
slotName - name of slot (used as field name in VoiceXML)value - the value of the slot, which is usually the user input value
returned by the grammar.
public void addSlot(java.lang.String slotName,
java.lang.String value,
int confidence)
slotName - name of slot (used as field name in VoiceXML)value - the value of the slot, which is usually the user input value
returned by the grammar.confidence - confidence level (0..100) that the speech recognition engine
returned for the utterance. Sometimes there is a single overall confidence level,
and sometimes each slot is given a separate confidence level.public java.lang.String getSlot(java.lang.String slotName)
slotName - slot name
public boolean hasSlot(java.lang.String slotName)
slotName - slot name
public SRResults.Slot findSlot(java.lang.String slotName)
slotName -
public SRResults.Slot getIthSlot(int index)
index - between 0 and slotCount() - 1 inclusive
public int slotCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||