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)booleanReturns, whether the Resolver should create validating parsers.booleanReturns, 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).voidsetValidating(boolean pValidating) Sets, whether the Resolver should create validating parsers.voidsetXincludeAware(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:
resolveEntityin interfaceEntityResolver- Throws:
SAXExceptionIOException
-
resolve
Implementation ofURIResolver.resolve(String, String).- Specified by:
resolvein 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:
resolveResourcein 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:
getExternalSubsetin interfaceEntityResolver2- Throws:
SAXExceptionIOException
-
resolveEntity
public InputSource resolveEntity(String pName, String pPublicId, String pBaseURI, String pSystemId) throws SAXException, IOException Implementation ofEntityResolver2.resolveEntity(String, String, String, String)- Specified by:
resolveEntityin interfaceEntityResolver2- Throws:
SAXExceptionIOException
-
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.
-