Package org.apache.xerces.util
Class EntityResolver2Wrapper
java.lang.Object
org.apache.xerces.util.EntityResolver2Wrapper
- All Implemented Interfaces:
ExternalSubsetResolver,org.apache.xerces.xni.parser.XMLEntityResolver
This class wraps a SAX entity resolver (EntityResolver2) in an XNI entity resolver.
- Version:
- $Id: EntityResolver2Wrapper.java 699892 2008-09-28 21:08:27Z mrglavas $
- Author:
- Michael Glavassevich, IBM
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntityResolver2An instance of SAX2 Extensions 1.1's EntityResolver2. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EntityResolver2Wrapper(EntityResolver2 entityResolver) Creates a new instance wrapping the given SAX entity resolver. -
Method Summary
Modifier and TypeMethodDescriptionReturns the SAX entity resolver wrapped by this object.org.apache.xerces.xni.parser.XMLInputSourcegetExternalSubset(org.apache.xerces.xni.grammars.XMLDTDDescription grammarDescription) Locates an external subset for documents which do not explicitly provide one.org.apache.xerces.xni.parser.XMLInputSourceresolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier) Resolves an external parsed entity.voidsetEntityResolver(EntityResolver2 entityResolver) Sets the SAX entity resolver wrapped by this object.
-
Field Details
-
fEntityResolver
An instance of SAX2 Extensions 1.1's EntityResolver2.
-
-
Constructor Details
-
EntityResolver2Wrapper
public EntityResolver2Wrapper()Default constructor. -
EntityResolver2Wrapper
Creates a new instance wrapping the given SAX entity resolver.
- Parameters:
entityResolver- the SAX entity resolver to wrap
-
-
Method Details
-
setEntityResolver
Sets the SAX entity resolver wrapped by this object.
- Parameters:
entityResolver- the SAX entity resolver to wrap
-
getEntityResolver
Returns the SAX entity resolver wrapped by this object.
- Returns:
- the SAX entity resolver wrapped by this object
-
getExternalSubset
public org.apache.xerces.xni.parser.XMLInputSource getExternalSubset(org.apache.xerces.xni.grammars.XMLDTDDescription grammarDescription) throws org.apache.xerces.xni.XNIException, IOException Locates an external subset for documents which do not explicitly provide one. If no external subset is provided, this method should return
null.- Specified by:
getExternalSubsetin interfaceExternalSubsetResolver- Parameters:
grammarDescription- a description of the DTD- Throws:
org.apache.xerces.xni.XNIException- Thrown on general error.IOException- Thrown if resolved entity stream cannot be opened or some other i/o error occurs.
-
resolveEntity
public org.apache.xerces.xni.parser.XMLInputSource resolveEntity(org.apache.xerces.xni.XMLResourceIdentifier resourceIdentifier) throws org.apache.xerces.xni.XNIException, IOException Resolves an external parsed entity. If the entity cannot be resolved, this method should return null.- Specified by:
resolveEntityin interfaceorg.apache.xerces.xni.parser.XMLEntityResolver- Parameters:
resourceIdentifier- contains the physical co-ordinates of the resource to be resolved- Throws:
org.apache.xerces.xni.XNIException- Thrown on general error.IOException- Thrown if resolved entity stream cannot be opened or some other i/o error occurs.- See Also:
-