1 package com.sri.emo.commandline; 2 3 import java.io.IOException; 4 import java.io.PrintWriter; 5 import java.util.List; 6 7 import com.jcorporate.expresso.core.db.DBException; 8 import com.jcorporate.expresso.core.dbobj.DBObject; 9 import com.sri.emo.dbobj.Node; 10 11 /*** 12 * Exports the SQL of an entire tree of nodes (defined by the 13 * node baseNode). 14 * @author Michael Rimov 15 * 16 */ 17 public interface TreeExporter { 18 19 /*** 20 * Exports the given node and all related objecst to the 21 * given output stream. 22 * @param output the printwriter to save the exported 23 * sql data to. 24 * @param baseNode the root of the tree to export. 25 * @return the total number of records exported in that tree. 26 */ 27 int exportNodeTree(PrintWriter output, Node baseNode)throws DBException, IOException; 28 29 /*** 30 * Retrieves the sql insert strings for the 31 * @return list of strings, all the SQL insert statements for the given object 32 */ 33 List getSQL(DBObject dbobject) throws DBException; 34 }