public class EntityResolver2Wrapper extends Object implements ExternalSubsetResolver
This class wraps a SAX entity resolver (EntityResolver2) in an XNI entity resolver.
Modifier and Type | Field and Description |
---|---|
protected EntityResolver2 |
fEntityResolver
An instance of SAX2 Extensions 1.1's EntityResolver2.
|
Constructor and Description |
---|
EntityResolver2Wrapper()
Default constructor.
|
EntityResolver2Wrapper(EntityResolver2 entityResolver)
Creates a new instance wrapping the given SAX entity resolver.
|
Modifier and Type | Method and Description |
---|---|
EntityResolver2 |
getEntityResolver()
Returns the SAX entity resolver wrapped by this object.
|
XMLInputSource |
getExternalSubset(XMLDTDDescription grammarDescription)
Locates an external subset for documents which do not explicitly
provide one.
|
XMLInputSource |
resolveEntity(XMLResourceIdentifier resourceIdentifier)
Resolves an external parsed entity.
|
void |
setEntityResolver(EntityResolver2 entityResolver)
Sets the SAX entity resolver wrapped by this object.
|
protected EntityResolver2 fEntityResolver
public EntityResolver2Wrapper()
public EntityResolver2Wrapper(EntityResolver2 entityResolver)
Creates a new instance wrapping the given SAX entity resolver.
entityResolver
- the SAX entity resolver to wrappublic void setEntityResolver(EntityResolver2 entityResolver)
Sets the SAX entity resolver wrapped by this object.
entityResolver
- the SAX entity resolver to wrappublic EntityResolver2 getEntityResolver()
Returns the SAX entity resolver wrapped by this object.
public XMLInputSource getExternalSubset(XMLDTDDescription grammarDescription) throws 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
.
getExternalSubset
in interface ExternalSubsetResolver
grammarDescription
- a description of the DTDXNIException
- Thrown on general error.IOException
- Thrown if resolved entity stream cannot be
opened or some other i/o error occurs.public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier) throws XNIException, IOException
resolveEntity
in interface XMLEntityResolver
resourceIdentifier
- contains the physical co-ordinates of the resource to be resolvedXNIException
- Thrown on general error.IOException
- Thrown if resolved entity stream cannot be
opened or some other i/o error occurs.XMLResourceIdentifier
Copyright © 2017 JBoss by Red Hat. All rights reserved.