public abstract class PathPrefixer extends AnchorBean<PathPrefixer>
Constructor and Description |
---|
PathPrefixer() |
Modifier and Type | Method and Description |
---|---|
abstract DirectoryWithPrefix |
outFilePrefix(NamedPath path,
Optional<String> experimentIdentifier,
PathPrefixerContext context)
Provides a prefix which can be prepended to all output files.
|
protected Path |
resolvePath(Path pathToResolve)
Converts a relative-path to an absolute-path (relative to the file-path associated with this
current bean)
|
protected Path |
resolvePath(String maybeRelativePath)
An absolute path to the prefix
|
abstract DirectoryWithPrefix |
rootDirectoryPrefix(Optional<String> experimentIdentifier,
PathPrefixerContext context)
Provides a prefix that becomes the root-folder.
|
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public abstract DirectoryWithPrefix outFilePrefix(NamedPath path, Optional<String> experimentIdentifier, PathPrefixerContext context) throws PathPrefixerException
path
- an input to derive a prefix fromexperimentIdentifier
- if defined, an identifier for the experiment, to be included in
the directory root.context
- PathPrefixerException
public abstract DirectoryWithPrefix rootDirectoryPrefix(Optional<String> experimentIdentifier, PathPrefixerContext context) throws PathPrefixerException
experimentIdentifier
- if defined, an identifier for the experiment, to be included in
the directory root.context
- PathPrefixerException
protected Path resolvePath(Path pathToResolve)
If there is no file-path associated with the current bean, then we throw an error if it is a relative path, or otherwise it remains unchanged
If the pathToResolve is already absolute, then we return it as-is
pathToResolve
- input-path that is relativeCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.