|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.dfki.lt.mary.MaryData
public class MaryData
A representation of any type of mary data, be it input, intermediate or output data. The "technical" representation of the read data is hidden from the caller, but can be accessed on request. Internally, the data is appropriately represented according to this data's type, i.e. as a String containing plain text, an XML DOM tree, or an input stream containing audio data.
| Constructor Summary | |
|---|---|
MaryData(MaryDataType type)
|
|
MaryData(MaryDataType type,
boolean createStubDocument)
|
|
| Method Summary | |
|---|---|
void |
append(MaryData md)
|
void |
appendAudio(javax.sound.sampled.AudioInputStream audioToAppend)
For audio data, append more audio data to the one currently present. |
javax.sound.sampled.AudioInputStream |
getAudio()
|
javax.sound.sampled.AudioFileFormat |
getAudioFileFormat()
|
java.lang.Object |
getData()
|
java.lang.String |
getDefaultEffects()
|
java.lang.String |
getDefaultStyle()
|
Voice |
getDefaultVoice()
|
org.w3c.dom.Document |
getDocument()
|
java.lang.String |
getPlainText()
|
java.util.List |
getUtterances()
|
boolean |
getValidating()
|
boolean |
getWarnClient()
|
void |
readFrom(java.io.InputStream is)
Read data from input stream is,
in the appropriate way as determined by our type. |
void |
readFrom(java.io.InputStream is,
java.lang.String endMarker)
Read data from input stream is,
in the appropriate way as determined by our type. |
void |
readFrom(java.io.Reader from)
Read data from reader r
in the appropriate way as determined by our type. |
void |
readFrom(java.io.Reader from,
java.lang.String endMarker)
Read data from reader r
in the appropriate way as determined by our type. |
void |
setAudio(javax.sound.sampled.AudioInputStream audio)
Set the audio data. |
void |
setAudioFileFormat(javax.sound.sampled.AudioFileFormat audioFileFormat)
The audio file format is required only for data types serving as input to modules producing AUDIO data (e.g., MBROLA data), as well as for the AUDIO data itself. |
void |
setDefaultEffects(java.lang.String effects)
|
void |
setDefaultStyle(java.lang.String style)
|
void |
setDefaultVoice(Voice voice)
|
void |
setDocument(org.w3c.dom.Document xmlDocument)
|
void |
setPlainText(java.lang.String plainText)
|
void |
setUtterances(java.util.List utterances)
|
void |
setValidating(boolean doValidate)
|
void |
setWarnClient(boolean doWarnClient)
|
MaryDataType |
type()
|
void |
writeTo(java.io.OutputStream os)
Write our internal representation to output stream os,
in the appropriate way as determined by our type. |
void |
writeTo(java.io.Writer w)
Write our internal representation to writer w,
in the appropriate way as determined by our type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MaryData(MaryDataType type)
public MaryData(MaryDataType type,
boolean createStubDocument)
| Method Detail |
|---|
public boolean getValidating()
public void setValidating(boolean doValidate)
throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationExceptionpublic boolean getWarnClient()
public void setWarnClient(boolean doWarnClient)
public MaryDataType type()
public void readFrom(java.io.InputStream is)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
is,
in the appropriate way as determined by our type.
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public void readFrom(java.io.InputStream is,
java.lang.String endMarker)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
is,
in the appropriate way as determined by our type.
is - the InputStream from which to read.endMarker - a string marking end of file. If this is null, read until
end-of-file; if it is non-null, read up to (and including) the first line containing
the end marker string. This will be ignored for audio data.
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public void readFrom(java.io.Reader from)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
r
in the appropriate way as determined by our type.
Only XML and Text data can be read from a reader, audio data cannot.
"Helpers" needed to read the data, such as XML parser objects,
are created when they are needed.
If doWarnClient is set to true, warning and error messages related
to XML parsing are logged to the log category connected to the client
from which this request originated.
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public void readFrom(java.io.Reader from,
java.lang.String endMarker)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
r
in the appropriate way as determined by our type.
Only XML and Text data can be read from a reader, audio data cannot.
"Helpers" needed to read the data, such as XML parser objects,
are created when they are needed.
If doWarnClient is set to true, warning and error messages related
to XML parsing are logged to the log category connected to the client
from which this request originated.
from - the Reader from which to read.endMarker - a string marking end of file. If this is null, read until
end-of-file; if it is non-null, read up to (and including) the first line containing
the end marker string.
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public void writeTo(java.io.OutputStream os)
throws javax.xml.transform.TransformerConfigurationException,
java.io.FileNotFoundException,
javax.xml.transform.TransformerException,
java.io.IOException,
java.lang.Exception
os,
in the appropriate way as determined by our type.
javax.xml.transform.TransformerConfigurationException
java.io.FileNotFoundException
javax.xml.transform.TransformerException
java.io.IOException
java.lang.Exception
public void writeTo(java.io.Writer w)
throws javax.xml.transform.TransformerConfigurationException,
java.io.FileNotFoundException,
javax.xml.transform.TransformerException,
java.io.IOException,
java.lang.Exception
w,
in the appropriate way as determined by our type.
Only XML and Text data can be written to a writer, audio data cannot.
"Helpers" needed to read the data, such as XML parser objects,
are created when they are needed.
javax.xml.transform.TransformerConfigurationException
java.io.FileNotFoundException
javax.xml.transform.TransformerException
java.io.IOException
java.lang.Exceptionpublic java.lang.Object getData()
public java.lang.String getPlainText()
public void setPlainText(java.lang.String plainText)
public org.w3c.dom.Document getDocument()
public void setDocument(org.w3c.dom.Document xmlDocument)
public javax.sound.sampled.AudioInputStream getAudio()
public void setAudio(javax.sound.sampled.AudioInputStream audio)
audio - public java.util.List getUtterances()
public void setUtterances(java.util.List utterances)
public void setDefaultVoice(Voice voice)
public Voice getDefaultVoice()
public void setDefaultStyle(java.lang.String style)
public java.lang.String getDefaultStyle()
public void setDefaultEffects(java.lang.String effects)
public java.lang.String getDefaultEffects()
public void setAudioFileFormat(javax.sound.sampled.AudioFileFormat audioFileFormat)
public javax.sound.sampled.AudioFileFormat getAudioFileFormat()
public void append(MaryData md)
public void appendAudio(javax.sound.sampled.AudioInputStream audioToAppend)
audioToAppend - the new audio data to append
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||