gov.sns.xal.model.xml
Class LatticeXmlWriter

java.lang.Object
  |
  +--gov.sns.xal.model.xml.LatticeXmlWriter

public class LatticeXmlWriter
extends java.lang.Object

Writes a Lattice object to an XML document, using the same format supported by LatticeXmlParser. Calling either the static method writeXml, or the instance method writeLatticeToFile with a Lattice object and a URI string identifying the fully-qualified output file, causes the elements comprising the Lattice to be written to the specified file.


Constructor Summary
LatticeXmlWriter()
           
 
Method Summary
static org.w3c.dom.Document documentForLattice(Lattice lattice)
          Returns a DOM for the supplied lattice.
static void writeXml(Lattice lattice, java.lang.String fileURI)
          Writes supplied Lattice to the specified XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatticeXmlWriter

public LatticeXmlWriter()
Method Detail

writeXml

public static void writeXml(Lattice lattice,
                            java.lang.String fileURI)
                     throws java.io.IOException
Writes supplied Lattice to the specified XML file.

Parameters:
lattice - The Lattice to output
fileURI - String URI of output file
Throws:
java.io.IOException - error writing to fileURI

documentForLattice

public static org.w3c.dom.Document documentForLattice(Lattice lattice)
                                               throws java.io.IOException
Returns a DOM for the supplied lattice.

Parameters:
lattice - the Lattice whose DOM to return
Returns:
a DOM for the supplied lattice
java.io.IOException