Class FilesProvider
Object
org.anchoranalysis.bean.AnchorBean<FilesProvider>
org.anchoranalysis.io.input.bean.files.FilesProvider
- Direct Known Subclasses:
FilesProviderUnary,FilesProviderWithDirectory,FilesProviderWithoutDirectory,SpecificPathList
public abstract class FilesProvider extends AnchorBean<FilesProvider>
Base class for providing a list of
Files.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description FilesProvider() -
Method Summary
Modifier and Type Method Description abstract List<File>create(InputManagerParameters parameters)Creates or provides a list of files.abstract Optional<Path>rootDirectory(InputContextParameters inputContext)A root directory for these files, if it exists.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
FilesProvider
public FilesProvider()
-
-
Method Details
-
create
Creates or provides a list of files.- Parameters:
parameters- parameters influencing how input-files are obtained.- Returns:
- the list of files from the provider
- Throws:
FilesProviderException- if list of files cannot be successfully established.
-
rootDirectory
public abstract Optional<Path> rootDirectory(InputContextParameters inputContext) throws FilesProviderExceptionA root directory for these files, if it exists.Any file that is part of the collection returned by this provider, must exist inside this directory (either directly or in any nested subdirectories).
- Parameters:
inputContext- the input-context.- Returns:
- a path to this directory.
- Throws:
FilesProviderException- if an error occurs establishing the root directory.
-