Interface ContentHandler

    • Method Detail

      • getDocumentLocator

        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.
        Returns:
        The locate object.
        See Also:
        Locator
      • getObject

        Object getObject()
        After parsing the document, this method must be called to get the Object. This method can only be called once, because after calling the internal variables are resetted to reuse the object.
      • isHandlerFor

        boolean isHandlerFor​(String uri,
                             String localName,
                             String qName,
                             Attributes attributes)
        Queries the handler for possible handling of the given (SAX-)parameters
        Parameters:
        uri -
        localName -
        qName -
        attributes -
        Returns:
      • setCharacterString

        void setCharacterString​(String characters)
        Transfers the characterstring from the parentHandler to the subHandler (necessary, because all SAX-calls are carried via all parentHandlers)
        Parameters:
        characters -
      • subHandlerFinishedWithObject

        void subHandlerFinishedWithObject​(Object subHandlerObject)
        Callback-method from the subHandler to inform the parentHandler about the finished object
        Parameters:
        subHandlerObject - The object created by the subHandler.
      • setParentHandler

        void setParentHandler​(ContentHandler parentHandler)
        Sets the given Handler as parentHandler
        Parameters:
        parentHandler -
      • resetSubHandler

        void resetSubHandler()
        Sets the Subhandler of this handler to empty → clears the usage of this subHandler