public interface ResourceReader extends Describable
Resource
.
For example the URLResourceReader
obtains a Resource
based on supported URI
schemes.
Modifier and Type | Method and Description |
---|---|
Set<String> |
getOptions(Metacard metacard)
Obtain a set of all options supported by this ResourceReader.
|
Set<String> |
getSupportedSchemes()
|
ResourceResponse |
retrieveResource(URI uri,
Map<String,Serializable> arguments)
|
getDescription, getId, getOrganization, getTitle, getVersion
ResourceResponse retrieveResource(URI uri, Map<String,Serializable> arguments) throws IOException, ResourceNotFoundException, ResourceNotSupportedException
uri
- A URI
that defines what Resource
to retrieve and how to do it.arguments
- Any additional arguments that should be passed to the ResourceReader.ResourceResponse
containing the retrieved Resource
.{@link
- IOException} thrown typically when there is an issue retrieving the file{@link
- ResourceNotFoundException} thrown when the Resource
could not be found{@link
- ResourceNotSupportedException} thrown when the Resource
is not supported
by the ResourceReaderIOException
ResourceNotFoundException
ResourceNotSupportedException
Set<String> getSupportedSchemes()
URI
schemes that the ResourceReader can accept when doing a Resource
lookup. Custom schemes can be created for a ResourceReader to support.Set
of supported schemesSet<String> getOptions(Metacard metacard)
Resource
in a unique way.metacard
- Set
of all options that this ResourceReader supports. This will be an empty set
if no options are supported.This work is licensed under a Creative Commons Attribution 4.0 International License.