Class XSIElementHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEFAULT
      Type constants
      static int EXTENSION
      Type constants
      static int FACET
      Type constants
      static int LIST
      Type constants
      static Logger logger
      the logger -- should be used for debugging (assuming there are bugs LOL)
      static int RESTRICTION
      Type constants
      static int SEQUENCE
      Type constants
      static int SIMPLETYPE
      Type constants
      static int UNION
      Type constants
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected XSIElementHandler()
      Creates a new XSIElementHandler object.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void characters​(String text)
      In most cases this class should not be called within this framework as we do not intend to parse + store all the information required to recreate the exact Schema document being parsed.
      abstract void endElement​(String namespaceURI, String localName)
      handles SAX end Element events. this is an opportunity to complete some post-processing
      boolean equals​(Object obj)  
      abstract XSIElementHandler getHandler​(String namespaceURI, String localName)
      This method will be used to create the XSI document.
      abstract int getHandlerType()
      Returns one of the Specified types ... intended for use by the child packages only
      abstract String getLocalName()
      Returns the LocalName for this element (ie this declaration in the Schema ... so ComplexType or Sequence ...)
      abstract int hashCode()  
      static void setLogLevel​(Level l)
      Sets the logging level for all XSIElementHandlers
      abstract void startElement​(String namespaceURI, String localName, Attributes attr)
      handles SAX start Element events.
      • Methods inherited from class Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XSIElementHandler

        protected XSIElementHandler()
        Creates a new XSIElementHandler object. Intended to limit creation to the sub-packages
    • Method Detail

      • getHandlerType

        public abstract int getHandlerType()
        Returns one of the Specified types ... intended for use by the child packages only
        Returns:
        int (DEFAULT?)
      • characters

        public void characters​(String text)
                        throws SAXException
        In most cases this class should not be called within this framework as we do not intend to parse + store all the information required to recreate the exact Schema document being parsed. As a result, information such as annotations are ignored. When used, they method may be called multiple times for one element. This means the implementor should keep this in mind when overriding this method.
        Throws:
        SAXException
      • endElement

        public abstract void endElement​(String namespaceURI,
                                        String localName)
                                 throws SAXException
        handles SAX end Element events. this is an opportunity to complete some post-processing
        Throws:
        SAXException
      • startElement

        public abstract void startElement​(String namespaceURI,
                                          String localName,
                                          Attributes attr)
                                   throws SAXException
        handles SAX start Element events. This is an opportunity to complete some pre-processing.
        Throws:
        SAXException
      • getHandler

        public abstract XSIElementHandler getHandler​(String namespaceURI,
                                                     String localName)
                                              throws SAXException
        This method will be used to create the XSI document. Validation and in-fix processing is expected to exist within this method, along with data logging for post-processing. This method will directly affect the stack being used to complete the parse.
        Returns:
        XSIElementHandler, or null
        Throws:
        SAXException
      • getLocalName

        public abstract String getLocalName()
        Returns the LocalName for this element (ie this declaration in the Schema ... so ComplexType or Sequence ...)
        Returns:
        String (not-null)
      • equals

        public boolean equals​(Object obj)
        Overrides:
        equals in class Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class Object
        See Also:
        Object.hashCode()
      • setLogLevel

        public static void setLogLevel​(Level l)
        Sets the logging level for all XSIElementHandlers