Class CopyFilesNamingOne
Object
org.anchoranalysis.bean.AnchorBean<CopyFilesNaming<T>>
org.anchoranalysis.plugin.io.bean.file.copy.naming.CopyFilesNaming<org.anchoranalysis.experiment.task.NoSharedState>
org.anchoranalysis.plugin.io.bean.file.copy.naming.CopyFilesNamingWithoutSharedState
org.anchoranalysis.plugin.io.bean.file.copy.naming.CopyFilesNamingOne
- Direct Known Subclasses:
RegularExpressionBase,RemoveWhitespace
public abstract class CopyFilesNamingOne extends CopyFilesNamingWithoutSharedState
-
Constructor Summary
Constructors Constructor Description CopyFilesNamingOne() -
Method Summary
Modifier and Type Method Description org.anchoranalysis.experiment.task.NoSharedStatebeforeCopying(Path destinationDirectory, List<org.anchoranalysis.io.input.file.FileWithDirectoryInput> inputs)To be called once before any calls toCopyFilesNaming.destinationPath(File, DirectoryWithPrefix, int, CopyContext).Optional<Path>destinationPathRelative(File file, org.anchoranalysis.io.output.path.prefixer.DirectoryWithPrefix outputTarget, int iter, CopyContext<org.anchoranalysis.experiment.task.NoSharedState> context)Calculates the relative-output path (to be appended to destDir)protected abstract Optional<Path>destinationPathRelative(Path path)CopyFilesNaming<org.anchoranalysis.experiment.task.NoSharedState>getCopyFilesNaming()voidsetCopyFilesNaming(CopyFilesNaming<org.anchoranalysis.experiment.task.NoSharedState> copyFilesNaming)Methods inherited from class org.anchoranalysis.plugin.io.bean.file.copy.naming.CopyFilesNaming
destinationPath
-
Constructor Details
-
CopyFilesNamingOne
public CopyFilesNamingOne()
-
-
Method Details
-
beforeCopying
public org.anchoranalysis.experiment.task.NoSharedState beforeCopying(Path destinationDirectory, List<org.anchoranalysis.io.input.file.FileWithDirectoryInput> inputs) throws org.anchoranalysis.core.exception.OperationFailedExceptionDescription copied from class:CopyFilesNamingTo be called once before any calls toCopyFilesNaming.destinationPath(File, DirectoryWithPrefix, int, CopyContext).- Overrides:
beforeCopyingin classCopyFilesNamingWithoutSharedState- Parameters:
destinationDirectory- the directory to which files are copied.inputs- the total number of files to copy.- Throws:
org.anchoranalysis.core.exception.OperationFailedException
-
destinationPathRelative
public Optional<Path> destinationPathRelative(File file, org.anchoranalysis.io.output.path.prefixer.DirectoryWithPrefix outputTarget, int iter, CopyContext<org.anchoranalysis.experiment.task.NoSharedState> context) throws org.anchoranalysis.io.output.error.OutputWriteFailedExceptionDescription copied from class:CopyFilesNamingCalculates the relative-output path (to be appended to destDir)- Specified by:
destinationPathRelativein classCopyFilesNaming<org.anchoranalysis.experiment.task.NoSharedState>- Parameters:
file- file to be copiedoutputTarget- the directory and prefix associated with the file for outputtingiter- an increasing sequence of numbers for each file beginning at 0context- the context for the copying- Returns:
- the relative-path. if empty, the file should be skipped.
- Throws:
org.anchoranalysis.io.output.error.OutputWriteFailedException
-
destinationPathRelative
-
getCopyFilesNaming
-
setCopyFilesNaming
public void setCopyFilesNaming(CopyFilesNaming<org.anchoranalysis.experiment.task.NoSharedState> copyFilesNaming)
-