edu.ucsb.nmsl.tools
Class QADTranscriptFileReader

java.lang.Object
  extended by edu.ucsb.nmsl.tools.QADTranscriptFileReader
All Implemented Interfaces:
TranscriptFileReader

public class QADTranscriptFileReader
extends java.lang.Object
implements TranscriptFileReader

This class is an implementation of the TranscriptFileReader interface that is used to read transcripts from 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 TranscriptFileReader interface.

Version:
1.0

Constructor Summary
QADTranscriptFileReader()
          This default constructor creates a default instance of the QADTranscriptFileReader class.
 
Method Summary
static void main(java.lang.String[] args)
          This method is for testing purposes only.
 Transcript readTranscript(org.w3c.dom.Document d)
          This method accepts a Document instance to read captions and time stamps from in order to create an instance of a Transcript object.
 Transcript readTranscript(java.io.InputStream in)
          This method accepts an InputStream instance to read captions and time stamps from in order to create an instance of a Transcript object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QADTranscriptFileReader

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

Method Detail

readTranscript

public Transcript readTranscript(java.io.InputStream in)
This method accepts an InputStream instance to read captions and time stamps from in order to create an instance of a Transcript object.

Specified by:
readTranscript in interface TranscriptFileReader
Parameters:
in - - An InputStream instance that Transcript information will be read from.
Returns:
A newly created Transcript instance created based on the information read from the InputStream.

readTranscript

public Transcript readTranscript(org.w3c.dom.Document d)
This method accepts a Document instance to read captions and time stamps from in order to create an instance of a Transcript object. The Document object is defined as part of the default XML DOM implementation that accompanies the JVM from Sun.

Specified by:
readTranscript in interface TranscriptFileReader
Parameters:
d - - An instance of a Document object that contains the caption information in an XML DOM object.
Returns:
A newly created Transcript instance created based on the information read from the InputStream.

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.