Class MipavSAXReader


  • public class MipavSAXReader
    extends java.lang.Object
    SAX Reader for the HyperGraph display. Sets up the parser, which parses the graph xml file and produces a Graph.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private hypergraph.graphApi.Graph graph  
      private hypergraph.graphApi.GraphSystem graphSystem  
      private org.xml.sax.InputSource inputSource  
      private org.xml.sax.XMLReader reader  
    • Constructor Summary

      Constructors 
      Constructor Description
      MipavSAXReader​(hypergraph.graphApi.GraphSystem graphSystem, java.net.URL url)
      Creates the MipavSAXReader which sets up the XML parser for the graph xml file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      hypergraph.graphApi.Graph getGraph()
      Returns the Graph.
      hypergraph.graphApi.GraphSystem getGraphSystem()
      Returns the GraphSystem.
      hypergraph.graphApi.Graph parse()
      Parses the XML file with the Graph description.
      void setGraph​(hypergraph.graphApi.Graph graph)
      Sets the Graph.
      • Methods inherited from class java.lang.Object

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

      • graphSystem

        private hypergraph.graphApi.GraphSystem graphSystem
      • inputSource

        private org.xml.sax.InputSource inputSource
      • graph

        private hypergraph.graphApi.Graph graph
      • reader

        private org.xml.sax.XMLReader reader
    • Constructor Detail

      • MipavSAXReader

        public MipavSAXReader​(hypergraph.graphApi.GraphSystem graphSystem,
                              java.net.URL url)
                       throws java.io.IOException
        Creates the MipavSAXReader which sets up the XML parser for the graph xml file.
        Parameters:
        graphSystem - GraphSystem creates the Graph.
        url - Input File
        Throws:
        java.io.IOException
    • Method Detail

      • getGraph

        public hypergraph.graphApi.Graph getGraph()
        Returns the Graph.
        Returns:
        Graph
      • getGraphSystem

        public hypergraph.graphApi.GraphSystem getGraphSystem()
        Returns the GraphSystem.
        Returns:
        GraphSystem.
      • parse

        public hypergraph.graphApi.Graph parse()
                                        throws org.xml.sax.SAXException,
                                               javax.xml.parsers.ParserConfigurationException
        Parses the XML file with the Graph description. Returns the new Graph.
        Returns:
        new Graph from file.
        Throws:
        org.xml.sax.SAXException
        javax.xml.parsers.ParserConfigurationException
      • setGraph

        public void setGraph​(hypergraph.graphApi.Graph graph)
        Sets the Graph.
        Parameters:
        graph - new Graph