public class CsvConfigFileWriter extends DynamicConfigFileWriter
SciPgeConfigFileWriter which takes a comma separted list of
Strings as the first index of the args and generates a CSV file from
the metadata fields listed. For example, if the list of Strings given
is:
InputFiles,IsText
And:
InputFiles=File1.txt,File2.dat,File3.xml
IsText=true,false,true
Then the CSV file create will look like:
InputFiles,IsText
File1.text,true
File2.dat,false
File3.xml,true
| Constructor and Description |
|---|
CsvConfigFileWriter() |
| Modifier and Type | Method and Description |
|---|---|
File |
generateFile(String filePath,
Metadata metadata,
Logger logger,
Object... customArgs)
Generates a config file for CAS-PGE to use as PGE input with the given
default logger.
|
protected List<List<String>> |
generateRows(List<String> header,
Metadata meatadata) |
protected File |
writeCsvFile(String file,
List<String> header,
List<List<String>> rows,
String delim) |
createConfigFilepublic File generateFile(String filePath, Metadata metadata, Logger logger, Object... customArgs) throws IOException
DynamicConfigFileWritergenerateFile in class DynamicConfigFileWriterfilePath - The name of the config file to generate.metadata - Input CAS-PGE metadata.logger - The logger to write any status information to.customArgs - Any custom parameters needed for the writer to write the input
config file.IOExceptionprotected File writeCsvFile(String file, List<String> header, List<List<String>> rows, String delim) throws IOException
IOExceptionCopyright © 1999–2017 Apache OODT. All rights reserved.