org.pandora.knowledge.xml
Class NetworkXMLParser

java.lang.Object
  extended by org.pandora.knowledge.xml.NetworkXMLParser

public class NetworkXMLParser
extends java.lang.Object

Utility class that converts a network to add from xml. The xml schema is defined in network.xsd. A basic network and vertices are used for instantiation from xml.


Constructor Summary
NetworkXMLParser()
           
 
Method Summary
static NetworkXMLParser instance()
           
 Network parse(java.io.File file)
          Parse a new network from an xml file.
 Network parse(java.net.URL uri)
          Parse a new network from an xml uri.
 java.lang.String toXML(Network network)
          Covert the network into xml.
 void toXML(Network network, java.io.File file)
          Covert the network into xml and write to the file.
 void writeXML(Network network, java.io.Writer writer)
          Covert the network into xml using the writer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkXMLParser

public NetworkXMLParser()
Method Detail

instance

public static NetworkXMLParser instance()

parse

public Network parse(java.io.File file)
Parse a new network from an xml file. This makes use of the xerces parser.


parse

public Network parse(java.net.URL uri)
Parse a new network from an xml uri. This makes use of the xerces parser.


toXML

public java.lang.String toXML(Network network)
Covert the network into xml.


toXML

public void toXML(Network network,
                  java.io.File file)
Covert the network into xml and write to the file.


writeXML

public void writeXML(Network network,
                     java.io.Writer writer)
Covert the network into xml using the writer.