Package org.codehaus.mojo.xml
Class Resolver
java.lang.Object
org.codehaus.mojo.xml.Resolver
- All Implemented Interfaces:
URIResolver
,LSResourceResolver
,EntityResolver
,EntityResolver2
An implementation of
EntityResolver
, URIResolver
, and LSResourceResolver
, based
on the Apache catalog resolver.-
Method Summary
Modifier and TypeMethodDescriptiongetExternalSubset
(String name, String baseURI) Implementation ofEntityResolver2.getExternalSubset(String, String)
boolean
Returns, whether the Resolver should create validating parsers.boolean
Returns, whether the transformer should create xinclude aware XML parsers for reading XML documents.Attempts to resolve the given URI.Implementation ofURIResolver.resolve(String, String)
.resolveEntity
(String pPublicId, String pSystemId) Implementation ofEntityResolver.resolveEntity(String, String)
.resolveEntity
(String pName, String pPublicId, String pBaseURI, String pSystemId) Implementation ofEntityResolver2.resolveEntity(String, String, String, String)
resolveResource
(String pType, String pNamespaceURI, String pPublicId, String pSystemId, String pBaseURI) Implementation ofLSResourceResolver.resolveResource(String, String, String, String, String)
.void
setValidating
(boolean pValidating) Sets, whether the Resolver should create validating parsers.void
setXincludeAware
(boolean pXIncludeAware) Sets, whether the transformer should create xinclude aware XML parsers for reading XML documents.
-
Method Details
-
resolveEntity
public InputSource resolveEntity(String pPublicId, String pSystemId) throws SAXException, IOException Implementation ofEntityResolver.resolveEntity(String, String)
.- Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException
-
resolve
Implementation ofURIResolver.resolve(String, String)
.- Specified by:
resolve
in interfaceURIResolver
- Throws:
TransformerException
-
resolveResource
public LSInput resolveResource(String pType, String pNamespaceURI, String pPublicId, String pSystemId, String pBaseURI) Implementation ofLSResourceResolver.resolveResource(String, String, String, String, String)
.- Specified by:
resolveResource
in interfaceLSResourceResolver
-
setValidating
public void setValidating(boolean pValidating) Sets, whether the Resolver should create validating parsers.- Parameters:
pValidating
- True, if created parsers should validate. Otherwise false.
-
isValidating
public boolean isValidating()Returns, whether the Resolver should create validating parsers.- Returns:
- True, if created parsers should validate. Otherwise false.
-
resolve
Attempts to resolve the given URI.- Parameters:
pResource
- The URI to resolve.- Returns:
- The URL, which is being referred to by the URI. Null, if no such URL can be found.
-
getExternalSubset
Implementation ofEntityResolver2.getExternalSubset(String, String)
- Specified by:
getExternalSubset
in interfaceEntityResolver2
- Throws:
SAXException
IOException
-
resolveEntity
public InputSource resolveEntity(String pName, String pPublicId, String pBaseURI, String pSystemId) throws SAXException, IOException Implementation ofEntityResolver2.resolveEntity(String, String, String, String)
- Specified by:
resolveEntity
in interfaceEntityResolver2
- Throws:
SAXException
IOException
-
isXincludeAware
public boolean isXincludeAware()Returns, whether the transformer should create xinclude aware XML parsers for reading XML documents. The default value is false.- Returns:
- True, if transformers parser should be xinclud aware. Otherwise false.
-
setXincludeAware
public void setXincludeAware(boolean pXIncludeAware) Sets, whether the transformer should create xinclude aware XML parsers for reading XML documents. The default value is false.- Parameters:
pXIncludeAware
- True, if transformers parser should be xinclud aware. Otherwise false.
-