public abstract class FileNamerIndependent extends FileNamer
By independently, this means the name is derived using information from a particular file only, and not from the collective set of the files that are named together.
An exception may occur via the index, which is derived collectively from all files, but may be used in sub-classes.
Constructor and Description |
---|
FileNamerIndependent() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
deriveName(File file,
Optional<Path> inputDirectory,
int index)
Derives a unique name for this file.
|
List<NamedFile> |
deriveName(List<File> files,
FileNamerContext context)
Derives a list of names (associated with each file) for some files.
|
deriveName, deriveNameUnique
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public List<NamedFile> deriveName(List<File> files, FileNamerContext context)
FileNamer
deriveName
in class FileNamer
files
- the files to describe.context
- additional context for naming.protected abstract String deriveName(File file, Optional<Path> inputDirectory, int index) throws CreateException
file
- the file.inputDirectory
- the root input-directory used in naming.index
- a unique incrementing number, beginning at zero, passed to each call to this
method within a collection.CreateException
- if unable to create the unique name.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.