org.cdlib.xtf.servletBase
Class DTDSuppressingXMLReader
Object
DTDSuppressingXMLReader
- All Implemented Interfaces:
- XMLReader
- Direct Known Subclasses:
- XMLStubReader
public class DTDSuppressingXMLReader
- extends Object
- implements XMLReader
Simple wrapper for an XML reader that requests it to avoid loading external
DTDs. This not only speeds things up, it also allows our service to work
even if the external service is unavailable.
- Author:
- Martin Haye
|
Field Summary |
protected XMLReader |
reader
The wrapped XML reader to which all methods are delegated |
|
Constructor Summary |
DTDSuppressingXMLReader()
Construct the XML reader and set a flag on it to avoid loading
external DTDs |
| Methods inherited from class Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
reader
protected XMLReader reader
- The wrapped XML reader to which all methods are delegated
DTDSuppressingXMLReader
public DTDSuppressingXMLReader()
- Construct the XML reader and set a flag on it to avoid loading
external DTDs
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
getContentHandler
public ContentHandler getContentHandler()
- Specified by:
getContentHandler in interface XMLReader
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandler in interface XMLReader
getEntityResolver
public EntityResolver getEntityResolver()
- Specified by:
getEntityResolver in interface XMLReader
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandler in interface XMLReader
getFeature
public boolean getFeature(String name)
throws SAXNotRecognizedException,
SAXNotSupportedException
- Specified by:
getFeature in interface XMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
getProperty
public Object getProperty(String name)
throws SAXNotRecognizedException,
SAXNotSupportedException
- Specified by:
getProperty in interface XMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
parse
public void parse(String systemId)
throws IOException,
SAXException
- Specified by:
parse in interface XMLReader
- Throws:
IOException
SAXException
parse
public void parse(InputSource input)
throws IOException,
SAXException
- Specified by:
parse in interface XMLReader
- Throws:
IOException
SAXException
setContentHandler
public void setContentHandler(ContentHandler handler)
- Specified by:
setContentHandler in interface XMLReader
setDTDHandler
public void setDTDHandler(DTDHandler handler)
- Specified by:
setDTDHandler in interface XMLReader
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolver in interface XMLReader
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandler in interface XMLReader
setFeature
public void setFeature(String name,
boolean value)
throws SAXNotRecognizedException,
SAXNotSupportedException
- Specified by:
setFeature in interface XMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
setProperty
public void setProperty(String name,
Object value)
throws SAXNotRecognizedException,
SAXNotSupportedException
- Specified by:
setProperty in interface XMLReader
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
toString
public String toString()
- Overrides:
toString in class Object