|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvoicexml.xml.AbstractXmlNode
org.jvoicexml.xml.vxml.Option
public final class Option
Specify an option in a <field>.
When a simple set of alternatives is all that is needed to specify the legal
input values for a field, it may be more convenient to use an option list
than a grammar. An option list is represented by a set of
<option> elements contained in a
<field> element. Each <option>
element contains PCDATA that is used to generate a speech grammar.
Copyright © 2005-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/
Field| Field Summary | |
|---|---|
static String |
ATTRIBUTE_ACCEPT
When set to "exact" (the default), the text of the option element defines the exact phrase to be recognized. |
static String |
ATTRIBUTE_DTMF
An optional DTMF sequence for this option. |
protected static ArrayList<String> |
ATTRIBUTE_NAMES
Supported attribute names for this node. |
static String |
ATTRIBUTE_VALUE
The string to assign to the field's form item variable when a user selects this option, whether by speech or DTMF. |
static String |
TAG_NAME
Name of the tag. |
| Constructor Summary | |
|---|---|
Option()
Construct a new option object without a node. |
|
| 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. |
NodeList |
getChildNodes()
A NodeList that contains all children of this node. |
String |
getDtmf()
Retrieve the dtmf attribute. |
String |
getTagName()
Get the name of the tag for the derived node. |
String |
getValue()
Retrieve the value attribute. |
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 |
setValue(String value)
Set the value attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jvoicexml.xml.XmlNode |
|---|
addChild, getAttribute, getChildNodes, getNode, setAttribute |
| Methods inherited from interface org.jvoicexml.xml.XmlWritable |
|---|
writeChildrenXml, writeXml |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
| 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 #". If unspecified, no
DTMF sequence is associated with this option so it cannot be matched
using DTMF.
public static final String ATTRIBUTE_ACCEPT
public static final String ATTRIBUTE_VALUE
<option> element with
leading and trailing white space removed. If this does not exist, then
the DTMF sequence is used instead. If neither CDATA content nor a dtmf
sequence is specified, then the default assignment is undefined and the
field's form item variable is not filled.
protected static final ArrayList<String> ATTRIBUTE_NAMES
| Constructor Detail |
|---|
public Option()
This is necessary for the node factory.
VoiceXmlNodeFactory| Method Detail |
|---|
public String getTagName()
public VoiceXmlNode newInstance(Node n)
n - The node to encapsulate.
XmlNodeFactorypublic 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 getValue()
ATTRIBUTE_VALUEpublic void setValue(String value)
value - Value of the value attribute.ATTRIBUTE_VALUEpublic Text addText(String text)
text - The text to be added.
protected boolean canContainChild(String tagName)
canContainChild in class AbstractXmlNodetagName - Name of child.
public Collection<String> getAttributeNames()
getAttributeNames in interface XmlNodegetAttributeNames in class AbstractXmlNodepublic final NodeList getChildNodes()
NodeList that contains all children of this node.
getChildNodes in interface Node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||