net.sourceforge.jdbcimporter.columntranslator
Class StringToFileColumnTranslator

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.columntranslator.StringToFileColumnTranslator
All Implemented Interfaces:
ColumnTranslator

public class StringToFileColumnTranslator
extends java.lang.Object
implements ColumnTranslator

The StringToFileColumnTranslator translates a String into an InputStream by reading in a file whose name matches the string.

Version:
0.64
Author:
Chris Nagy

Field Summary
protected  java.lang.String baseDir
          The base directory from which the files will be read.
protected static org.apache.commons.logging.Log LOG
          The log for error information.
 
Constructor Summary
StringToFileColumnTranslator()
           
 
Method Summary
 ColumnValue getValue(ColumnDef column, ColumnValue columnValue)
          Returns the translated column value.
 void setBaseDir(java.lang.String newBaseDir)
          Sets the base directory from which the files will be read.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.commons.logging.Log LOG
The log for error information.


baseDir

protected java.lang.String baseDir
The base directory from which the files will be read.

Constructor Detail

StringToFileColumnTranslator

public StringToFileColumnTranslator()
Method Detail

setBaseDir

public void setBaseDir(java.lang.String newBaseDir)
Sets the base directory from which the files will be read.

Parameters:
newBaseDir - the base directory

getValue

public ColumnValue getValue(ColumnDef column,
                            ColumnValue columnValue)
Description copied from interface: ColumnTranslator
Returns the translated column value.

Specified by:
getValue in interface ColumnTranslator
Parameters:
column - the definition of the column
columnValue - the value of the column read from a file
Returns:
the new value of the column
See Also:
ColumnTranslator.getValue(net.sourceforge.jdbcimporter.ColumnDef, net.sourceforge.jdbcimporter.ColumnValue)