Class IfRelativeToDirectory
Multiplexes between two namers depending on if the relative-to-directory option is
selected.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionderiveName
(List<File> files, FileNamerContext context) Derives a list of names (associated with each file) for some files.The namer to use if the relative-to-directory option is not selected.The namer to use if the relative-to-directory option is selected.void
setOtherwise
(FileNamer otherwise) The namer to use if the relative-to-directory option is not selected.void
setWhenRelative
(FileNamer whenRelative) The namer to use if the relative-to-directory option is selected.Methods inherited from class org.anchoranalysis.io.input.bean.namer.FileNamer
deriveName, deriveNameUnique
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
IfRelativeToDirectory
public IfRelativeToDirectory()
-
-
Method Details
-
deriveName
Description copied from class:FileNamer
Derives a list of names (associated with each file) for some files.- Specified by:
deriveName
in classFileNamer
- Parameters:
files
- the files to describe.context
- additional context for naming.- Returns:
- a list of identical size and order to files, corresponding to the file the extracted name.
-
getWhenRelative
The namer to use if the relative-to-directory option is selected. -
setWhenRelative
The namer to use if the relative-to-directory option is selected. -
getOtherwise
The namer to use if the relative-to-directory option is not selected. -
setOtherwise
The namer to use if the relative-to-directory option is not selected.
-