upstream version 1.2.2
[debian/freetts] / com / sun / speech / freetts / jsapi / FreeTTSSynthesizerQueueItem.java
1 /**
2  * Copyright 2001 Sun Microsystems, Inc.
3  * 
4  * See the file "license.terms" for information on usage and
5  * redistribution of this file, and for a DISCLAIMER OF ALL 
6  * WARRANTIES.
7  */
8 package com.sun.speech.freetts.jsapi;
9
10 import javax.speech.Engine;
11 import javax.speech.synthesis.Speakable;
12 import javax.speech.synthesis.SpeakableEvent;
13
14 import com.sun.speech.engine.synthesis.BaseSynthesizer;
15 import com.sun.speech.engine.synthesis.BaseSynthesizerQueueItem;
16 import com.sun.speech.freetts.FreeTTSSpeakable;
17
18 import java.net.URL;
19 import java.io.IOException;
20 import java.io.InputStream;
21
22 import org.w3c.dom.Document;
23 import org.w3c.dom.Node;
24 import org.w3c.dom.Text;
25
26 /**
27  * Represents an object on the speech output queue of a
28  * <code>FreeTTSSynthesizer</code>.
29  * Extends the BaseSynthesizerQueueItem by allowing access to the DOM
30  * document.
31  */
32
33 public class FreeTTSSynthesizerQueueItem extends BaseSynthesizerQueueItem 
34                 implements FreeTTSSpeakable {
35     /**
36      * Construct a queue item.
37      */
38     public FreeTTSSynthesizerQueueItem() {
39         super();
40     }
41
42     /**
43      * Gets the DOM document for this object.
44      *
45      * @return the DOM document for this object.
46      */
47     public Document getDocument() {
48         return super.getDocument();
49     }
50
51    /**
52     * Returns <code>true</code> if the item is an input stream
53     *
54     * @return true if the item is an input stream;
55     *   otherwise, returns <code> false </code>
56     */
57     public boolean isStream() {
58         return false;
59     }
60
61     /**
62      * Gets the input stream
63      *
64      * @return the input stream
65      */
66     public InputStream getInputStream() {
67         return null;
68     }
69
70    /**
71     * Returns <code>true</code> if the item is a JSML document
72     * (Java Speech Markup Language text).
73     *
74     * @return <code> true </code> if the item is a document; 
75     *   otherwise, returns <code> false </code>
76     */
77     public boolean isDocument() {
78         return super.getDocument() != null;
79     }
80
81
82
83 }