org.wilmascope.file
Class XMLGraph

java.lang.Object
  extended by 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

Nested Class Summary
 class XMLGraph.Cluster
           
 class XMLGraph.Edge
           
 class XMLGraph.LayoutEngineType
           
 class XMLGraph.Node
           
 class XMLGraph.Property
           
 class XMLGraph.ViewType
           
 class XMLGraph.XMLGraphElement
           
 
Constructor Summary
XMLGraph(java.lang.String fileName)
          Create and load the Graph data structures from the data held in the specified file
 
Method Summary
 void create()
           
 XMLGraph.Edge createEdge(java.lang.String startID, java.lang.String endID)
           
 XMLGraph.Node createNode()
           
 java.io.File getFile()
           
 XMLGraph.Cluster getRootCluster()
           
 void load()
          Load the DOM document from an existing file
 void save()
          write out the updated data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

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)