Class FeatureTableCSVGenerator<T>
Object
SingleFileTypeGenerator<T,T>
OneStageGenerator<T>
CSVGenerator<T>
FeatureTableCSVGenerator<T>
- Type Parameters:
T- type of object that describes all rows of feature calculations.
- All Implemented Interfaces:
Generator<T>,TransformingGenerator<T,,T> ElementWriter<T>
Base class for a
Generator that outputs a feature-table in CSV format.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureTableCSVGenerator(List<String> headerNames) Creates a newFeatureTableCSVGeneratorinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidwriteFeaturesToCSV(CSVWriter writer, T allFeatureResults, List<String> headerNames) Writes the features to the CSV-file.voidwriteToFile(T element, OutputWriteSettings settings, Path filePath) Methods inherited from class org.anchoranalysis.io.generator.tabular.CSVGenerator
selectFileExtensionMethods inherited from class org.anchoranalysis.io.generator.OneStageGenerator
transformMethods inherited from class org.anchoranalysis.io.generator.SingleFileTypeGenerator
write, writeWithIndex
-
Constructor Details
-
FeatureTableCSVGenerator
-
-
Method Details
-
writeToFile
public void writeToFile(T element, OutputWriteSettings settings, Path filePath) throws OutputWriteFailedException - Specified by:
writeToFilein classSingleFileTypeGenerator<T,T> - Throws:
OutputWriteFailedException
-
writeFeaturesToCSV
protected abstract void writeFeaturesToCSV(CSVWriter writer, T allFeatureResults, List<String> headerNames) throws OutputWriteFailedException Writes the features to the CSV-file.- Parameters:
writer- the write to useallFeatureResults- all rows to writeheaderNames- header-names for columns, corresponding to the data inrows.- Throws:
OutputWriteFailedException- if the output cannot be written.
-