public class XMLCacheResolverExtension extends Object implements URIResolverExtension
Constructor and Description |
---|
XMLCacheResolverExtension() |
Modifier and Type | Method and Description |
---|---|
Path |
getCachedResource(String url)
Returns the cached resource path from the given url and null otherwise.
|
boolean |
isUseCache()
Returns
true if cache must be used, false
otherwise. |
String |
resolve(String baseLocation,
String publicId,
String systemId) |
org.apache.xerces.xni.parser.XMLInputSource |
resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier) |
void |
setUseCache(boolean useCache)
Set
true if cache must be used, false otherwise. |
public String resolve(String baseLocation, String publicId, String systemId)
resolve
in interface URIResolverExtension
baseLocation
- - the location of the resource that contains the uripublicId
- - an optional public identifier (i.e. namespace name), or
null if nonesystemId
- - an absolute or relative URI, or null if nonepublic org.apache.xerces.xni.parser.XMLInputSource resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier) throws org.apache.xerces.xni.XNIException, IOException
resolveEntity
in interface org.apache.xerces.xni.parser.XMLEntityResolver
resolveEntity
in interface URIResolverExtension
org.apache.xerces.xni.XNIException
IOException
public Path getCachedResource(String url) throws IOException, CacheResourceDownloadedException
url
- the urlIOException
CacheResourceDownloadedException
- throws when resource is downloading.public void setUseCache(boolean useCache)
true
if cache must be used, false
otherwise.useCache
- true
if cache must be used, false
otherwise.public boolean isUseCache()
true
if cache must be used, false
otherwise.true
if cache must be used, false
otherwise.Copyright © 2020. All rights reserved.