public class InputContextParameters extends Object
Constructor and Description |
---|
InputContextParameters() |
Modifier and Type | Method and Description |
---|---|
void |
assignFilterGlob(String glob)
Assigns a glob that can be used by beans to filter input.
|
void |
assignFixedLimit(int fixedLimit)
Assigns a fixed upper limit of number of inputs.
|
void |
assignIdentifierSubrange(IndexRangeNegative identifierSubrange)
If defined, this indicates and specifies only a subset of the elements of the identifier to
use.
|
void |
assignInputDirectory(Optional<Path> inputDirectory)
Sets an input-directory.
|
void |
assignInputFilterExtensions(StringSetTrie filterExtensions)
Assigns extensions that can be used filter inputs, but irrespective of whether
extensions have already been set.
|
void |
assignInputFilterExtensionsIfMissing(java.util.function.Supplier<Optional<StringSetTrie>> filterExtensions)
Assigns extensions that can be used filter inputs, but only when no extensions have
already been set.
|
void |
assignPaths(List<Path> paths)
Assigns a specific list of paths that are used for the inputs.
|
void |
assignRatioLimit(double ratioLimit)
Assigns a fixed upper limit that is a ratio of the number of inputs allowed.
|
void |
assignRelativeForIdentifier()
Specify that the entire filename or relative path (excluding extension) is used to determine
a unique identifier.
|
void |
assignShuffle()
Indicates that the order of the inputs should be shuffled (randomized).
|
Optional<DebugModeParameters> |
getDebugModeParameters()
Parameters for debug-mode (only defined if we are in debug mode).
|
Optional<IndexRangeNegative> |
getIdentifierSubrange()
If defined, this indicates and specifies only a subset of the naming-elements to use.
|
Optional<Path> |
getInputDirectory()
If defined, a directory which can be used by beans to find input.
|
Optional<StringSetTrie> |
getInputFilterExtensions()
A trie of extensions that can be used filter inputs.
|
Optional<String> |
getInputFilterGlob()
A glob that can be used by beans to filter input.
|
Optional<List<Path>> |
getInputPaths()
A list of paths referring to specific inputs.
|
Optional<io.vavr.control.Either<Integer,Double>> |
getLimitUpper()
If defined, an upper limit that is imposed on the number of inputs.
|
boolean |
isRelativeForIdentifier()
If true, the entire filename or relative path (excluding extension) is used to determine a
unique identifier.
|
boolean |
isShuffle()
If true, the order of the inputs are shuffled (randomized).
|
void |
setDebugModeParameters(Optional<DebugModeParameters> debugModeParameters)
Parameters for debug-mode (only defined if we are in debug mode).
|
void |
setIdentifierSubrange(Optional<IndexRangeNegative> identifierSubrange)
If defined, this indicates and specifies only a subset of the naming-elements to use.
|
void |
setInputDirectory(Optional<Path> inputDirectory)
If defined, a directory which can be used by beans to find input.
|
void |
setInputFilterExtensions(Optional<StringSetTrie> inputFilterExtensions)
A trie of extensions that can be used filter inputs.
|
void |
setInputFilterGlob(Optional<String> inputFilterGlob)
A glob that can be used by beans to filter input.
|
void |
setInputPaths(Optional<List<Path>> inputPaths)
A list of paths referring to specific inputs.
|
void |
setLimitUpper(Optional<io.vavr.control.Either<Integer,Double>> limitUpper)
If defined, an upper limit that is imposed on the number of inputs.
|
void |
setRelativeForIdentifier(boolean relativeForIdentifier)
If true, the entire filename or relative path (excluding extension) is used to determine a
unique identifier.
|
void |
setShuffle(boolean shuffle)
If true, the order of the inputs are shuffled (randomized).
|
public void setInputDirectory(Optional<Path> inputDirectory) throws IOException
This should always be an absolute path, never a relative one.
inputDirectory
- the absolute path of the input-directory.IOException
- if the path passed is not absolute.public void assignInputDirectory(Optional<Path> inputDirectory)
If defined, The path will be converted to an absolute path, if it hasn't been already, based upon the current working directory.
inputDirectory
- the input-directory to an assignpublic void assignFilterGlob(String glob)
The syntax should be from Java's getPathMatcher.
glob
- a string describing a glob in the syntax expected by Java.public void assignIdentifierSubrange(IndexRangeNegative identifierSubrange)
identifierSubrange
- if defined, this indicates and specifies only a subset of the
naming-elements to use.public void assignInputFilterExtensionsIfMissing(java.util.function.Supplier<Optional<StringSetTrie>> filterExtensions)
filterExtensions
- the extensions sued to filter inputs (without the leading period).public void assignInputFilterExtensions(StringSetTrie filterExtensions)
Any existing input-filter-extensions are repalced with filterExtensions
.
filterExtensions
- the extensions sued to filter inputs (without the leading period).public void assignRelativeForIdentifier()
public void assignFixedLimit(int fixedLimit)
fixedLimit
- the maximum number of inputs allowed.public void assignRatioLimit(double ratioLimit)
ratioLimit
- the maximum number of inputs allowed.public void assignPaths(List<Path> paths)
paths
- the paths.public void assignShuffle()
public Optional<List<Path>> getInputPaths()
public void setInputPaths(Optional<List<Path>> inputPaths)
public Optional<Path> getInputDirectory()
public Optional<String> getInputFilterGlob()
It requires the syntax of Java's getPathMatcher.
public void setInputFilterGlob(Optional<String> inputFilterGlob)
It requires the syntax of Java's getPathMatcher.
public Optional<StringSetTrie> getInputFilterExtensions()
public void setInputFilterExtensions(Optional<StringSetTrie> inputFilterExtensions)
public Optional<DebugModeParameters> getDebugModeParameters()
public void setDebugModeParameters(Optional<DebugModeParameters> debugModeParameters)
public boolean isRelativeForIdentifier()
public void setRelativeForIdentifier(boolean relativeForIdentifier)
public boolean isShuffle()
public void setShuffle(boolean shuffle)
public void setLimitUpper(Optional<io.vavr.control.Either<Integer,Double>> limitUpper)
public Optional<IndexRangeNegative> getIdentifierSubrange()
public void setIdentifierSubrange(Optional<IndexRangeNegative> identifierSubrange)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.