Class CopyFilesNamingOne
- Direct Known Subclasses:
RegularExpressionBase
,RemoveWhitespace
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeforeCopying
(Path destinationDirectory, List<FileWithDirectoryInput> inputs) To be called once before any calls toCopyFilesNaming.destinationPath(File, DirectoryWithPrefix, int, CopyContext)
.destinationPathRelative
(File file, DirectoryWithPrefix outputTarget, int iter, CopyContext<NoSharedState> context) Calculates the relative-output path (to be appended to destDir)destinationPathRelative
(Path path) void
setCopyFilesNaming
(CopyFilesNaming<NoSharedState> copyFilesNaming) Methods inherited from class org.anchoranalysis.plugin.io.bean.file.copy.naming.CopyFilesNaming
destinationPath
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
CopyFilesNamingOne
public CopyFilesNamingOne()
-
-
Method Details
-
beforeCopying
public NoSharedState beforeCopying(Path destinationDirectory, List<FileWithDirectoryInput> inputs) throws OperationFailedException Description copied from class:CopyFilesNaming
To be called once before any calls toCopyFilesNaming.destinationPath(File, DirectoryWithPrefix, int, CopyContext)
.- Overrides:
beforeCopying
in classCopyFilesNamingWithoutSharedState
- Parameters:
destinationDirectory
- the directory to which files are copied.inputs
- the total number of files to copy.- Throws:
OperationFailedException
-
destinationPathRelative
public Optional<Path> destinationPathRelative(File file, DirectoryWithPrefix outputTarget, int iter, CopyContext<NoSharedState> context) throws OutputWriteFailedException Description copied from class:CopyFilesNaming
Calculates the relative-output path (to be appended to destDir)- Specified by:
destinationPathRelative
in classCopyFilesNaming<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:
OutputWriteFailedException
-
destinationPathRelative
-
getCopyFilesNaming
-
setCopyFilesNaming
-