com.sri.emo.commandline.defaults
Class DefaultTreeExporter

java.lang.Object
  extended by com.sri.emo.commandline.defaults.AbstractExportSupport
      extended by com.sri.emo.commandline.defaults.AbstractNodeExportSupport
          extended by com.sri.emo.commandline.defaults.DefaultTreeExporter
All Implemented Interfaces:
TreeExporter

public class DefaultTreeExporter
extends AbstractNodeExportSupport
implements TreeExporter

Author:
Michael Rimov

Field Summary
 org.apache.log4j.Logger log
          Log4j logger.
 
Fields inherited from class com.sri.emo.commandline.defaults.AbstractExportSupport
TESTER_UID
 
Constructor Summary
DefaultTreeExporter(NodeTracker nodeTracker, SqlRowGenerator generator)
           
 
Method Summary
 int exportNode(PrintWriter writer, Node node)
          Exports a node and all of its related attributes, security settings, and relations.
 int exportNodeTree(PrintWriter writer, Node baseNode)
          Exports the given node and all related objecst to the given output stream.
 
Methods inherited from class com.sri.emo.commandline.defaults.AbstractNodeExportSupport
exportAttributes, exportNodeTags, exportNodeType, exportParts, exportPicklists, exportRelations
 
Methods inherited from class com.sri.emo.commandline.defaults.AbstractExportSupport
exportSecuredDBobjectEntries, exportSecurityEntries, getGenerator, getNodeTracker, getSQL, writeDBObject, writeDBObject, writeSql
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sri.emo.commandline.TreeExporter
getSQL
 

Field Detail

log

public final org.apache.log4j.Logger log
Log4j logger.

Constructor Detail

DefaultTreeExporter

public DefaultTreeExporter(NodeTracker nodeTracker,
                           SqlRowGenerator generator)
Method Detail

exportNodeTree

public int exportNodeTree(PrintWriter writer,
                          Node baseNode)
                   throws DBException,
                          IOException
Description copied from interface: TreeExporter
Exports the given node and all related objecst to the given output stream.

Specified by:
exportNodeTree in interface TreeExporter
Parameters:
writer - the printwriter to save the exported sql data to.
baseNode - the root of the tree to export.
Returns:
the total number of records exported in that tree.
Throws:
DBException
IOException

exportNode

public int exportNode(PrintWriter writer,
                      Node node)
               throws DBException,
                      IOException
Exports a node and all of its related attributes, security settings, and relations.

Parameters:
writer -
node -
Returns:
Throws:
DBException
IOException


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.