Class MipavSAXReader

java.lang.Object
gov.nih.mipav.view.graphVisualization.MipavSAXReader

public class MipavSAXReader extends 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
     
    private hypergraph.graphApi.GraphSystem
     
    private InputSource
     
    private XMLReader
     
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    hypergraph.graphApi.Graph
    Returns the Graph.
    hypergraph.graphApi.GraphSystem
    Returns the GraphSystem.
    hypergraph.graphApi.Graph
    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 Details

    • graphSystem

      private hypergraph.graphApi.GraphSystem graphSystem
    • inputSource

      private InputSource inputSource
    • graph

      private hypergraph.graphApi.Graph graph
    • reader

      private XMLReader reader
  • Constructor Details

    • MipavSAXReader

      public MipavSAXReader(hypergraph.graphApi.GraphSystem graphSystem, URL url) throws 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:
      IOException
  • Method Details

    • 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 SAXException, ParserConfigurationException
      Parses the XML file with the Graph description. Returns the new Graph.
      Returns:
      new Graph from file.
      Throws:
      SAXException
      ParserConfigurationException
    • setGraph

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