public interface InputFromManager
Modifier and Type | Method and Description |
---|---|
default List<Path> |
allAssociatedPaths()
A path to all files associated with the input, including
pathForBinding() . |
default NamedFile |
asFile()
Expresses the input as a file with a name (the unique identifier).
|
default void |
close(ErrorReporter errorReporter)
Performs all tidying up, file-closing etc.
|
String |
identifier()
A unique name associated with the input.
|
default Path |
identifierAsPath()
Like
identifier() but converts the identifier to a path. |
Optional<Path> |
pathForBinding()
A path to a file from which this input originated.
|
default Path |
pathForBindingRequired()
Like
pathForBinding() but throws an exception if a path isn't present. |
String identifier()
The name should never begin with or end with whitespace.
It should never contain backslashes, but forward-slashes are permitted.
default Path identifierAsPath()
identifier()
but converts the identifier to a path.Optional<Path> pathForBinding()
This path is not guaranteed to be unique for each input i.e. multiple inputs may originate from the same path.
default Path pathForBindingRequired() throws InputReadFailedException
pathForBinding()
but throws an exception if a path isn't present.InputReadFailedException
- if such a path doesn't existdefault NamedFile asFile() throws InputReadFailedException
InputReadFailedException
- if no path is associated with the inputdefault List<Path> allAssociatedPaths()
pathForBinding()
.
Normally an input (e.g. an image) is stored as one file on the file-system, and this is associated with a single file.
However, an input (e.g. an image) may originate in several files, and have several associations.
Or an input may not originate on the file-system, and thus have no associations.
default void close(ErrorReporter errorReporter)
InputFromManager
errorReporter
- whether errors are reported to.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.