001/** 002 * Copyright 2001 Sun Microsystems, Inc. 003 * 004 * See the file "license.terms" for information on usage and 005 * redistribution of this file, and for a DISCLAIMER OF ALL 006 * WARRANTIES. 007 */ 008package com.sun.speech.freetts.jsapi; 009 010import java.io.InputStream; 011 012import org.w3c.dom.Document; 013 014import com.sun.speech.engine.synthesis.BaseSynthesizerQueueItem; 015import com.sun.speech.freetts.FreeTTSSpeakable; 016 017/** 018 * Represents an object on the speech output queue of a 019 * <code>FreeTTSSynthesizer</code>. 020 * Extends the BaseSynthesizerQueueItem by allowing access to the DOM 021 * document. 022 */ 023 024public class FreeTTSSynthesizerQueueItem extends BaseSynthesizerQueueItem 025 implements FreeTTSSpeakable { 026 /** 027 * Construct a queue item. 028 */ 029 public FreeTTSSynthesizerQueueItem() { 030 super(); 031 } 032 033 /** 034 * Gets the DOM document for this object. 035 * 036 * @return the DOM document for this object. 037 */ 038 public Document getDocument() { 039 return super.getDocument(); 040 } 041 042 /** 043 * Returns <code>true</code> if the item is an input stream 044 * 045 * @return true if the item is an input stream; 046 * otherwise, returns <code> false </code> 047 */ 048 public boolean isStream() { 049 return false; 050 } 051 052 /** 053 * Gets the input stream 054 * 055 * @return the input stream 056 */ 057 public InputStream getInputStream() { 058 return null; 059 } 060 061 /** 062 * Returns <code>true</code> if the item is a JSML document 063 * (Java Speech Markup Language text). 064 * 065 * @return <code> true </code> if the item is a document; 066 * otherwise, returns <code> false </code> 067 */ 068 public boolean isDocument() { 069 return super.getDocument() != null; 070 } 071 072 073 074}