org.palo.api.ext.favoriteviews.impl
Class FavoriteViewXMLBuilder

java.lang.Object
  extended by org.palo.api.ext.favoriteviews.impl.FavoriteViewXMLBuilder

public class FavoriteViewXMLBuilder
extends java.lang.Object

FavoriteViewXMLBuilder Translates a tree built from FavoriteViewTreeNode objects (more precisely from FavoriteViewsFolder and FavoriteView objects) into an XML text. Note that the preOrderTraversal method has been copied from the TreeUtils class. It needed to be slightly modified as we needed to watch for _entry_ and _exit_ events during visitation of nodes.

Version:
$Id: FavoriteViewXMLBuilder.html,v 1.8 2009/07/09 11:01:47 ArndHouben Exp $

Constructor Summary
FavoriteViewXMLBuilder(Connection con)
          The constructor initializes the result with the XML header description and sets initial indentation to 0.
 
Method Summary
 java.lang.String getResult()
          Returns the result buffer as a string.
 void preOrderTraversal(FavoriteViewTreeNode node)
          Traverses the specified tree in pre-order (children before the parent) and signals visit-begin and visit-end notifications upon doing so.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FavoriteViewXMLBuilder

public FavoriteViewXMLBuilder(Connection con)
The constructor initializes the result with the XML header description and sets initial indentation to 0.

Method Detail

preOrderTraversal

public void preOrderTraversal(FavoriteViewTreeNode node)
Traverses the specified tree in pre-order (children before the parent) and signals visit-begin and visit-end notifications upon doing so.

Parameters:
node - the tree node which is to be visited (usually, the user calls the method with the root of a tree).

getResult

public java.lang.String getResult()
Returns the result buffer as a string.

Returns:
the result buffer as a string.