Class MipavSAXReader
- java.lang.Object
-
- gov.nih.mipav.view.graphVisualization.MipavSAXReader
-
public class MipavSAXReader extends java.lang.ObjectSAX 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.Graphgraphprivate hypergraph.graphApi.GraphSystemgraphSystemprivate org.xml.sax.InputSourceinputSourceprivate org.xml.sax.XMLReaderreader
-
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.GraphgetGraph()Returns the Graph.hypergraph.graphApi.GraphSystemgetGraphSystem()Returns the GraphSystem.hypergraph.graphApi.Graphparse()Parses the XML file with the Graph description.voidsetGraph(hypergraph.graphApi.Graph graph)Sets the Graph.
-
-
-
Constructor Detail
-
MipavSAXReader
public MipavSAXReader(hypergraph.graphApi.GraphSystem graphSystem, java.net.URL url) throws java.io.IOExceptionCreates 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.ParserConfigurationExceptionParses the XML file with the Graph description. Returns the new Graph.- Returns:
- new Graph from file.
- Throws:
org.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationException
-
setGraph
public void setGraph(hypergraph.graphApi.Graph graph)
Sets the Graph.- Parameters:
graph- new Graph
-
-