|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvoicexml.xml.XmlNode
org.jvoicexml.xml.vxml.VoiceXmlNode
org.jvoicexml.xml.vxml.Choice
public final class Choice
Define a menu item. The <choice> element serves
several purposes:
<grammar> element or automatically generated by the
process described in Section 2.2.5 of
http://www.w3.org/TR/2005/REC-voicexml20-20050316.
<enumerate> prompt
string. This is described in Section 2.2.4 of
http://www.w3.org/TR/2005/REC-voicexml20-20050316
Copyright © 2005 JVoiceXML group - http://jvoicexml.sourceforge.net/
Enumerate,
Form,
Grammar| Field Summary | |
|---|---|
static String |
ATTRIBUTE_ACCEPT
Override the setting for accept in <menu> for this
particular choice. |
static String |
ATTRIBUTE_DTMF
The DTMF sequence for this choice. |
static String |
ATTRIBUTE_EVENT
Specify an event to be thrown instead of specifying a next. |
static String |
ATTRIBUTE_EVENTEXPR
An ECMAScript expression evaluating to the name of the event to be thrown. |
static String |
ATTRIBUTE_EXPR
Specify an expression to evaluate as a URI to transition to instead of specifying a next. |
static String |
ATTRIBUTE_FETCHAUDIO
The URI of the audio clip to play while the fetch is being done. |
static String |
ATTRIBUTE_FETCHHINT
Defines when the interpreter context should retrieve content from the server. prefetch indicates a file may be downloaded when the page is loaded, whereas safe indicates a file that should only be downloaded when actually needed. |
static String |
ATTRIBUTE_FETCHTIMEOUT
The interval to wait for the content to be returned before throwing an error.badfetch event. |
static String |
ATTRIBUTE_MAXAGE
Indicates that the document is willing to use content whose age is no greater than the specified time in seconds. |
static String |
ATTRIBUTE_MAXSTALE
Indicates that the document is willing to use content that has exceeded its expiration time. |
static String |
ATTRIBUTE_MESSAGE
A message string providing additional context about the event being thrown. |
static String |
ATTRIBUTE_MESSAGEEXPR
An ECMAScript expression evaluating to the message string. |
protected static ArrayList<String> |
ATTRIBUTE_NAMES
Supported attribute names for this node. |
static String |
ATTRIBUTE_NEXT
The URI of next dialog or document. |
private static Set<String> |
CHILD_TAGS
Valid child tags for this node. |
static String |
TAG_NAME
Name of the tag. |
| Fields inherited from class org.jvoicexml.xml.XmlNode |
|---|
node |
| Constructor Summary | |
|---|---|
Choice()
Construct a new choice object without a node. |
|
Choice(Node node)
Construct a new choice object. |
|
| Method Summary | |
|---|---|
Text |
addText(String text)
Create a new text within this node. |
protected boolean |
canContainChild(String tagName)
Can the specified sub-tag be contained within this node? |
String |
getAccept()
Retrieve the accept attribute. |
Collection<String> |
getAttributeNames()
Returns a collection of permitted attribute names for the node. |
String |
getDtmf()
Retrieve the dtmf attribute. |
String |
getEvent()
Retrieve the event attribute. |
String |
getEventexpr()
Retrieve the eventexpr attribute. |
String |
getExpr()
Retrieve the expr attribute. |
String |
getFetchaudio()
Retrieve the fetchaudio attribute. |
String |
getFetchhint()
Retrieve the fetchhint attribute. |
String |
getFetchtimeout()
Retrieve the fetchtimeout attribute. |
String |
getMaxage()
Retrieve the maxage attribute. |
String |
getMaxstale()
Retrieve the maxstale attribute. |
String |
getMessage()
Retrieve the message attribute. |
String |
getMessageexpr()
Retrieve the messageexpr attribute. |
String |
getNext()
Retrieve the next attribute. |
String |
getTagName()
Get the name of the tag for the derived node. |
VoiceXmlNode |
newInstance(Node n)
Create a new instance for the given node. |
void |
setAccept(String accept)
Set the accept attribute. |
void |
setDtmf(String dtmf)
Set the dtmf attribute. |
void |
setEvent(String event)
Set the event attribute. |
void |
setEventexpr(String eventexpr)
Set the eventexpr attribute. |
void |
setExpr(String expr)
Set the expr attribute. |
void |
setFetchaudio(String fetchaudio)
Set the fetchaudio attribute. |
void |
setFetchhint(String fetchhint)
Set the fetchhint attribute. |
void |
setFetchtimeout(String fetchtimeout)
Set the fetchtimeout attribute. |
void |
setMaxage(String maxage)
Set the maxage attribute. |
void |
setMaxstale(String maxstale)
Set the maxstale attribute. |
void |
setMessage(String message)
Set the message attribute. |
void |
setMessageexpr(String messageexpr)
Set the messageexpr attribute. |
void |
setNext(String next)
Set the next attribute. |
| Methods inherited from class org.jvoicexml.xml.vxml.VoiceXmlNode |
|---|
getChildNodes, getFirstChild, getLastChild, getNextSibling, getParentNode, getPreviousSibling |
| Methods inherited from class org.jvoicexml.xml.XmlNode |
|---|
addChild, appendChild, cloneNode, compareDocumentPosition, getAttribute, getAttributes, getBaseURI, getChildNodes, getFeature, getLocalName, getNamespaceURI, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setNodeValue, setPrefix, setTextContent, setUserData, toString, writeChildrenXml, writeXml |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG_NAME
public static final String ATTRIBUTE_DTMF
<grammar> and DTMF properties apply to recognition
of the sequence. Unlike DTMF grammars, whitespace is optional:
dtmf="123#" is equivalent to dtmf="1 2 3 #".
public static final String ATTRIBUTE_ACCEPT
<menu> for this
particular choice. When set to "exact" (the default), the text of the
choice element defines the exact phrase to be recognized. When set to
"approximate", the text of the choice element defines an approximate
recognition phrase.
public static final String ATTRIBUTE_NEXT
public static final String ATTRIBUTE_EXPR
public static final String ATTRIBUTE_EVENT
public static final String ATTRIBUTE_EVENTEXPR
public static final String ATTRIBUTE_MESSAGE
public static final String ATTRIBUTE_MESSAGEEXPR
public static final String ATTRIBUTE_FETCHAUDIO
public static final String ATTRIBUTE_FETCHTIMEOUT
public static final String ATTRIBUTE_FETCHHINT
public static final String ATTRIBUTE_MAXAGE
public static final String ATTRIBUTE_MAXSTALE
protected static final ArrayList<String> ATTRIBUTE_NAMES
private static final Set<String> CHILD_TAGS
| Constructor Detail |
|---|
public Choice()
This is necessary for the node factory.
VoiceXmlNodeFactoryChoice(Node node)
node - The encapsulated node.| Method Detail |
|---|
public String getTagName()
getTagName in class XmlNodepublic VoiceXmlNode newInstance(Node n)
newInstance in class XmlNoden - The node to encapsulate.
public String getDtmf()
ATTRIBUTE_DTMFpublic void setDtmf(String dtmf)
dtmf - Value of the dtmf attribute.ATTRIBUTE_DTMFpublic String getAccept()
ATTRIBUTE_ACCEPTpublic void setAccept(String accept)
accept - Value of the accept attribute.ATTRIBUTE_ACCEPTpublic String getNext()
ATTRIBUTE_NEXTpublic void setNext(String next)
next - Value of the next attribute.ATTRIBUTE_NEXTpublic String getExpr()
ATTRIBUTE_EXPRpublic void setExpr(String expr)
expr - Value of the expr attribute.ATTRIBUTE_EXPRpublic String getEvent()
ATTRIBUTE_EVENTpublic void setEvent(String event)
event - Value of the event attribute.ATTRIBUTE_EVENTpublic String getEventexpr()
ATTRIBUTE_EVENTEXPRpublic void setEventexpr(String eventexpr)
eventexpr - Value of the eventexpr attribute.ATTRIBUTE_EVENTEXPRpublic String getMessage()
ATTRIBUTE_MESSAGEpublic void setMessage(String message)
message - Value of the message attribute.ATTRIBUTE_MESSAGEpublic String getMessageexpr()
ATTRIBUTE_MESSAGEEXPRpublic void setMessageexpr(String messageexpr)
messageexpr - Value of the messageexpr attribute.ATTRIBUTE_MESSAGEEXPRpublic String getFetchaudio()
ATTRIBUTE_FETCHAUDIOpublic void setFetchaudio(String fetchaudio)
fetchaudio - Value of the fetchaudio attribute.ATTRIBUTE_FETCHAUDIOpublic String getFetchhint()
ATTRIBUTE_FETCHHINTpublic void setFetchhint(String fetchhint)
fetchhint - Value of the fetchhint attribute.ATTRIBUTE_FETCHHINTpublic String getFetchtimeout()
ATTRIBUTE_FETCHTIMEOUTpublic void setFetchtimeout(String fetchtimeout)
fetchtimeout - Value of the fetchtimeout attribute.ATTRIBUTE_FETCHTIMEOUTpublic String getMaxage()
ATTRIBUTE_MAXAGEpublic void setMaxage(String maxage)
maxage - Value of the maxage attribute.ATTRIBUTE_MAXAGEpublic String getMaxstale()
ATTRIBUTE_MAXSTALEpublic void setMaxstale(String maxstale)
maxstale - Value of the maxstale attribute.ATTRIBUTE_MAXSTALEpublic Text addText(String text)
text - The text to be added.
protected boolean canContainChild(String tagName)
canContainChild in class XmlNodetagName - Name of child.
public Collection<String> getAttributeNames()
getAttributeNames in class XmlNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||