Class Anonymize
Copies files to a number
001, 002
etc. in the same order they are inputted.
No shuffling occurs.
- Author:
- Owen Feehan
-
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<AnonymizeSharedState> context) Calculates the relative-output path (to be appended to destDir)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
-
Anonymize
public Anonymize()
-
-
Method Details
-
beforeCopying
public AnonymizeSharedState beforeCopying(Path destinationDirectory, List<FileWithDirectoryInput> inputs) Description copied from class:CopyFilesNaming
To be called once before any calls toCopyFilesNaming.destinationPath(File, DirectoryWithPrefix, int, CopyContext)
.- Specified by:
beforeCopying
in classCopyFilesNaming<AnonymizeSharedState>
- Parameters:
destinationDirectory
- the directory to which files are copied.inputs
- the total number of files to copy.
-
destinationPathRelative
public Optional<Path> destinationPathRelative(File file, DirectoryWithPrefix outputTarget, int iter, CopyContext<AnonymizeSharedState> context) throws OutputWriteFailedException Description copied from class:CopyFilesNaming
Calculates the relative-output path (to be appended to destDir)- Specified by:
destinationPathRelative
in classCopyFilesNaming<AnonymizeSharedState>
- 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
-