Class OutputPrefixerSettings

Object
org.anchoranalysis.io.output.path.prefixer.OutputPrefixerSettings

public class OutputPrefixerSettings
extends Object
Arguments influencing into which directory outputs are written, and how identifiers are expressed.
Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • maybeSuppressDirectories

      public String maybeSuppressDirectories​(String identifier, boolean forceSuppressDirectories)
      Derives an identifier that maybe has its directories suppressed.

      This can leave identifier unchanged, or suppress the subdirectories in identifier by replacing them with underscores.

      Parameters:
      identifier - the identifier whose directories are maybe suppressed.
      forceSuppressDirectories - if true, forces the suppression of directories, regardless of outputSuppressDirectories
      Returns:
      the identifier after any suppression of directories is maybe applied.
    • assignOutputDirectory

      public void assignOutputDirectory​(Path outputDirectory)
      Assigns a directory indicating where inputs can be located.
      Parameters:
      outputDirectory - the output-directory.
    • assignSuggestedImageOutputFormat

      public void assignSuggestedImageOutputFormat​(ImageFileFormat format)
      Assigns a suggestion for a preferred image-output format.
      Parameters:
      format - the preferred format.
    • requestOutputIncrementingNumberSequence

      public void requestOutputIncrementingNumberSequence()
      Requests outputting with an incrementing number sequence, rather than the usual outputter (normally based upon input filenames).
    • requestOutputSuppressDirectories

      public void requestOutputSuppressDirectories()
      Requests suppressing directories (replacing subdirectory separators with an underscore) in the identifiers that are outputted.
    • requestOmitExperimentIdentifier

      public void requestOmitExperimentIdentifier()
      Requests that the experiment-identifier (name and index) is not included in the output-directory path.
    • checkAbsolutePath

      public void checkAbsolutePath() throws PathPrefixerException
      Checks that if a path is defined as the output-directory then it must be absolute.
      Throws:
      PathPrefixerException - if the above conditions do not hold true.
    • getOutputDirectory

      public Optional<Path> getOutputDirectory()
      A directory indicating where inputs can be located.
    • getSuggestedImageOutputFormat

      public Optional<ImageFileFormat> getSuggestedImageOutputFormat()
      A file format suggested for writing images to the file system.
    • isOutputIncrementingNumberSequence

      public boolean isOutputIncrementingNumberSequence()
      When true, requests outputting with an incrementing number sequence, rather than the usual outputter (normally based upon input filenames).
    • isOmitExperimentIdentifier

      public boolean isOmitExperimentIdentifier()
      When true, Requests that the experiment-identifier (name and index) is not included in the output-directory path.