Class CopyFiles<T>

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.experiment.bean.task.Task<T,​S>>
org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>>
org.anchoranalysis.plugin.io.bean.task.CopyFiles<T>
Type Parameters:
T - shared-state of naming

public class CopyFiles<T>
extends org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>>
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 NameDefault?Description
"copy"yesa copied file for each input file.
outputs from the RecordingCounter
outputs from Task
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    CopyFiles()  
  • Method Summary

    Modifier and Type Method Description
    void afterAllJobsAreExecuted​(RecordingCounter<T> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context)  
    RecordingCounter<T> beforeAnyJobIsExecuted​(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<org.anchoranalysis.io.input.file.FileWithDirectoryInput> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters)  
    org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()  
    void doJobOnInput​(org.anchoranalysis.experiment.task.InputBound<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>> input)  
    CopyFilesMethod getMethod()
    How the copying occurs from source to destination file.
    CopyFilesNaming<T> getNaming()
    How an output name (and path) is selected for an input file.
    boolean hasVeryQuickPerInputExecution()  
    org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()  
    void setMethod​(CopyFilesMethod method)
    How the copying occurs from source to destination file.
    void setNaming​(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, isInputCompatibleWith

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • hasVeryQuickPerInputExecution

      public boolean hasVeryQuickPerInputExecution()
      Specified by:
      hasVeryQuickPerInputExecution in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>>
    • inputTypesExpected

      public org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()
      Specified by:
      inputTypesExpected in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>>
    • beforeAnyJobIsExecuted

      public RecordingCounter<T> beforeAnyJobIsExecuted​(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<org.anchoranalysis.io.input.file.FileWithDirectoryInput> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters) throws org.anchoranalysis.experiment.ExperimentExecutionException
      Specified by:
      beforeAnyJobIsExecuted in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>>
      Throws:
      org.anchoranalysis.experiment.ExperimentExecutionException
    • doJobOnInput

      public void doJobOnInput​(org.anchoranalysis.experiment.task.InputBound<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>> input) throws org.anchoranalysis.experiment.JobExecutionException
      Specified by:
      doJobOnInput in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>>
      Throws:
      org.anchoranalysis.experiment.JobExecutionException
    • afterAllJobsAreExecuted

      public void afterAllJobsAreExecuted​(RecordingCounter<T> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.experiment.ExperimentExecutionException
      Specified by:
      afterAllJobsAreExecuted in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>>
      Throws:
      org.anchoranalysis.experiment.ExperimentExecutionException
    • defaultOutputs

      public org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()
      Overrides:
      defaultOutputs in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.io.input.file.FileWithDirectoryInput,​RecordingCounter<T>>
    • getMethod

      public CopyFilesMethod getMethod()
      How the copying occurs from source to destination file.

      e.g. with or without compression.

    • setMethod

      public void setMethod​(CopyFilesMethod method)
      How the copying occurs from source to destination file.

      e.g. with or without compression.

    • getNaming

      public CopyFilesNaming<T> getNaming()
      How an output name (and path) is selected for an input file.
    • setNaming

      public void setNaming​(CopyFilesNaming<T> naming)
      How an output name (and path) is selected for an input file.