marytts.tools.voiceimport
Class AbstractTimelineMaker

java.lang.Object
  extended by marytts.tools.voiceimport.VoiceImportComponent
      extended by marytts.tools.voiceimport.AbstractTimelineMaker
Direct Known Subclasses:
VoiceQualityTimelineMaker

public abstract class AbstractTimelineMaker
extends VoiceImportComponent


Field Summary
protected  TimelineReader basenameTimeline
           
protected  java.lang.String BASENAMETIMELINE
           
protected  java.lang.String DATADIR
           
protected  java.lang.String DATAEXT
           
protected  TimelineWriter dataTimeline
           
protected  java.lang.String DATATIMELINE
           
protected  DatabaseLayout db
           
protected  int percent
           
 
Fields inherited from class marytts.tools.voiceimport.VoiceImportComponent
bnl, logger, props, props2Help
 
Constructor Summary
AbstractTimelineMaker()
           
 
Method Summary
 boolean compute()
          Read and concatenate a list of data files into a single timeline file.
 java.util.SortedMap<java.lang.String,java.lang.String> getDefaultProps(DatabaseLayout theDB)
          Get the map of properties2values containing the default values
protected abstract  java.lang.String getProcessingHeader()
          generate a processing header for the TimelineWriter
 int getProgress()
          Provide the progress of computation, in percent, or -1 if that feature is not implemented.
abstract  java.lang.String getType()
          get the type of this VoiceImportComponent
protected  void initializeDataTimeline(marytts.tools.voiceimport.AbstractDataFile dataFile)
          initialize the data timeline, using one AbstractDataFile to provide the parameters
protected abstract  marytts.tools.voiceimport.AbstractDataFile loadDataFile(java.io.File file)
          load an AbstractDataFile
protected  void setupHelp()
          
 
Methods inherited from class marytts.tools.voiceimport.VoiceImportComponent
getHelpText, getHelpTextForProp, getName, getProp, initialise, initialiseComp, setProp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATADIR

protected final java.lang.String DATADIR

DATATIMELINE

protected final java.lang.String DATATIMELINE

BASENAMETIMELINE

protected final java.lang.String BASENAMETIMELINE

DATAEXT

protected final java.lang.String DATAEXT

percent

protected int percent

db

protected DatabaseLayout db

dataTimeline

protected TimelineWriter dataTimeline

basenameTimeline

protected TimelineReader basenameTimeline
Constructor Detail

AbstractTimelineMaker

public AbstractTimelineMaker()
Method Detail

getType

public abstract java.lang.String getType()
get the type of this VoiceImportComponent

Returns:
the type

getDefaultProps

public java.util.SortedMap<java.lang.String,java.lang.String> getDefaultProps(DatabaseLayout theDB)
Get the map of properties2values containing the default values

Specified by:
getDefaultProps in class VoiceImportComponent
Returns:
map of props2values

setupHelp

protected void setupHelp()

Specified by:
setupHelp in class VoiceImportComponent

compute

public boolean compute()
                throws java.io.IOException
Read and concatenate a list of data files into a single timeline file.

Specified by:
compute in class VoiceImportComponent
Returns:
true on success, false on failure
Throws:
java.io.IOException

loadDataFile

protected abstract marytts.tools.voiceimport.AbstractDataFile loadDataFile(java.io.File file)
load an AbstractDataFile

Parameters:
file - to load
Returns:
the AbstractDataFile

initializeDataTimeline

protected void initializeDataTimeline(marytts.tools.voiceimport.AbstractDataFile dataFile)
                               throws java.io.IOException
initialize the data timeline, using one AbstractDataFile to provide the parameters

Parameters:
dataFile - to provide parameters
Throws:
java.io.IOException

getProcessingHeader

protected abstract java.lang.String getProcessingHeader()
                                                 throws java.io.IOException
generate a processing header for the TimelineWriter

Throws:
java.io.IOException

getProgress

public int getProgress()
Provide the progress of computation, in percent, or -1 if that feature is not implemented.

Specified by:
getProgress in class VoiceImportComponent
Returns:
-1 if not implemented, or an integer between 0 and 100.