Class XExtensionParser.XExtensionHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
    Enclosing class:
    XExtensionParser

    protected class XExtensionParser.XExtensionHandler
    extends org.xml.sax.helpers.DefaultHandler
    SAX handler class for extension definition files.
    Author:
    Christian W. Guenther (christian@deckfour.org)
    • Constructor Summary

      Constructors 
      Constructor Description
      XExtensionHandler()
      Constructor, resets the handler.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName)  
      XExtension getExtension()
      Retrieves the parsed extension after parsing.
      void reset()
      Resets the handler to initial state.
      void startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)  
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • extension

        protected XExtension extension
        The extension to be parsed.
      • currentAttribute

        protected XAttribute currentAttribute
        The currently parsed attribute definition.
      • xAttributes

        protected java.util.Collection<XAttribute> xAttributes
        Buffer for parsed attribute definitions.
      • factory

        protected XFactory factory
        Factory for creating attributes.
    • Constructor Detail

      • XExtensionHandler

        public XExtensionHandler()
        Constructor, resets the handler.
    • Method Detail

      • reset

        public void reset()
        Resets the handler to initial state.
      • getExtension

        public XExtension getExtension()
        Retrieves the parsed extension after parsing.
        Returns:
        The parsed extension.
      • startElement

        public void startElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qName,
                                 org.xml.sax.Attributes attributes)
                          throws org.xml.sax.SAXException
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException
      • endElement

        public void endElement​(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String qName)
                        throws org.xml.sax.SAXException
        Specified by:
        endElement in interface org.xml.sax.ContentHandler
        Overrides:
        endElement in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException