org.tm4j.net .URILocatorResolver
Description
A generic URI locator resolver. Uses a plugin architecture to handle different URI protocols. The steps in resolution are as follows: 1. If the Locator is not an instance of URILocator, a LocatorResolutionException is thrown 2. If a LocatorResolver is registered for the scheme of the URILocator, then this resolver is invoked and the resulting InputStream returned 3. If there is no LocatorResolver found for the scheme, then the address is used to construct a java.net.URL object and an attempt is made to open a connection to the URL using the standard Java mechanism
If provided with a CatalogResolver (either at construction or via #setCatalogResolver(CatalogResolver), resolution of Locator addresses will be attempted prior to opening a resource.
Inheritance Hierarchy
- java.lang.Object
- URILocatorResolver
Interfaces
Field Summary | |
---|---|
m_catalogResolver | Reusable XML catalog resolution service. XML catalog resolution service. |
Method Summary | |
---|---|
LocatorResolver |
addResolver(java.lang.String scheme,org.tm4j.net.LocatorResolver resolver)
Adds a new protocol resolver to this resolver.
|
java.io.InputStream |
resolve(org.tm4j.net.Locator loc)
Opens an InputStream from the resource specified by the Locator's
address.
|
void |
setCatalogResolver(org.apache.xml.resolver.tools.CatalogResolver resolver)
Set the CatalogResolver used with this URILocatorResolver.
|