public abstract class FilesProviderUnary extends FilesProvider
FilesProvider
but employs a unary operator on a call to an existing FilesProvider
.Constructor and Description |
---|
FilesProviderUnary() |
Modifier and Type | Method and Description |
---|---|
List<File> |
create(InputManagerParameters parameters)
Creates or provides a list of files.
|
FilesProvider |
getFiles() |
Optional<Path> |
rootDirectory(InputContextParameters inputContext)
A root directory for these files, if it exists.
|
void |
setFiles(FilesProvider files) |
protected abstract List<File> |
transform(List<File> source,
boolean debugMode)
Transform an existing collection of files.
|
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public 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) throws FilesProviderException
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.FilesProviderException
- if an error occurs establishing the root directory.protected abstract List<File> transform(List<File> source, boolean debugMode) throws FilesProviderException
Note that the incoming collection of files may be modified, and can no longer be used in its original form after this method call.
source
- the incoming files (which may be consumed and modified).debugMode
- whether we are executing in debug-mode or notFilesProviderException
- if unable to complete the transform operation successfully.public FilesProvider getFiles()
public void setFiles(FilesProvider files)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.