public final class Prosody extends AbstractXmlNode implements VoiceXmlNode, TextContainer
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTRIBUTE_CONTOUR
Sets the actual pitch contour for the contained text.
|
static java.lang.String |
ATTRIBUTE_DURATION
A value in seconds or milliseconds for the desired time to take to
read the element contents.
|
protected static java.util.ArrayList<java.lang.String> |
ATTRIBUTE_NAMES
Supported attribute names for this node.
|
static java.lang.String |
ATTRIBUTE_PITCH
The baseline pitch for the contained text.
|
static java.lang.String |
ATTRIBUTE_RANGE
The pitch range (variability) for the contained text.
|
static java.lang.String |
ATTRIBUTE_RATE
A change in the speaking rate for the contained text.
|
static java.lang.String |
ATTRIBUTE_VOLUME
The volume for the contained text in the range 0.0 to 100.0
(higher values are louder and specifying a value of zero is
equivalent to specifying "silent").
|
static java.lang.String |
PITCH_DEFAULT
Pitch level
default. |
static java.lang.String |
PITCH_HIGH
Pitch level
high. |
static java.lang.String |
PITCH_LOW
Pitch level
low. |
static java.lang.String |
PITCH_MEDIUM
Pitch level
medium. |
static java.lang.String |
PITCH_X_HIGH
Pitch level
x-high. |
static java.lang.String |
PITCH_X_LOW
Pitch level
x-low. |
static java.lang.String |
RANGE_DEFAULT
Range level
default. |
static java.lang.String |
RANGE_HIGH
Range level
high. |
static java.lang.String |
RANGE_LOW
Range level
low. |
static java.lang.String |
RANGE_MEDIUM
Range level
medium. |
static java.lang.String |
RANGE_X_HIGH
Range level
x-high. |
static java.lang.String |
RANGE_X_LOW
Range level
x-low. |
static java.lang.String |
RATE_DEFAULT
Rate level
default. |
static java.lang.String |
RATE_FAST
Rate level
fast. |
static java.lang.String |
RATE_MEDIUM
Rate level
medium. |
static java.lang.String |
RATE_SLOW
Rate level
slow. |
static java.lang.String |
RATE_X_FAST
Rate level
x-fast. |
static java.lang.String |
RATE_X_SLOW
Rate level
x-slow. |
static java.lang.String |
TAG_NAME
Name of the tag.
|
static java.lang.String |
VOLUME_DEFAULT
Volume level
default. |
static java.lang.String |
VOLUME_LOUD
Volume level
loud. |
static java.lang.String |
VOLUME_MEDIUM
Volume level
medium. |
static java.lang.String |
VOLUME_SILENT
Volume level
silent. |
static java.lang.String |
VOLUME_SOFT
Volume level
soft. |
static java.lang.String |
VOLUME_X_LOUD
Volume level
x-loud. |
static java.lang.String |
VOLUME_X_SOFT
Volume level
x-soft. |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
Prosody()
Construct a new prosody object without a node.
|
| Modifier and Type | Method and Description |
|---|---|
Text |
addText(java.lang.String text)
Creates a new text within this node.
|
protected boolean |
canContainChild(java.lang.String tagName)
Can the specified sub-tag be contained within this node?
|
java.util.Collection<java.lang.String> |
getAttributeNames()
Returns a collection of permitted attribute names for the node.
|
java.lang.String |
getContour()
Retrieve the contour attribute.
|
java.lang.String |
getDuration()
Retrieve the duration attribute.
|
java.lang.String |
getPitch()
Retrieve the pitch attribute.
|
float |
getPitchFloat()
Retrieves the rate attribute as a float.
|
java.lang.String |
getRange()
Retrieve the range attribute.
|
java.lang.String |
getRate()
Retrieve the rate attribute.
|
float |
getRateFloat()
Retrieves the rate attribute as a float.
|
java.lang.String |
getTagName()
Get the name of the tag for the derived node.
|
java.lang.String |
getVolume()
Retrieve the volume attribute.
|
XmlNode |
newInstance(org.w3c.dom.Node n,
XmlNodeFactory<? extends XmlNode> factory)
Create a new instance for the given node.
|
void |
setContour(java.lang.String contour)
Set the contour attribute.
|
void |
setDuration(java.lang.String duration)
Set the duration attribute.
|
void |
setPitch(float pitch)
Set the pitch attribute.
|
void |
setPitch(java.lang.String pitch)
Set the pitch attribute.
|
void |
setRange(java.lang.String range)
Set the range attribute.
|
void |
setRate(float rate)
Set the rate attribute.
|
void |
setRate(java.lang.String rate)
Set the rate attribute.
|
void |
setVolume(java.lang.String volume)
Set the volume attribute.
|
addChild, addChild, appendChild, appendChild, appendDeepClone, cloneNode, compareDocumentPosition, equals, getAttribute, getAttributes, getBaseURI, getChildNodes, getChildNodes, getChildren, getDefinedAttributeNames, getFeature, getFirstChild, getFirstLevelTextContent, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeFactory, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getOwnerXmlDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttribute, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setNodeValue, setPrefix, setTextContent, setUserData, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNodeFactoryaddChild, getAttribute, getChildNodes, getChildren, getNode, setAttributeappendChild, 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, setUserDatapublic static final java.lang.String TAG_NAME
public static final java.lang.String ATTRIBUTE_PITCH
public static final java.lang.String PITCH_X_LOW
x-low.public static final java.lang.String PITCH_LOW
low.public static final java.lang.String PITCH_MEDIUM
medium.public static final java.lang.String PITCH_HIGH
high.public static final java.lang.String PITCH_X_HIGH
x-high.public static final java.lang.String PITCH_DEFAULT
default.public static final java.lang.String ATTRIBUTE_CONTOUR
public static final java.lang.String ATTRIBUTE_RANGE
public static final java.lang.String RANGE_X_LOW
x-low.public static final java.lang.String RANGE_LOW
low.public static final java.lang.String RANGE_MEDIUM
medium.public static final java.lang.String RANGE_HIGH
high.public static final java.lang.String RANGE_X_HIGH
x-high.public static final java.lang.String RANGE_DEFAULT
default.public static final java.lang.String ATTRIBUTE_RATE
public static final java.lang.String RATE_X_SLOW
x-slow.public static final java.lang.String RATE_SLOW
slow.public static final java.lang.String RATE_MEDIUM
medium.public static final java.lang.String RATE_FAST
fast.public static final java.lang.String RATE_X_FAST
x-fast.public static final java.lang.String RATE_DEFAULT
default.public static final java.lang.String ATTRIBUTE_DURATION
public static final java.lang.String ATTRIBUTE_VOLUME
public static final java.lang.String VOLUME_SILENT
silent.public static final java.lang.String VOLUME_X_SOFT
x-soft.public static final java.lang.String VOLUME_SOFT
soft.public static final java.lang.String VOLUME_MEDIUM
medium.public static final java.lang.String VOLUME_LOUD
loud.public static final java.lang.String VOLUME_X_LOUD
x-loud.public static final java.lang.String VOLUME_DEFAULT
default.protected static final java.util.ArrayList<java.lang.String> ATTRIBUTE_NAMES
public Prosody()
This is necessary for the node factory.
SsmlNodeFactorypublic java.lang.String getTagName()
getTagName in interface XmlNodepublic XmlNode newInstance(org.w3c.dom.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 Text addText(java.lang.String text)
addText in interface TextContainertext - The text to be added.public java.lang.String getPitch()
ATTRIBUTE_PITCHpublic float getPitchFloat()
ATTRIBUTE_RATEpublic void setPitch(java.lang.String pitch)
pitch - Value of the pitch attribute.ATTRIBUTE_PITCHpublic void setPitch(float pitch)
pitch - Value of the pitch attribute in Hertz.ATTRIBUTE_PITCHpublic java.lang.String getContour()
ATTRIBUTE_CONTOURpublic void setContour(java.lang.String contour)
contour - Value of the contour attribute.ATTRIBUTE_CONTOURpublic java.lang.String getRange()
ATTRIBUTE_RANGEpublic void setRange(java.lang.String range)
range - Value of the range attribute.ATTRIBUTE_RANGEpublic java.lang.String getRate()
ATTRIBUTE_RATEpublic float getRateFloat()
ATTRIBUTE_RATEpublic void setRate(java.lang.String rate)
rate - Value of the rate attribute.ATTRIBUTE_RATEpublic void setRate(float rate)
rate - Value of the rate attribute.ATTRIBUTE_RATEpublic java.lang.String getDuration()
ATTRIBUTE_DURATIONpublic void setDuration(java.lang.String duration)
duration - Value of the duration attribute.ATTRIBUTE_DURATIONpublic java.lang.String getVolume()
ATTRIBUTE_VOLUMEpublic void setVolume(java.lang.String volume)
volume - Value of the volume attribute.ATTRIBUTE_VOLUMEprotected boolean canContainChild(java.lang.String tagName)
canContainChild in class AbstractXmlNodetagName - Name of child.public java.util.Collection<java.lang.String> getAttributeNames()
getAttributeNames in interface XmlNodegetAttributeNames in class AbstractXmlNode