net.sf.imageCave.database
Class ASTDataTableBuilder

java.lang.Object
  |
  +--net.sf.imageCave.database.DataTableBuilder
        |
        +--net.sf.imageCave.database.ASTDataTableBuilder

public class ASTDataTableBuilder
extends DataTableBuilder

Want a DataTable built from an instance of a DataAST?. Just make an instance of this class and tell it to build one.

Since:
16 March, 2004
Version:
%I%, %G%
Author:
Stuart T. Tett, disc0stu@sf.net
See Also:
DataTable, DataTableBuilder, DataAST

Constructor Summary
ASTDataTableBuilder()
           
 
Method Summary
 DataRow buildRow(java.lang.Object block)
          Build a row to put into the table.
 void buildTable()
          Build a table from a DataAST.
 DataTable getTable()
          Get the table that this ASTDataTableBuilder just built
 void setTableSource(CfgFile cf)
          Set the CfgFile from which to build the table/rows.
 void setTableSource(java.lang.String path, java.lang.String filename)
          Set the CfgFile from which to build the table/rows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTDataTableBuilder

public ASTDataTableBuilder()
Method Detail

buildTable

public void buildTable()
Build a table from a DataAST.

Specified by:
buildTable in class DataTableBuilder

buildRow

public DataRow buildRow(java.lang.Object block)
Build a row to put into the table. We just want to access by this.buildTable() to build the rows in this table. Made public because making it private gave errors from the abstract nature of its superclass method.

Specified by:
buildRow in class DataTableBuilder
Parameters:
block - an AST that represents a row (whose root's key is block)
Returns:
a data row built from the DataAST passed to the function.

getTable

public DataTable getTable()
Get the table that this ASTDataTableBuilder just built

Specified by:
getTable in class DataTableBuilder
Returns:
the last DataTable built by this DataTableBuilder

setTableSource

public void setTableSource(java.lang.String path,
                           java.lang.String filename)
Set the CfgFile from which to build the table/rows.

Specified by:
setTableSource in class DataTableBuilder
Parameters:
path - the path to the directory in which the file resides
filename - the name of the file (e.g. foo.cfg)

setTableSource

public void setTableSource(CfgFile cf)
Set the CfgFile from which to build the table/rows.

Specified by:
setTableSource in class DataTableBuilder
Parameters:
cf - the CfgFile to use.


Copyright 2004 Brian Lund, Justin Rasmussen, & Stuart Tett. All Rights Reserved.