Class XMLReadHandlerImpl

    • Constructor Detail

      • XMLReadHandlerImpl

        public XMLReadHandlerImpl()
    • Method Detail

      • getDocumentLocator

        public Locator getDocumentLocator()
        To generate usefull log messages it is very important to know the location of the exception or log information. Therefore, each ContentHandler should provide the Locator object of the parser.
        Specified by:
        getDocumentLocator in interface ContentHandler
        Returns:
        The locate object.
        See Also:
        Locator
      • callSubHandlerStart

        protected boolean callSubHandlerStart​(String uri,
                                              String localName,
                                              String qName,
                                              Attributes attributes)
                                       throws SAXException
        Tries to call a subHandler with the given (SAX-)parameters. If none is available, false is returned.
        Parameters:
        uri - a String object
        localName - a String object
        qName - a String object
        attributes - a Attributes object
        Returns:
        a boolean
        Throws:
        SAXException
      • callSubHandlerEnd

        protected boolean callSubHandlerEnd​(String uri,
                                            String localName,
                                            String qName)
                                     throws SAXException
        Tries to call a subHandler with the given (SAX-)parameters. If none is available, false is returned.
        Parameters:
        uri - a String object
        localName - a String object
        qName - a String object
        Returns:
        a boolean
        Throws:
        SAXException
      • subHandlerFinishedWithObject

        public abstract void subHandlerFinishedWithObject​(Object subHandlerObject)
        Callback-method from the subHandler to inform the parentHandler about the finished object
        Specified by:
        subHandlerFinishedWithObject in interface ContentHandler
        Parameters:
        subHandlerObject - The object created by the subHandler.
      • notifyParentHandler

        protected void notifyParentHandler​(Object subHandlerObject)
        Notifies the parentHandler about the fact, that the object finished importing, which the subHandler had to manage
        Parameters:
        subHandlerObject - the object, which was finished importing
      • resetSubHandler

        public void resetSubHandler()
        Sets the Subhandler of this handler to empty → clears the usage of this subHandler
        Specified by:
        resetSubHandler in interface ContentHandler
      • characters

        public void characters​(char[] ch,
                               int start,
                               int length)
        Appends the given characters, at the given position, to the internal StringBuffer
        Specified by:
        characters in interface ContentHandler
      • getCharacterString

        protected String getCharacterString()
        Gets the characterstream between the last open-tag and the last-closing tag. It does only make sense reading this variable at a closing-tag.
        Returns:
        a String object
      • setCharacterString

        public void setCharacterString​(String characters)
        Transfers the characterstring from the parentHandler to the subHandler (necessary, because all SAX-calls are carried via all parentHandlers)
        Specified by:
        setCharacterString in interface ContentHandler