|
||||||||||
| 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.srgs.Item
public final class Item
Define an expansion with optional repeating and probability. An item element can surround any expansion to permit a repeat attribute or language identifier to be attached.
Copyright © 2005-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/
| Field Summary | |
|---|---|
protected static ArrayList<String> |
ATTRIBUTE_NAMES
Supported attribute names for this node. |
static String |
ATTRIBUTE_REPEAT
Defines a legal rule expansion as being another sub-expansion that is optional, that is repeated zero or more times, that is repeated one or more times, or that is repeated some range of times. |
static String |
ATTRIBUTE_REPEAT_PROB
Any repeat operator may specify an optional repeat probability. |
static String |
ATTRIBUTE_WEIGHT
A weight may be optionally provided for any number of alternatives in an alternative expansion. |
static String |
ATTRIBUTE_XML_LANG
The language identifier for the grammar. |
static String |
TAG_NAME
Name of the tag. |
| Constructor Summary | |
|---|---|
Item()
Construct a new item 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? |
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 |
getRepeat()
Retrieve the repeat attribute. |
String |
getRepeatProb()
Retrieve the repeatProb attribute. |
String |
getTagName()
Get the name of the tag for the derived node. |
String |
getWeight()
Retrieve the weight attribute. |
String |
getXmlLang()
Retrieve the xmlLang attribute. |
VoiceXmlNode |
newInstance(Node n)
Create a new instance for the given node. |
void |
setRepeat(String repeat)
Set the repeat attribute. |
void |
setRepeatProb(String repeatProb)
Set the repeatProb attribute. |
void |
setWeight(String weight)
Set the weight attribute. |
void |
setXmlLang(String xmlLang)
Set the xmlLang 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, getChildNodes, 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_REPEAT
public static final String ATTRIBUTE_REPEAT_PROB
public static final String ATTRIBUTE_WEIGHT
public static final String ATTRIBUTE_XML_LANG
protected static final ArrayList<String> ATTRIBUTE_NAMES
| Constructor Detail |
|---|
public Item()
This is necessary for the node factory.
VoiceXmlNodeFactory| Method Detail |
|---|
public String getTagName()
getTagName in interface XmlNodepublic VoiceXmlNode newInstance(Node n)
newInstance in interface XmlNoden - The node to encapsulate.
XmlNodeFactorypublic String getRepeat()
ATTRIBUTE_REPEATpublic void setRepeat(String repeat)
repeat - Value of the repeat attribute.ATTRIBUTE_REPEATpublic String getRepeatProb()
ATTRIBUTE_REPEAT_PROBpublic void setRepeatProb(String repeatProb)
repeatProb - Value of the repeatProb attribute.ATTRIBUTE_REPEAT_PROBpublic String getWeight()
ATTRIBUTE_WEIGHTpublic void setWeight(String weight)
weight - Value of the weight attribute.ATTRIBUTE_WEIGHTpublic String getXmlLang()
ATTRIBUTE_XML_LANGpublic void setXmlLang(String xmlLang)
xmlLang - Value of the xmlLang attribute.ATTRIBUTE_XML_LANGpublic 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 | |||||||||