public class OgcUrlResourceReader extends Object implements ResourceReader
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTION |
static String |
ORGANIZATION |
static String |
SHORTNAME |
static String |
TITLE |
static String |
VERSION |
Constructor and Description |
---|
OgcUrlResourceReader(ResourceReader urlResourceReader,
org.apache.tika.Tika tika) |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns a description of the describable item.
|
String |
getId()
Returns the name, aka ID, of the describable item.
|
Set<String> |
getOptions(Metacard metacard)
Obtain a set of all options supported by this ResourceReader.
|
String |
getOrganization()
Returns the organization associated with the describable item.
|
Set<String> |
getSupportedSchemes()
|
String |
getTitle()
Returns the title of the describable item.
|
String |
getVersion()
Retrieve the version.
|
ResourceResponse |
retrieveResource(URI resourceURI,
Map<String,Serializable> properties)
|
public static final String VERSION
public static final String SHORTNAME
public static final String TITLE
public static final String DESCRIPTION
public static final String ORGANIZATION
public OgcUrlResourceReader(ResourceReader urlResourceReader, org.apache.tika.Tika tika)
public Set<String> getSupportedSchemes()
ResourceReader
URI
schemes that the ResourceReader can accept when doing a Resource
lookup. Custom schemes can be created for a ResourceReader to support.getSupportedSchemes
in interface ResourceReader
Set
of supported schemespublic ResourceResponse retrieveResource(URI resourceURI, Map<String,Serializable> properties) throws IOException, ResourceNotFoundException, ResourceNotSupportedException
Resource
based on a URI
and provided
arguments. A connection is made to the URI
to obtain the Resource
's InputStream
and build a ResourceResponse
from
that. The Resource
's name gets set to the URI
passed in.
Calls URLResourceReader
, if the mime-type is "text/html" it will inject a simple script
to redirect to the resourceURI instead of attempting to download it.retrieveResource
in interface ResourceReader
resourceURI
- A URI
that defines what Resource
to retrieve and how to do
it.properties
- Any additional arguments that should be passed to the ResourceReader
.ResourceResponse
containing the retrieved Resource
.ResourceNotSupportedException
IOException
ResourceNotFoundException
public String getVersion()
Describable
getVersion
in interface Describable
public String getId()
Describable
html for a MetacardTransformer
that transforms Metacard
s to HTML
getId
in interface Describable
public String getTitle()
Describable
getTitle
in interface Describable
public String getDescription()
Describable
getDescription
in interface Describable
public String getOrganization()
Describable
getOrganization
in interface Describable
public Set<String> getOptions(Metacard metacard)
ResourceReader
Resource
in a unique way.getOptions
in interface ResourceReader
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.