edu.cmu.sphinx.frontend.util
Class DataConverter

java.lang.Object
  extended by edu.cmu.sphinx.frontend.BaseDataProcessor
      extended by edu.cmu.sphinx.frontend.util.DataConverter
All Implemented Interfaces:
DataProcessor, Configurable

public class DataConverter
extends BaseDataProcessor

A simple converter which converts DoubleData to FloatData and vv (depending on its configuration). All remaining Datas will pass this processor unchanged.

Author:
Holger Brandl

Field Summary
static java.lang.String CONVERT_D2F
           
static java.lang.String CONVERT_F2D
           
static java.lang.String PROP_CONVERSION_MODE
           
 
Constructor Summary
DataConverter()
           
 
Method Summary
 Data getData()
          Returns the processed Data output.
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, initialize, setPredecessor, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONVERT_D2F

public static final java.lang.String CONVERT_D2F
See Also:
Constant Field Values

CONVERT_F2D

public static final java.lang.String CONVERT_F2D
See Also:
Constant Field Values

PROP_CONVERSION_MODE

@S4String(defaultValue="d2f",
          range={"d2f","f2d"})
public static final java.lang.String PROP_CONVERSION_MODE
See Also:
Constant Field Values
Constructor Detail

DataConverter

public DataConverter()
Method Detail

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component needs to be reconfigured.

Specified by:
newProperties in interface Configurable
Overrides:
newProperties in class BaseDataProcessor
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

getData

public Data getData()
             throws DataProcessingException
Description copied from class: BaseDataProcessor
Returns the processed Data output.

Specified by:
getData in interface DataProcessor
Specified by:
getData in class BaseDataProcessor
Returns:
an Data object that has been processed by this DataProcessor
Throws:
DataProcessingException - if a data processor error occurs