|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ucsb.nmsl.tools.QADTranscriptFileWriter
public class QADTranscriptFileWriter
This class is an implementation of the TranscriptFileWriter interface that is used to write transcripts to disk in the format used for educational materials created by QAD, Inc. This format is specific to their needs and is in no way derived from any other standard used for storing multimedia meta data.
The QAD caption file format consists of an XML file that is capable of storing the captions along with the time the caption is spoken in an associated video. These captions can be in multiple languages. The folling is an example of what is contained withing a QAD caption file:
<xml> <captions> <time value="00:00:02"> <language="English" text="caption 1"/> </time> <time value="00:00:10"> <language="English" text="caption 2"/> </time> </captions> </xml>
The above XML represents the captions as a node called "caption" with multiple child nodes called "time". Each time node represents a caption that has multiple "language" children. These "language" children represent the caption text that is to be displayed for a particular language. One "langauge" element is diplayed based on the preferred language of the viewer of the material.
Other formats can be used by AutoCap by other implementations of the TranscriptFileWriter interface.
Constructor Summary | |
---|---|
QADTranscriptFileWriter()
This default constructor creates a default instance of the QADTranscriptFileWriter class. |
Method Summary | |
---|---|
protected java.lang.String |
createTimeString(int value)
Helper function that converts and integer, representing the number of seconds, into a string of the format HH:MM:SS. |
static void |
main(java.lang.String[] args)
This method is for testing purposes only. |
void |
writeTranscript(Transcript t,
java.io.OutputStream out)
This method accepts a Transcript object in order for the caption and time- stamps to be written to an OutputStream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QADTranscriptFileWriter()
Method Detail |
---|
public void writeTranscript(Transcript t, java.io.OutputStream out)
writeTranscript
in interface TranscriptFileWriter
t
- - A Transcript instance to be written.out
- - An OutputStream instance to write the Transcript instance to.protected java.lang.String createTimeString(int value)
value
- - The integer representation of time in seconds.
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |