Package org.codehaus.mojo.xml
Class Resolver
- java.lang.Object
-
- org.codehaus.mojo.xml.Resolver
-
- All Implemented Interfaces:
URIResolver
,LSResourceResolver
,EntityResolver
,EntityResolver2
public class Resolver extends Object implements EntityResolver2, URIResolver, LSResourceResolver
An implementation ofEntityResolver
,URIResolver
, andLSResourceResolver
, based on the Apache catalog resolver.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputSource
getExternalSubset(String name, String baseURI)
Implementation ofEntityResolver2.getExternalSubset(String, String)
boolean
isValidating()
Returns, whether the Resolver should create validating parsers.boolean
isXincludeAware()
Returns, whether the transformer should create xinclude aware XML parsers for reading XML documents.URL
resolve(String pResource)
Attempts to resolve the given URI.Source
resolve(String pHref, String pBase)
Implementation ofURIResolver.resolve(String, String)
.InputSource
resolveEntity(String pPublicId, String pSystemId)
Implementation ofEntityResolver.resolveEntity(String, String)
.InputSource
resolveEntity(String pName, String pPublicId, String pBaseURI, String pSystemId)
Implementation ofEntityResolver2.resolveEntity(String, String, String, String)
LSInput
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 Detail
-
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
public Source resolve(String pHref, String pBase) throws TransformerException
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
public URL resolve(String pResource)
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
public InputSource getExternalSubset(String name, String baseURI) throws SAXException, IOException
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.
-
-