com.sun.speech.engine.synthesis.text
Class TextSynthesizerQueueItem

java.lang.Object
  extended byjavax.speech.synthesis.SynthesizerQueueItem
      extended bycom.sun.speech.engine.synthesis.BaseSynthesizerQueueItem
          extended bycom.sun.speech.engine.synthesis.text.TextSynthesizerQueueItem
All Implemented Interfaces:
SpeechEventDispatcher

public class TextSynthesizerQueueItem
extends BaseSynthesizerQueueItem

Represents an object on the speech output queue of a TextSynthesizer.


Field Summary
static java.lang.String BREAK
           
static java.lang.String[] BREAK_ATTRIBUTES
           
static java.lang.String COMMAND_PREFIX
           
static java.lang.String COMMAND_SUFFIX
           
static java.lang.String DATA_PREFIX
           
static java.lang.String DATA_SUFFIX
           
static java.lang.String DIV
           
static java.lang.String[] DIV_ATTRIBUTES
           
static java.lang.String[][] ELEMENT_ATTRIBUTES
           
static java.lang.String ELEMENT_END
           
static java.lang.String ELEMENT_START
           
static java.lang.String[] ELEMENTS
           
static java.lang.String EMPHASIS
           
static java.lang.String[] EMPHASIS_ATTRIBUTES
           
static java.lang.String ENGINE
           
static java.lang.String[] ENGINE_ATTRIBUTES
           
static java.lang.String JSML
           
static java.lang.String[] JSML_ATTRIBUTES
           
static java.lang.String MARKER
           
static java.lang.String[] MARKER_ATTRIBUTES
           
static java.lang.String PHONEME
           
static java.lang.String[] PHONEME_ATTRIBUTES
           
static java.lang.String PROSODY
           
static java.lang.String[] PROSODY_ATTRIBUTES
           
static java.lang.String SAYAS
           
static java.lang.String[] SAYAS_ATTRIBUTES
           
static java.lang.String VOICE
           
static java.lang.String[] VOICE_ATTRIBUTES
           
 
Fields inherited from class com.sun.speech.engine.synthesis.BaseSynthesizerQueueItem
itemNumber, synth, thisItemNumber
 
Fields inherited from class javax.speech.synthesis.SynthesizerQueueItem
listener, plainText, source, text
 
Constructor Summary
TextSynthesizerQueueItem()
          Class constructor.
 
Method Summary
 java.lang.String getEngineText()
          Gets the text form of this queue item.
 java.lang.String getTypeString()
          Gets the type of this queue item.
protected  void linearize(org.w3c.dom.Node n, java.lang.StringBuffer buf)
          Appends the text for this node to the given StringBuffer.
protected  java.lang.StringBuffer processAttributes(org.w3c.dom.Element element, java.lang.String[] attributes)
          Gets the list of attributes of the element and returns them in a StringBuffer.
protected  java.lang.StringBuffer processElement(org.w3c.dom.Element element, java.lang.StringBuffer buf)
          Adds any commands for this element and returns any text that might be needed to undo the effects of this element after it is processed.
protected  java.lang.StringBuffer processNode(org.w3c.dom.Node n, java.lang.StringBuffer buf)
          Adds text for just this node, and returns any text that might be needed to undo the effects of this node after it is processed.
 
Methods inherited from class com.sun.speech.engine.synthesis.BaseSynthesizerQueueItem
cancelled, completed, dispatchSpeechEvent, fireMarkerReached, fireSpeakableCancelled, fireSpeakableEnded, fireSpeakablePaused, fireSpeakableResumed, fireSpeakableStarted, fireTopOfQueue, fireWordStarted, getDocument, getItemNumber, isCancelled, isCompleted, postMarkerReached, postSpeakableCancelled, postSpeakableEnded, postSpeakablePaused, postSpeakableResumed, postSpeakableStarted, postTopOfQueue, postWordStarted, setData, setData, setData, started, waitCompleted
 
Methods inherited from class javax.speech.synthesis.SynthesizerQueueItem
getSource, getSpeakableListener, getText, isPlainText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JSML

public static final java.lang.String JSML
See Also:
Constant Field Values

JSML_ATTRIBUTES

public static final java.lang.String[] JSML_ATTRIBUTES

DIV

public static final java.lang.String DIV
See Also:
Constant Field Values

DIV_ATTRIBUTES

public static final java.lang.String[] DIV_ATTRIBUTES

VOICE

public static final java.lang.String VOICE
See Also:
Constant Field Values

VOICE_ATTRIBUTES

public static final java.lang.String[] VOICE_ATTRIBUTES

SAYAS

public static final java.lang.String SAYAS
See Also:
Constant Field Values

SAYAS_ATTRIBUTES

public static final java.lang.String[] SAYAS_ATTRIBUTES

PHONEME

public static final java.lang.String PHONEME
See Also:
Constant Field Values

PHONEME_ATTRIBUTES

public static final java.lang.String[] PHONEME_ATTRIBUTES

EMPHASIS

public static final java.lang.String EMPHASIS
See Also:
Constant Field Values

EMPHASIS_ATTRIBUTES

public static final java.lang.String[] EMPHASIS_ATTRIBUTES

BREAK

public static final java.lang.String BREAK
See Also:
Constant Field Values

BREAK_ATTRIBUTES

public static final java.lang.String[] BREAK_ATTRIBUTES

PROSODY

public static final java.lang.String PROSODY
See Also:
Constant Field Values

PROSODY_ATTRIBUTES

public static final java.lang.String[] PROSODY_ATTRIBUTES

MARKER

public static final java.lang.String MARKER
See Also:
Constant Field Values

MARKER_ATTRIBUTES

public static final java.lang.String[] MARKER_ATTRIBUTES

ENGINE

public static final java.lang.String ENGINE
See Also:
Constant Field Values

ENGINE_ATTRIBUTES

public static final java.lang.String[] ENGINE_ATTRIBUTES

ELEMENTS

public static final java.lang.String[] ELEMENTS

ELEMENT_ATTRIBUTES

public static final java.lang.String[][] ELEMENT_ATTRIBUTES

COMMAND_PREFIX

public static final java.lang.String COMMAND_PREFIX
See Also:
Constant Field Values

COMMAND_SUFFIX

public static final java.lang.String COMMAND_SUFFIX
See Also:
Constant Field Values

DATA_PREFIX

public static final java.lang.String DATA_PREFIX
See Also:
Constant Field Values

DATA_SUFFIX

public static final java.lang.String DATA_SUFFIX
See Also:
Constant Field Values

ELEMENT_START

public static final java.lang.String ELEMENT_START
See Also:
Constant Field Values

ELEMENT_END

public static final java.lang.String ELEMENT_END
See Also:
Constant Field Values
Constructor Detail

TextSynthesizerQueueItem

public TextSynthesizerQueueItem()
Class constructor.

Method Detail

getTypeString

public java.lang.String getTypeString()
Gets the type of this queue item.

Returns:
a String for debug purposes

linearize

protected void linearize(org.w3c.dom.Node n,
                         java.lang.StringBuffer buf)
Appends the text for this node to the given StringBuffer.

Parameters:
n - the node to traverse in depth-first order
buf - the buffer to append text to

processNode

protected java.lang.StringBuffer processNode(org.w3c.dom.Node n,
                                             java.lang.StringBuffer buf)
Adds text for just this node, and returns any text that might be needed to undo the effects of this node after it is processed.

Parameters:
n - the node to traverse in depth-first order
buf - the buffer to append text to
Returns:
a String containing text to undo the effects of the node

processElement

protected java.lang.StringBuffer processElement(org.w3c.dom.Element element,
                                                java.lang.StringBuffer buf)
Adds any commands for this element and returns any text that might be needed to undo the effects of this element after it is processed.

Parameters:
element - the element to traverse in depth-first order
buf - the buffer to append text to
Returns:
a String containing text to undo the effects of the element

processAttributes

protected java.lang.StringBuffer processAttributes(org.w3c.dom.Element element,
                                                   java.lang.String[] attributes)
Gets the list of attributes of the element and returns them in a StringBuffer.

Parameters:
element - the element containing attributes (if any)
attributes - the allowed attributes for element
Returns:
a buffer containing the attributes in text form

getEngineText

public java.lang.String getEngineText()
Gets the text form of this queue item.

Returns:
the text form of this queue item.