org.wilmascope.file
Class XMLGraph
java.lang.Object
org.wilmascope.file.XMLGraph
public class XMLGraph
- extends java.lang.Object
Wrapper round the XML DOM calls for the WilmaGraph file.
XMLGraph wraps the root of the DOM Document. XMLGraphElement is a wrapper for
dom elements and is inherited by: Node, Edge, LayoutEngineType, ViewType and
Cluster subclasses Node.
Each of these has two constructors... one for writing to a new file... in
which everything is created from scratch, and one for reading where the
object is created around the Element.
- Version:
- 1.0
- Author:
- Tim Dwyer
Constructor Summary |
XMLGraph(java.lang.String fileName)
Create and load the Graph data structures from the data held in the
specified file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLGraph
public XMLGraph(java.lang.String fileName)
- Create and load the Graph data structures from the data held in the
specified file
- Parameters:
fileName
- the name of the xml file containing the graph data
getFile
public java.io.File getFile()
create
public void create()
load
public void load()
throws java.io.IOException
- Load the DOM document from an existing file
- Throws:
java.io.IOException
getRootCluster
public XMLGraph.Cluster getRootCluster()
save
public void save()
- write out the updated data
createNode
public XMLGraph.Node createNode()
createEdge
public XMLGraph.Edge createEdge(java.lang.String startID,
java.lang.String endID)