edu.ucsb.nmsl.tools
Class QADTranscriptFileWriter

java.lang.Object
  extended by edu.ucsb.nmsl.tools.QADTranscriptFileWriter
All Implemented Interfaces:
TranscriptFileWriter

public class QADTranscriptFileWriter
extends java.lang.Object
implements TranscriptFileWriter

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.

Version:
1.0

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

QADTranscriptFileWriter

public QADTranscriptFileWriter()
This default constructor creates a default instance of the QADTranscriptFileWriter class.

Method Detail

writeTranscript

public 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.

Specified by:
writeTranscript in interface TranscriptFileWriter
Parameters:
t - - A Transcript instance to be written.
out - - An OutputStream instance to write the Transcript instance to.

createTimeString

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. Used to print to the XML file.

Parameters:
value - - The integer representation of time in seconds.
Returns:
A string representation of the time.

main

public static void main(java.lang.String[] args)
This method is for testing purposes only. This method is not used in the normal operation of AutoCap.