|
||||||||||
| 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.ssml.Voice
public final class Voice
The voice element is a production element that requests a change in speaking voice.
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_AGE
Optional attribute indicating the preferred age in years (since birth) of the voice to speak the contained text. |
static String |
ATTRIBUTE_GENDER
Optional attribute indicating the preferred gender of the voice to speak the contained text. |
static String |
ATTRIBUTE_NAME
optional attribute indicating a preferred variant of the other voice characteristics to speak the contained text. |
protected static ArrayList<String> |
ATTRIBUTE_NAMES
Supported attribute names for this node. |
static String |
ATTRIBUTE_VARIANT
optional attribute indicating a preferred variant of the other voice characteristics to speak the contained text. |
static String |
ATTRIBUTE_XML_LANG
Optional language specification attribute. |
static String |
TAG_NAME
Name of the tag. |
| Constructor Summary | |
|---|---|
Voice()
Construct a new voice object without a node. |
|
| Method Summary | |
|---|---|
Text |
addText(String text)
Creates a new text within this node. |
protected boolean |
canContainChild(String tagName)
Can the specified sub-tag be contained within this node? |
String |
getAge()
Retrieve the age attribute. |
int |
getAgeAsInt()
Retrieves the age attribute as an integer. |
Collection<String> |
getAttributeNames()
Returns a collection of permitted attribute names for the node. |
GenderType |
getGender()
Retrieve the gender attribute. |
String |
getGenderName()
Retrieve the gender attribute. |
String |
getName()
Retrieve the name attribute. |
String |
getTagName()
Get the name of the tag for the derived node. |
String |
getVariant()
Retrieve the variant attribute. |
String |
getXmlLang()
Retrieve the xml:lang attribute. |
XmlNode |
newInstance(Node n,
XmlNodeFactory<? extends XmlNode> factory)
Create a new instance for the given node. |
void |
setAge(int age)
Set the age attribute. |
void |
setAge(String age)
Set the age attribute. |
void |
setGender(GenderType gender)
Set the gender attribute. |
void |
setGender(String gender)
Set the gender attribute. |
void |
setName(String name)
Set the name attribute. |
void |
setVariant(String variant)
Set the variant attribute. |
void |
setXmlLang(String xmlLang)
Set the xml:lang attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jvoicexml.xml.TextContainer |
|---|
getNodeFactory |
| Methods inherited from interface org.jvoicexml.xml.XmlNode |
|---|
addChild, getAttribute, getChildNodes, getChildren, getNode, setAttribute |
| 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_XML_LANG
public static final String ATTRIBUTE_GENDER
public static final String ATTRIBUTE_AGE
public static final String ATTRIBUTE_VARIANT
public static final String ATTRIBUTE_NAME
protected static final ArrayList<String> ATTRIBUTE_NAMES
| Constructor Detail |
|---|
public Voice()
This is necessary for the node factory.
VoiceXmlNodeFactory| Method Detail |
|---|
public String getTagName()
getTagName in interface XmlNode
public XmlNode newInstance(Node n,
XmlNodeFactory<? extends XmlNode> factory)
Each XmlNode can serve as a prototype in a
XmlNodeFactory to produce a collection of
child nodes. Factories can then use the prototype pattern to
produce new nodes.
newInstance in interface XmlNoden - The node to encapsulate.factory - the factroy that calls this method.
XmlNodeFactorypublic String getXmlLang()
ATTRIBUTE_XML_LANGpublic void setXmlLang(String xmlLang)
xmlLang - Value of the xml:lang attribute.ATTRIBUTE_XML_LANGpublic String getGenderName()
ATTRIBUTE_GENDERpublic GenderType getGender()
ATTRIBUTE_GENDERpublic void setGender(String gender)
gender - Value of the gender attribute.ATTRIBUTE_GENDERpublic void setGender(GenderType gender)
gender - Value of the gender attribute.ATTRIBUTE_GENDERpublic String getAge()
ATTRIBUTE_AGEpublic int getAgeAsInt()
-1 if no age is specified.public void setAge(String age)
age - Value of the age attribute.ATTRIBUTE_AGEpublic void setAge(int age)
age - Value of the age attribute.ATTRIBUTE_AGEpublic String getVariant()
ATTRIBUTE_VARIANTpublic void setVariant(String variant)
variant - Value of the variant attribute.ATTRIBUTE_VARIANTpublic String getName()
ATTRIBUTE_NAMEpublic void setName(String name)
name - Value of the name attribute.ATTRIBUTE_NAMEpublic Text addText(String text)
addText in interface TextContainertext - 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 AbstractXmlNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||