info.aduna.clustermap
Class ClassificationTreeWriter

java.lang.Object
  extended by info.aduna.clustermap.ClassificationTreeWriter

public class ClassificationTreeWriter
extends Object

ClassificationTreeWriter serializes the contents of a hierarchy of Classifications containing Objects to an XML stream, using the SAX 2.0 API. Objects that are instances of DefaultObject have their name and location properties serialized as well. The element and attribute names used in the serialization are defined in the XmlConstants interface.


Constructor Summary
ClassificationTreeWriter()
           
 
Method Summary
 void writeTree(Classification tree, ContentHandler handler)
          Sends SAX 2.0 events to the specified DocumentHandler that describe the contents of the specified Classification tree.
 void writeTree(Classification tree, Writer writer)
          Writes the specified Classification tree to the specified Writer using the XML encoding of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassificationTreeWriter

public ClassificationTreeWriter()
Method Detail

writeTree

public void writeTree(Classification tree,
                      ContentHandler handler)
               throws SAXException
Sends SAX 2.0 events to the specified DocumentHandler that describe the contents of the specified Classification tree. The stream encodes a complete XML document, i.e. including startDocument and endDocument events.

Throws:
SAXException

writeTree

public void writeTree(Classification tree,
                      Writer writer)
               throws SAXException
Writes the specified Classification tree to the specified Writer using the XML encoding of this class. The character stream contains a complete XML document. The specified Writer is not closed by this method.

Throws:
SAXException


Copyright © 1997-2008 Aduna. All Rights Reserved.