edu.ucsb.nmsl.tools
Class Caption.CaptionChunk

java.lang.Object
  extended by edu.ucsb.nmsl.tools.Caption.CaptionChunk
Enclosing class:
Caption

public class Caption.CaptionChunk
extends java.lang.Object

This inner class is responsible for storing the individual caption chunks that make up a caption. This implementation defines a caption chunk as a word.

Version:
1.0
Author:
Allan Knight
See Also:
Caption

Field Summary
protected  java.lang.String caption
          The text of the caption
protected  double finishTime
          The time-stamp that indicates when the end of the caption chunk occured in the media file.
protected  double maxError
          The estimated maximum error for the start of the word.
protected  double startTime
          The time-stamp that indicates when the start of the caption chunk occured in the media file.
 
Constructor Summary
Caption.CaptionChunk(double s, double f, java.lang.String c)
          This contructor creates a CaptionChunk instance and sets the start and finish times of the caption along with the text of the caption.
 
Method Summary
 java.lang.String getCaption()
          This accessor method returns the text of the caption chunk, or word.
 double getFinishTime()
          This accessor method returns the finish time-stamp of the caption.
 double getMaxError()
          This accessor method returns the estimated maximum error associated with the start time-stamp of a CaptionChunk instance.
 double getStartTime()
          This accessor method returns the start time-stamp of the caption.
 void setCaption(java.lang.String c)
          This mutator method sets the text of the caption chunk.
 void setFinishTime(double t)
          This mutator method sets the finish time-stamp associated with the caption chunk.
 void setMaxError(double x)
          This mutator method sets the maximum caption error associated with a caption chunk.
 void setStartTime(double t)
          This mutator method sets the start time-stamp associated with the caption chunk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caption

protected java.lang.String caption
The text of the caption


startTime

protected double startTime
The time-stamp that indicates when the start of the caption chunk occured in the media file.


finishTime

protected double finishTime
The time-stamp that indicates when the end of the caption chunk occured in the media file.


maxError

protected double maxError
The estimated maximum error for the start of the word. See the research paper associated with this work for more information

Constructor Detail

Caption.CaptionChunk

public Caption.CaptionChunk(double s,
                            double f,
                            java.lang.String c)
This contructor creates a CaptionChunk instance and sets the start and finish times of the caption along with the text of the caption.

Parameters:
s - The start time, in seconds, of the caption.
f - The finish time, in seconds, of the caption.
c - The text of the caption, in this case a word.
Method Detail

getStartTime

public double getStartTime()
This accessor method returns the start time-stamp of the caption.

Returns:
The start time-stamp, in seconds, of the caption chunk.

getFinishTime

public double getFinishTime()
This accessor method returns the finish time-stamp of the caption.

Returns:
The finish time-stamp, in seconds, of the caption chunk.

getMaxError

public double getMaxError()
This accessor method returns the estimated maximum error associated with the start time-stamp of a CaptionChunk instance.

Returns:
The estimated maximum error in seconds.

getCaption

public java.lang.String getCaption()
This accessor method returns the text of the caption chunk, or word.

Returns:
The caption chunk text.

setStartTime

public void setStartTime(double t)
This mutator method sets the start time-stamp associated with the caption chunk.

Parameters:
t - The start time-stamp of the caption chunk in seconds.

setFinishTime

public void setFinishTime(double t)
This mutator method sets the finish time-stamp associated with the caption chunk.

Parameters:
t - The finish time-stamp of the caption chunk in seconds.

setMaxError

public void setMaxError(double x)
This mutator method sets the maximum caption error associated with a caption chunk.

Parameters:
x - The estimated caption error in seconds.

setCaption

public void setCaption(java.lang.String c)
This mutator method sets the text of the caption chunk.

Parameters:
c - The caption chunk, or word, as a String.