Package de.samply.reporter.context
Class Context
java.lang.Object
de.samply.reporter.context.Context
-
Constructor Summary
ConstructorsConstructorDescriptionContext(Path resultsDirectory, ReportTemplate reportTemplate, Path[] sourcePaths, CsvConfig csvConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToRecords(String filename, Consumer<org.apache.commons.csv.CSVRecord> recordConsumer) voidapplyToRecords(Path sourcePath, Consumer<org.apache.commons.csv.CSVRecord> recordConsumer) voiddefineFunction(String functionName, Function<String[], String> function) executeFunction(String functionName, String... parameters) Iterator<org.apache.commons.csv.CSVRecord>fetchCsvRecords(String filename) Iterator<org.apache.commons.csv.CSVRecord>fetchCsvRecords(Path path) fetchHeaders(Path path) getAllElement(String... keys) getColumnIndex(String sheetName, String columnName) getElement(String... keys) booleanhasOnlyHeaders(Path path) voidputElement(Object element, String... keys)
-
Constructor Details
-
Context
public Context(Path resultsDirectory, ReportTemplate reportTemplate, Path[] sourcePaths, CsvConfig csvConfig)
-
-
Method Details
-
getLogger
-
getCsvConfig
-
defineFunction
-
executeFunction
-
fetchCsvRecords
public Iterator<org.apache.commons.csv.CSVRecord> fetchCsvRecords(String filename) throws ContextException - Throws:
ContextException
-
fetchCsvRecords
public Iterator<org.apache.commons.csv.CSVRecord> fetchCsvRecords(Path path) throws ContextException - Throws:
ContextException
-
getElement
-
getAllElement
-
getKeySet
-
putElement
-
getResultsDirectory
-
getReportTemplate
-
getSourcePaths
-
applyToRecords
-
applyToRecords
-
hasOnlyHeaders
- Throws:
IOException
-
fetchHeaders
- Throws:
IOException
-
getColumnIndex
-