Class Rooted
Prepend a 'root' before the file-path-prefix obtained from a delegate
A root is a path that is mapped via a unique-name in a settings file to a directory
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionRooted()
Rooted
(PathPrefixerAvoidResolve prefixer, String rootName) Creates a newRooted
instance. -
Method Summary
Modifier and TypeMethodDescriptionThe name of the root-path to associate with this fileset.outFilePrefix
(NamedPath path, Optional<String> experimentName, PathPrefixerContext context) Provides a prefix which can be prepended to all output files.rootDirectoryPrefix
(Optional<String> expName, PathPrefixerContext context) Provides a prefix that becomes the root-folder.void
setPrefixer
(PathPrefixerAvoidResolve prefixer) void
setRootName
(String rootName) The name of the root-path to associate with this fileset.Methods inherited from class org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixer
resolvePath, resolvePath
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
Rooted
public Rooted() -
Rooted
Creates a newRooted
instance.- Parameters:
prefixer
-rootName
- The name of the root-path to associate with this fileset.
-
-
Method Details
-
outFilePrefix
public DirectoryWithPrefix outFilePrefix(NamedPath path, Optional<String> experimentName, PathPrefixerContext context) throws PathPrefixerException Description copied from class:PathPrefixer
Provides a prefix which can be prepended to all output files. The prefix should be an absolute path.- Specified by:
outFilePrefix
in classPathPrefixer
- Parameters:
path
- an input to derive a prefix fromexperimentName
- if defined, an identifier for the experiment, to be included in the directory root.context
- the context in which prefixing of paths occurs.- Returns:
- a directory with an associated prefix.
- Throws:
PathPrefixerException
- if unable to successfully determine a prefix.
-
rootDirectoryPrefix
public DirectoryWithPrefix rootDirectoryPrefix(Optional<String> expName, PathPrefixerContext context) throws PathPrefixerException Description copied from class:PathPrefixer
Provides a prefix that becomes the root-folder. The prefix should be an absolute path.- Specified by:
rootDirectoryPrefix
in classPathPrefixer
- Parameters:
expName
- if defined, an identifier for the experiment, to be included in the directory root.context
- the context in which prefixing of paths occurs.- Returns:
- a directory with an associated prefix.
- Throws:
PathPrefixerException
- if unable to successfully determine a prefix.
-
getPrefixer
-
setPrefixer
-
getRootName
The name of the root-path to associate with this fileset. -
setRootName
The name of the root-path to associate with this fileset.
-