public class CsvConfigFileWriter extends DynamicConfigFileWriter
SciPgeConfigFileWriter
which takes a comma separted list of
String
s as the first index of the args and generates a CSV file from
the metadata fields listed. For example, if the list of String
s given
is:
InputFiles,IsTextAnd:
InputFiles=File1.txt,File2.dat,File3.xml IsText=true,false,trueThen 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) |
createConfigFile
public File generateFile(String filePath, Metadata metadata, Logger logger, Object... customArgs) throws IOException
DynamicConfigFileWriter
generateFile
in class DynamicConfigFileWriter
filePath
- 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.IOException
protected File writeCsvFile(String file, List<String> header, List<List<String>> rows, String delim) throws IOException
IOException
Copyright © 1999–2017 Apache OODT. All rights reserved.