public final class XMLResolverImpl extends Object implements XMLResolver
XMLResolver
based on
XMLResolver: An enhanced XML
resolver with XML Catalog support.
This class is thread-safe.
Constructor and Description |
---|
XMLResolverImpl()
Equivalent to
XMLResolverImpl(null) . |
XMLResolverImpl(URL[] urls)
Constructs an
XMLResolverImpl . |
Modifier and Type | Method and Description |
---|---|
void |
addRewriteURIEntry(String uriStartString,
String rewritePrefix)
Adds specified <rewriteURI> entry to the XML catalogs
being used by this resolver.
|
String |
getResolvedEntity(String publicId,
String systemId)
Resolves specified the public identifier/system identifier of an entity.
|
String |
resolveURI(String uri)
Resolves specified URI.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolve, resolveEntity, resolveURI
public XMLResolverImpl()
XMLResolverImpl(null)
.
Useful when the list of XML catalog files is specified by
the value of system property xml.catalog.files
.
public XMLResolverImpl(URL[] urls)
XMLResolverImpl
.urls
- the URLs of the XML catalog files to be used
by this XML resolver. If null
, this list is specified by
the value of system property xml.catalog.files
, if any.public void addRewriteURIEntry(String uriStartString, String rewritePrefix)
XMLResolver
addRewriteURIEntry
in interface XMLResolver
uriStartString
- prefix of an URIrewritePrefix
- new prefix for URIs starting with
uriStartString. Must be the start of an absolute URL
in order to be able to use this entry to resolve URIs.public String getResolvedEntity(String publicId, String systemId)
XMLResolver
null
.getResolvedEntity
in interface XMLResolver
publicId
- the public identifier of the entity.
May be null
.systemId
- the system identifier of the entity.
Not null
.null
public String resolveURI(String uri)
XMLResolver
null
.resolveURI
in interface XMLResolver
uri
- URI for which a mapping is to be found.
This URI may have a fragment.null