Class CombineCSV
Combines multiple CSV files into a single CSV file.
No check occurs that the same number of rows/columns exist in the files being combined.
The following outputs are produced:
Output Name | Default? | Description |
---|---|---|
"combined" | yes | A CSV combining the input CSV files. |
inherited from Task |
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterAllJobsAreExecuted
(CSVWriter writer, InputOutputContext context) Called once after all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.beforeAnyJobIsExecuted
(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<FileInput> inputs, ParametersExperiment parameters) Called once before all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.If specified, default rules for determine which outputs are enabled or not.void
doJobOnInput
(InputBound<FileInput, CSVWriter> parameters) Performs the task on a particular input.boolean
Is the execution-time of the task per-input expected to be very quick to execute?Highest class(es) that will function as a valid input.boolean
boolean
boolean
void
setAddName
(boolean addName) void
setFirstLineHeaders
(boolean firstLineHeaders) void
setSeperator
(String seperator) void
setTransposed
(boolean transposed) Methods inherited from class org.anchoranalysis.experiment.bean.task.Task
executeJob, isInputCompatibleWith
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
CombineCSV
public CombineCSV()
-
-
Method Details
-
beforeAnyJobIsExecuted
public CSVWriter beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<FileInput> inputs, ParametersExperiment parameters) throws ExperimentExecutionException Description copied from class:Task
Called once before all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.- Specified by:
beforeAnyJobIsExecuted
in classTask<FileInput,
CSVWriter> - Parameters:
outputter
- the output-manager for the experiment (not for an individual job)concurrencyPlan
- available numbers of processors that can callTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
inputs
- a list of inputs, each will result in at least one call toTask.executeJob(ParametersUnbound)
.parameters
- the experiment-parameters.- Returns:
- the shared-state that is passed to each call to
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
and toTask.afterAllJobsAreExecuted(S, org.anchoranalysis.io.output.outputter.InputOutputContext)
. - Throws:
ExperimentExecutionException
- if a fatal error occurs executing this step of the experiment.
-
hasVeryQuickPerInputExecution
public boolean hasVeryQuickPerInputExecution()Description copied from class:Task
Is the execution-time of the task per-input expected to be very quick to execute?- Specified by:
hasVeryQuickPerInputExecution
in classTask<FileInput,
CSVWriter> - Returns:
- true iff the execution is expected to be very quick, false otherwise.
-
inputTypesExpected
Description copied from class:Task
Highest class(es) that will function as a valid input.This is usually the class of T (or sometimes the absolute base class InputFromManager).
- Specified by:
inputTypesExpected
in classTask<FileInput,
CSVWriter> - Returns:
- the input-types that a task expects.
-
doJobOnInput
Description copied from class:Task
Performs the task on a particular input.- Specified by:
doJobOnInput
in classTask<FileInput,
CSVWriter> - Parameters:
parameters
- the input for the job.- Throws:
JobExecutionException
- if an error occurs executing a particular job, that is not otherwise suppressed.
-
afterAllJobsAreExecuted
public void afterAllJobsAreExecuted(CSVWriter writer, InputOutputContext context) throws ExperimentExecutionException Description copied from class:Task
Called once after all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.- Specified by:
afterAllJobsAreExecuted
in classTask<FileInput,
CSVWriter> - Parameters:
writer
- the shared-statecontext
- IO-context for experiment (not for an individual job)- Throws:
ExperimentExecutionException
- if a fatal error occurs executing this step of the experiment.
-
defaultOutputs
Description copied from class:Task
If specified, default rules for determine which outputs are enabled or not.- Overrides:
defaultOutputs
in classTask<FileInput,
CSVWriter> - Returns:
- the default rules if they exist.
-
getSeperator
-
setSeperator
-
isFirstLineHeaders
public boolean isFirstLineHeaders() -
setFirstLineHeaders
public void setFirstLineHeaders(boolean firstLineHeaders) -
isTransposed
public boolean isTransposed() -
setTransposed
public void setTransposed(boolean transposed) -
isAddName
public boolean isAddName() -
setAddName
public void setAddName(boolean addName)
-