Class CopyFiles<T>
- Type Parameters:
T- shared-state ofnaming
Copy files to the output-directory, possibly changing the name or performing other operations
like compression in the process.
Unusually this task does not use the InputOutputContext for each job, but rather for
the experiment as a whole when determining the destination path for files. Similarly the
message-log of the experiment is used for non-error messages.
The following outputs are produced:
| Output Name | Default? | Description |
|---|---|---|
| "copy" | yes | a copied file for each input file. |
outputs from the RecordingCounter | ||
outputs from Task |
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAllJobsAreExecuted(RecordingCounter<T> sharedState, InputOutputContext context) Called once after all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>).beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<FileWithDirectoryInput> 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.voidPerforms the task on a particular input.How the copying occurs from source to destination file.How an output name (and path) is selected for an input file.booleanIs 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.voidsetMethod(CopyFilesMethod method) How the copying occurs from source to destination file.voidsetNaming(CopyFilesNaming<T> naming) How an output name (and path) is selected for an input file.Methods inherited from class org.anchoranalysis.experiment.bean.task.Task
executeJob, isInputCompatibleWithMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
CopyFiles
public CopyFiles()
-
-
Method Details
-
hasVeryQuickPerInputExecution
public boolean hasVeryQuickPerInputExecution()Description copied from class:TaskIs the execution-time of the task per-input expected to be very quick to execute?- Specified by:
hasVeryQuickPerInputExecutionin classTask<FileWithDirectoryInput,RecordingCounter<T>> - Returns:
- true iff the execution is expected to be very quick, false otherwise.
-
inputTypesExpected
Description copied from class:TaskHighest 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:
inputTypesExpectedin classTask<FileWithDirectoryInput,RecordingCounter<T>> - Returns:
- the input-types that a task expects.
-
beforeAnyJobIsExecuted
public RecordingCounter<T> beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<FileWithDirectoryInput> inputs, ParametersExperiment parameters) throws ExperimentExecutionException Description copied from class:TaskCalled once before all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>).- Specified by:
beforeAnyJobIsExecutedin classTask<FileWithDirectoryInput,RecordingCounter<T>> - 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.
-
doJobOnInput
public void doJobOnInput(InputBound<FileWithDirectoryInput, RecordingCounter<T>> input) throws JobExecutionExceptionDescription copied from class:TaskPerforms the task on a particular input.- Specified by:
doJobOnInputin classTask<FileWithDirectoryInput,RecordingCounter<T>> - Parameters:
input- the input for the job.- Throws:
JobExecutionException- if an error occurs executing a particular job, that is not otherwise suppressed.
-
defaultOutputs
Description copied from class:TaskIf specified, default rules for determine which outputs are enabled or not.- Overrides:
defaultOutputsin classTask<FileWithDirectoryInput,RecordingCounter<T>> - Returns:
- the default rules if they exist.
-
getMethod
How the copying occurs from source to destination file.e.g. with or without compression.
-
setMethod
How the copying occurs from source to destination file.e.g. with or without compression.
-
getNaming
How an output name (and path) is selected for an input file. -
setNaming
How an output name (and path) is selected for an input file.
-