public abstract class FilesProviderWithDirectory extends FilesProvider
FilesProvider
which do have an associated
directory.Constructor and Description |
---|
FilesProviderWithDirectory() |
Modifier and Type | Method and Description |
---|---|
List<File> |
create(InputManagerParameters parameters)
Creates or provides a list of files.
|
abstract Path |
getDirectoryAsPath(InputContextParameters inputContext)
The associated directory with the list of files.
|
Path |
getDirectoryAsPathEnsureAbsolute(InputContextParameters inputContext)
Like
getDirectoryAsPath(org.anchoranalysis.io.input.InputContextParameters) but converts any relative path to absolute one. |
abstract List<File> |
matchingFilesForDirectory(Path directory,
InputManagerParameters parameters)
The matching files for this provider that exist in a particular directory.
|
Optional<Path> |
rootDirectory(InputContextParameters inputContext)
A root directory for these files, if it exists.
|
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public final List<File> create(InputManagerParameters parameters) throws FilesProviderException
FilesProvider
create
in class FilesProvider
parameters
- parameters influencing how input-files are obtained.FilesProviderException
- if list of files cannot be successfully established.public Optional<Path> rootDirectory(InputContextParameters inputContext)
FilesProvider
Any file that is part of the collection returned by this provider, must exist inside this directory (either directly or in any nested subdirectories).
rootDirectory
in class FilesProvider
inputContext
- the input-context.public abstract Path getDirectoryAsPath(InputContextParameters inputContext)
inputContext
- the input-context.public abstract List<File> matchingFilesForDirectory(Path directory, InputManagerParameters parameters) throws FilesProviderException
This directory may or may not be searched recursively, depending on implementation.
directory
- the directory.parameters
- parameters passed to an InputManager
to generate input-objects.FilesProviderException
- if the operation is unable to complete successfully.public Path getDirectoryAsPathEnsureAbsolute(InputContextParameters inputContext)
getDirectoryAsPath(org.anchoranalysis.io.input.InputContextParameters)
but converts any relative path to absolute one.inputContext
- the input-context.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.