net.sf.imageCave.database
Class DataTableBuilder

java.lang.Object
  |
  +--net.sf.imageCave.database.DataTableBuilder
Direct Known Subclasses:
ASTDataTableBuilder

public abstract class DataTableBuilder
extends java.lang.Object

Want a DataTable built?. Just make an instance of this class and tell it to build one. Well, more specifically use a subclass of this (since this is an abstract class).

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

Constructor Summary
DataTableBuilder()
           
 
Method Summary
abstract  DataRow buildRow(java.lang.Object block)
          Build a row to put into the table.
abstract  void buildTable()
          Build a table with this DataTableBuilder.
abstract  DataTable getTable()
          Get the table that this DataTableBuilder just built.
abstract  void setTableSource(CfgFile cf)
          Set the CfgFile from which to build the table/rows.
abstract  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

DataTableBuilder

public DataTableBuilder()
Method Detail

buildTable

public abstract void buildTable()
Build a table with this DataTableBuilder.


buildRow

public abstract DataRow buildRow(java.lang.Object block)
Build a row to put into the table. We just want to access it by this.buildTable() to build the rows in this table. Making this private wouldn't work because it is abstract.

Parameters:
block - an Object that is used to build a row.
Returns:
a data row built from the object passed to the function.

getTable

public abstract DataTable getTable()
Get the table that this DataTableBuilder just built.

Returns:
the last DataTable built by this DataTableBuilder

setTableSource

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

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

setTableSource

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

Parameters:
cf - the CfgFile to use


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