Class TimeBase

java.lang.Object
  |
  +--TimeBase

public class TimeBase
extends java.lang.Object


Field Summary
 int centisecond
           
 
Constructor Summary
TimeBase()
          Basic Constructor of the class.
TimeBase(int timeCenti)
          Constructor of the Class set the attribute centisecon to timeCenti
TimeBase(java.lang.String dateTime, java.lang.String type)
          Constructor creating TimeBase Object from different date string formats.
 
Method Summary
 TimeBase add(TimeBase time2)
          Method used to add two TimeBase object
 TimeBase getDifferenceBetween(TimeBase time2)
          Get the length of time between the current TimeBase and the one in argument
 int getint()
          Return the attribute centisecond of a TimeBase object
 java.lang.String toHHMMssString()
          Convert a TimeBase Object into a String in format HH:MM:ss.cc which is the time format of the reference
 java.lang.String toString()
          Convert a TimeBase Object into a String in format sssss.cc which is the time format of the submissions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

centisecond

public int centisecond
Constructor Detail

TimeBase

public TimeBase()
Basic Constructor of the class. it sets the attribute centisecond to 0


TimeBase

public TimeBase(int timeCenti)
Constructor of the Class set the attribute centisecon to timeCenti

Parameters:
timeCenti - int which represent the number of centiseconds.

TimeBase

public TimeBase(java.lang.String dateTime,
                java.lang.String type)
Constructor creating TimeBase Object from different date string formats.
 
type can have 4 different values :
                        - "src_sgm"    : dateTime is like HH:MM:ss.cc  ex : 21:39:46.78
                        - "submission" : dateTime is like sss.cc     ex: 198.28
                        - "clipping"   : dateTime is like sss.mmm     ex: 198.287
                        - "length"     : dateTime is like MM:SS:mmm  ex: 28:27:198
                        - "alignment"  : dateTime is like ss.cc or -ss.cc ex: -28.64
For the clipping and the length we only keep the centiseconds.

Parameters:
dateTime - it is a string from a file of submission or refrence or offset of the table of length
type - string which can have 4 values as it is decribed above.
Method Detail

getint

public int getint()
Return the attribute centisecond of a TimeBase object

Returns:
an int

toString

public java.lang.String toString()
Convert a TimeBase Object into a String in format sssss.cc which is the time format of the submissions

Overrides:
toString in class java.lang.Object
Returns:
the string convertion

toHHMMssString

public java.lang.String toHHMMssString()
Convert a TimeBase Object into a String in format HH:MM:ss.cc which is the time format of the reference

Returns:
the string convertion

getDifferenceBetween

public TimeBase getDifferenceBetween(TimeBase time2)
Get the length of time between the current TimeBase and the one in argument

Parameters:
time2 - TimeBase object defining a segment
Returns:
a TimeBase Object equal to the length between the two times

add

public TimeBase add(TimeBase time2)
Method used to add two TimeBase object

Parameters:
time2 - the timeBase object you want to add to the current one
Returns:
a TimeBase object which is the result of the addition