Class MipavGraphXMLContentHandler

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

    public class MipavGraphXMLContentHandler
    extends org.xml.sax.helpers.DefaultHandler
    Parses the MIPAX Graph XML file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void characters​(char[] ch, int start, int length)  
      void endDocument()  
      void endElement​(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)  
      protected void endElementEdge()
      End Edge element.
      protected void endElementGraph()
      Ends the Graph.
      protected void endElementLabel()
      Called when the end of the Label element is found.
      protected void endElementNode()
      Called when the end of the Node Element is found.
      MipavSAXReader getReader()
      Returns the MipavSAXReader.
      void setReader​(MipavSAXReader reader)
      Sets the MipavSAXReader.
      void startElement​(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)  
      protected void startElementEdge​(org.xml.sax.Attributes atts)
      Called when the Edge start element is found.
      protected void startElementGraph​(org.xml.sax.Attributes atts)
      Called when the Graph start element is found.
      protected void startElementLabel​(org.xml.sax.Attributes atts)
      Called when the start of the Label element is found.
      protected void startElementNode​(org.xml.sax.Attributes atts)
      Called when the start of a Node Element is found.
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        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

      • graph

        protected hypergraph.graphApi.Graph graph
      • currentElement

        protected hypergraph.graphApi.Element currentElement
      • currentText

        protected java.lang.StringBuffer currentText
    • Constructor Detail

      • MipavGraphXMLContentHandler

        public MipavGraphXMLContentHandler()
        Creates the content handler.
    • Method Detail

      • characters

        public void characters​(char[] ch,
                               int start,
                               int length)
                        throws org.xml.sax.SAXException
        Specified by:
        characters in interface org.xml.sax.ContentHandler
        Overrides:
        characters in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException
      • endDocument

        public void endDocument()
                         throws org.xml.sax.SAXException
        Specified by:
        endDocument in interface org.xml.sax.ContentHandler
        Overrides:
        endDocument in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException
      • endElement

        public void endElement​(java.lang.String namespaceURI,
                               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
      • getReader

        public MipavSAXReader getReader()
        Returns the MipavSAXReader.
        Returns:
      • setReader

        public void setReader​(MipavSAXReader reader)
        Sets the MipavSAXReader.
        Parameters:
        reader -
      • startElement

        public void startElement​(java.lang.String namespaceURI,
                                 java.lang.String localName,
                                 java.lang.String qName,
                                 org.xml.sax.Attributes atts)
                          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
      • endElementEdge

        protected void endElementEdge()
        End Edge element.
      • endElementGraph

        protected void endElementGraph()
        Ends the Graph.
      • endElementLabel

        protected void endElementLabel()
        Called when the end of the Label element is found.
      • endElementNode

        protected void endElementNode()
        Called when the end of the Node Element is found.
      • startElementEdge

        protected void startElementEdge​(org.xml.sax.Attributes atts)
        Called when the Edge start element is found.
        Parameters:
        atts -
      • startElementGraph

        protected void startElementGraph​(org.xml.sax.Attributes atts)
        Called when the Graph start element is found.
        Parameters:
        atts -
      • startElementLabel

        protected void startElementLabel​(org.xml.sax.Attributes atts)
        Called when the start of the Label element is found.
        Parameters:
        atts -
      • startElementNode

        protected void startElementNode​(org.xml.sax.Attributes atts)
        Called when the start of a Node Element is found.
        Parameters:
        atts -