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 Summary
Constructors Constructor Description OutputPrefixerSettings() -
Method Summary
Modifier and Type Method Description voidassignOutputDirectory(Path outputDirectory)Assigns a directory indicating where inputs can be located.voidassignSuggestedImageOutputFormat(ImageFileFormat format)Assigns a suggestion for a preferred image-output format.voidcheckAbsolutePath()Checks that if a path is defined as the output-directory then it must be absolute.Optional<Path>getOutputDirectory()A directory indicating where inputs can be located.Optional<ImageFileFormat>getSuggestedImageOutputFormat()A file format suggested for writing images to the file system.booleanisOmitExperimentIdentifier()When true, Requests that the experiment-identifier (name and index) is not included in the output-directory path.booleanisOutputIncrementingNumberSequence()When true, requests outputting with an incrementing number sequence, rather than the usual outputter (normally based upon input filenames).StringmaybeSuppressDirectories(String identifier, boolean forceSuppressDirectories)Derives an identifier that maybe has its directories suppressed.voidrequestOmitExperimentIdentifier()Requests that the experiment-identifier (name and index) is not included in the output-directory path.voidrequestOutputIncrementingNumberSequence()Requests outputting with an incrementing number sequence, rather than the usual outputter (normally based upon input filenames).voidrequestOutputSuppressDirectories()Requests suppressing directories (replacing subdirectory separators with an underscore) in the identifiers that are outputted.
-
Constructor Details
-
OutputPrefixerSettings
public OutputPrefixerSettings()
-
-
Method Details
-
maybeSuppressDirectories
Derives an identifier that maybe has its directories suppressed.This can leave
identifierunchanged, 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 ofoutputSuppressDirectories- Returns:
- the identifier after any suppression of directories is maybe applied.
-
assignOutputDirectory
Assigns a directory indicating where inputs can be located.- Parameters:
outputDirectory- the output-directory.
-
assignSuggestedImageOutputFormat
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
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
A directory indicating where inputs can be located. -
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.
-