org.planx.xmlstore.convert
Class DVMBuilder

java.lang.Object
  extended by org.planx.xmlstore.convert.DVMBuilder

public class DVMBuilder
extends Object

Author:
Kasper Bøgebjerg, Henning Niss

Constructor Summary
DVMBuilder(XMLStore xmlstore)
           
 
Method Summary
static Node parse(InputSource in)
          Reads an XML document in serialized form and builds a DVM representation of the document.
static Node parse(String fileName)
          Reads an XML document in serialized form and builds a DVM representation of the document.
static Node saxparse(String fileName)
           
 Reference unparse(InputSource in)
          Unparses an XML document in serialized format to a persistent representation in the Document Value Model (DVM).
 Reference unparse(String fileName)
          Unparses an XML document in serialized format to a persistent representation in the Document Value Model (DVM).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DVMBuilder

public DVMBuilder(XMLStore xmlstore)
Method Detail

parse

public static Node parse(InputSource in)
                  throws XMLException,
                         IOException
Reads an XML document in serialized form and builds a DVM representation of the document. The return value is the root node of the DVM representation. The DVM document consists of immutable nodes and is not saved.

Parameters:
in - serialized XML document.
Returns:
root node of the DVM representation.
Throws:
XMLException
IOException

parse

public static Node parse(String fileName)
                  throws XMLException,
                         IOException
Reads an XML document in serialized form and builds a DVM representation of the document. The return value is the root node of the DVM representation. The DVM document consists of immutable nodes and is not saved.

Parameters:
fileName - file name denoting the serialized XML document.
Returns:
root node of the DVM representation.
Throws:
XMLException
IOException

unparse

public Reference unparse(InputSource in)
                  throws XMLException,
                         IOException
Unparses an XML document in serialized format to a persistent representation in the Document Value Model (DVM). The DVM document consists of immutable nodes and is saved during unparsing. A reference to the document's root node is returned.

Parameters:
in - serialized XML document
Returns:
value reference to the root node of the DVM representation .
Throws:
XMLException
IOException

unparse

public Reference unparse(String fileName)
                  throws XMLException,
                         IOException
Unparses an XML document in serialized format to a persistent representation in the Document Value Model (DVM). The DVM document consists of immutable nodes and is saved during unparsing. A reference to the document's root node is returned.

Parameters:
fileName - serialized XML document
Returns:
value reference to the root node of the DVM representation .
Throws:
XMLException
IOException

saxparse

public static Node saxparse(String fileName)
                     throws XMLException,
                            IOException
Throws:
XMLException
IOException


Copyright © 2010. All Rights Reserved.