public class Rooted extends PathPrefixer
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 Details

    • Rooted

      public Rooted()
    • Rooted

      public Rooted(PathPrefixerAvoidResolve prefixer, String rootName)
      Creates a new Rooted 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 class PathPrefixer
      Parameters:
      path - an input to derive a prefix from
      experimentName - 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 class PathPrefixer
      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

      public PathPrefixerAvoidResolve getPrefixer()
    • setPrefixer

      public void setPrefixer(PathPrefixerAvoidResolve prefixer)
    • getRootName

      public String getRootName()
      The name of the root-path to associate with this fileset.
    • setRootName

      public void setRootName(String rootName)
      The name of the root-path to associate with this fileset.