Class AbstractXmlReader

  • All Implemented Interfaces:
    org.xml.sax.XMLReader

    public abstract class AbstractXmlReader
    extends java.lang.Object
    implements org.xml.sax.XMLReader
    Abstract SAX XML Reader.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.xml.sax.ContentHandler contentHandler
      The content handler.
      private org.xml.sax.EntityResolver entityResolver
      The entity resolver.
      private org.xml.sax.ErrorHandler errorHandler
      The error handler.
      private java.util.HashMap<java.lang.String,​java.lang.Boolean> features
      The features map.
      private org.xml.sax.DTDHandler handler
      The DTD handler.
      private java.util.HashMap<java.lang.String,​java.lang.Object> properties
      The properties map.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractXmlReader()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.xml.sax.ContentHandler getContentHandler()
      Return the content handler.
      org.xml.sax.DTDHandler getDTDHandler()
      Return the DTD handler.
      org.xml.sax.EntityResolver getEntityResolver()
      Return the entity resolver.
      org.xml.sax.ErrorHandler getErrorHandler()
      Return the error handler.
      boolean getFeature​(java.lang.String name)
      Returns the feature by name.
      java.lang.Object getProperty​(java.lang.String name)
      Returns the property by name.
      void setContentHandler​(org.xml.sax.ContentHandler contentHandler)
      Sets the content handler.
      void setDTDHandler​(org.xml.sax.DTDHandler handler)
      Sets the DTD handler.
      void setEntityResolver​(org.xml.sax.EntityResolver entityResolver)
      Sets the entity resolver.
      void setErrorHandler​(org.xml.sax.ErrorHandler errorHandler)
      Sets the error handler.
      void setFeature​(java.lang.String name, boolean value)
      Sets a feature.
      void setProperty​(java.lang.String name, java.lang.Object value)
      Sets a property.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.xml.sax.XMLReader

        parse, parse
    • Field Detail

      • contentHandler

        private org.xml.sax.ContentHandler contentHandler
        The content handler.
      • entityResolver

        private org.xml.sax.EntityResolver entityResolver
        The entity resolver.
      • errorHandler

        private org.xml.sax.ErrorHandler errorHandler
        The error handler.
      • features

        private final java.util.HashMap<java.lang.String,​java.lang.Boolean> features
        The features map.
      • handler

        private org.xml.sax.DTDHandler handler
        The DTD handler.
      • properties

        private final java.util.HashMap<java.lang.String,​java.lang.Object> properties
        The properties map.
    • Constructor Detail

      • AbstractXmlReader

        public AbstractXmlReader()
        Default constructor.
    • Method Detail

      • getContentHandler

        public org.xml.sax.ContentHandler getContentHandler()
        Return the content handler.
        Specified by:
        getContentHandler in interface org.xml.sax.XMLReader
        Returns:
        The content handler.
        See Also:
        XMLReader.getContentHandler()
      • getDTDHandler

        public org.xml.sax.DTDHandler getDTDHandler()
        Return the DTD handler.
        Specified by:
        getDTDHandler in interface org.xml.sax.XMLReader
        Returns:
        The DTD handler.
        See Also:
        XMLReader.getDTDHandler()
      • getEntityResolver

        public org.xml.sax.EntityResolver getEntityResolver()
        Return the entity resolver.
        Specified by:
        getEntityResolver in interface org.xml.sax.XMLReader
        Returns:
        The entity resolver.
        See Also:
        XMLReader.getEntityResolver()
      • getErrorHandler

        public org.xml.sax.ErrorHandler getErrorHandler()
        Return the error handler.
        Specified by:
        getErrorHandler in interface org.xml.sax.XMLReader
        Returns:
        The error handler.
        See Also:
        XMLReader.getErrorHandler()
      • getFeature

        public boolean getFeature​(java.lang.String name)
                           throws org.xml.sax.SAXNotRecognizedException,
                                  org.xml.sax.SAXNotSupportedException
        Returns the feature by name.
        Specified by:
        getFeature in interface org.xml.sax.XMLReader
        Parameters:
        name - The feature name.
        Returns:
        The feature.
        Throws:
        org.xml.sax.SAXNotRecognizedException
        org.xml.sax.SAXNotSupportedException
        See Also:
        XMLReader.getFeature(String)
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
                                     throws org.xml.sax.SAXNotRecognizedException,
                                            org.xml.sax.SAXNotSupportedException
        Returns the property by name.
        Specified by:
        getProperty in interface org.xml.sax.XMLReader
        Parameters:
        name - The property name.
        Returns:
        The property.
        Throws:
        org.xml.sax.SAXNotRecognizedException
        org.xml.sax.SAXNotSupportedException
        See Also:
        XMLReader.getProperty(String)
      • setContentHandler

        public void setContentHandler​(org.xml.sax.ContentHandler contentHandler)
        Sets the content handler.
        Specified by:
        setContentHandler in interface org.xml.sax.XMLReader
        Parameters:
        contentHandler - The content handler.
        See Also:
        XMLReader.setContentHandler(ContentHandler)
      • setDTDHandler

        public void setDTDHandler​(org.xml.sax.DTDHandler handler)
        Sets the DTD handler.
        Specified by:
        setDTDHandler in interface org.xml.sax.XMLReader
        Parameters:
        handler - The DTD handler.
        See Also:
        XMLReader.setDTDHandler(DTDHandler)
      • setEntityResolver

        public void setEntityResolver​(org.xml.sax.EntityResolver entityResolver)
        Sets the entity resolver.
        Specified by:
        setEntityResolver in interface org.xml.sax.XMLReader
        Parameters:
        entityResolver - The entity resolver.
        See Also:
        XMLReader.setEntityResolver(EntityResolver)
      • setErrorHandler

        public void setErrorHandler​(org.xml.sax.ErrorHandler errorHandler)
        Sets the error handler.
        Specified by:
        setErrorHandler in interface org.xml.sax.XMLReader
        Parameters:
        errorHandler - The error handler.
        See Also:
        XMLReader.setErrorHandler(ErrorHandler)
      • setFeature

        public void setFeature​(java.lang.String name,
                               boolean value)
                        throws org.xml.sax.SAXNotRecognizedException,
                               org.xml.sax.SAXNotSupportedException
        Sets a feature.
        Specified by:
        setFeature in interface org.xml.sax.XMLReader
        Parameters:
        name - The feature name.
        value - The feature value.
        Throws:
        org.xml.sax.SAXNotRecognizedException
        org.xml.sax.SAXNotSupportedException
        See Also:
        XMLReader.setFeature(String, boolean)
      • setProperty

        public void setProperty​(java.lang.String name,
                                java.lang.Object value)
                         throws org.xml.sax.SAXNotRecognizedException,
                                org.xml.sax.SAXNotSupportedException
        Sets a property.
        Specified by:
        setProperty in interface org.xml.sax.XMLReader
        Parameters:
        name - The property name.
        value - The property value.
        Throws:
        org.xml.sax.SAXNotRecognizedException
        org.xml.sax.SAXNotSupportedException
        See Also:
        XMLReader.setProperty(String, Object)