public abstract class PathPrefixerAvoidResolve extends PathPrefixer
This is useful for combining with the MultiRootedFilePathPrefixer. This results in relative-paths keeping the same root, as when passed in
Modifier | Constructor and Description |
---|---|
|
PathPrefixerAvoidResolve() |
protected |
PathPrefixerAvoidResolve(String prefix) |
Modifier and Type | Method and Description |
---|---|
String |
getPrefix()
A string prefixed to each output-path.
|
DirectoryWithPrefix |
outFilePrefix(NamedPath path,
Optional<String> experimentIdentifier,
PathPrefixerContext context)
Provides a prefix which can be prepended to all output files.
|
DirectoryWithPrefix |
outFilePrefixAvoidResolve(NamedPath path,
Optional<String> experimentIdentifier,
PathPrefixerContext context)
Provides a prefix which can be prepended to all output files.
|
abstract DirectoryWithPrefix |
outFilePrefixFromPath(NamedPath path,
Path root,
PathPrefixerContext context)
Determines the out-file prefix from a path
|
DirectoryWithPrefix |
rootDirectoryPrefix(Optional<String> experimentIdentifier,
PathPrefixerContext context)
Provides a prefix that becomes the root-folder.
|
DirectoryWithPrefix |
rootDirectoryPrefixAvoidResolve(Optional<String> experimentIdentifier)
Provides a prefix that becomes the root-folder.
|
void |
setPrefix(String prefix)
A string prefixed to each output-path.
|
resolvePath, resolvePath
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
protected PathPrefixerAvoidResolve(String prefix)
public PathPrefixerAvoidResolve()
public DirectoryWithPrefix rootDirectoryPrefix(Optional<String> experimentIdentifier, PathPrefixerContext context) throws PathPrefixerException
PathPrefixer
rootDirectoryPrefix
in class PathPrefixer
experimentIdentifier
- if defined, an identifier for the experiment, to be included in
the directory root.PathPrefixerException
public DirectoryWithPrefix outFilePrefix(NamedPath path, Optional<String> experimentIdentifier, PathPrefixerContext context) throws PathPrefixerException
PathPrefixer
outFilePrefix
in class PathPrefixer
path
- an input to derive a prefix fromexperimentIdentifier
- if defined, an identifier for the experiment, to be included in
the directory root.PathPrefixerException
public DirectoryWithPrefix rootDirectoryPrefixAvoidResolve(Optional<String> experimentIdentifier)
This is an alternative method to rootDirectoryPrefix that avoids resolving the out-path prefix against the file system
experimentIdentifier
- if defined, an identifier for the experiment, to be included in
the directory root.public DirectoryWithPrefix outFilePrefixAvoidResolve(NamedPath path, Optional<String> experimentIdentifier, PathPrefixerContext context) throws PathPrefixerException
path
- an input-path to match againstexperimentIdentifier
- if defined, an identifier for the experiment, to be included in
the directory root.PathPrefixerException
public abstract DirectoryWithPrefix outFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context) throws PathPrefixerException
path
- path to calculate prefix from with associated descriptive-nameroot
- root of prefixcontext
- the path-prefixer context.PathPrefixerException
public String getPrefix()
This is typically a directory which to output the experiment-directory and files, but it may also be a combination of a directory and a file-name prefix.
If empty, first the bean will try to use any output-directory set in the input context if it exists, or otherwise use the system temp directory.
public void setPrefix(String prefix)
This is typically a directory which to output the experiment-directory and files, but it may also be a combination of a directory and a file-name prefix.
If empty, first the bean will try to use any output-directory set in the input context if it exists, or otherwise use the system temp directory.
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.