at.spardat.xma.datasource
Interface ITabularData

All Known Subinterfaces:
ITabularDomData
All Known Implementing Classes:
TabularData, TabularDomData

public interface ITabularData

Represents a table consisting of Atoms provided by a ITabularDataSource.


Method Summary
 Atom getCell(int row, int col)
          Returns the value of a particular table cell
 Atom getCell(int row, java.lang.String columnName)
          Returns the value of a particular table cell
 int getColumnIndex(java.lang.String colName)
          Returns the column index in the table of the column with the given header name
 java.lang.String getColumnName(int col)
          Returns the header name of the n'th column in the table
 int numCols()
          Returns the number of columns in this table
 int size()
          Returns the number of rows in this table
 

Method Detail

size

public int size()
Returns the number of rows in this table


numCols

public int numCols()
Returns the number of columns in this table


getCell

public Atom getCell(int row,
                    int col)
Returns the value of a particular table cell

Parameters:
row - the zero based row index. Must be less than size() and greater equal zero.
col - the zero based column index. Must be less than numCols() and greater equal zero.
Returns:
non null Atom.
Throws:
java.lang.IllegalArgumentException - if row or col is out of bounds.

getCell

public Atom getCell(int row,
                    java.lang.String columnName)
Returns the value of a particular table cell

Parameters:
row - the zero based row index. Must be less than size() and greater equal zero
columnName -
Returns:
non null Atom.
Throws:
java.lang.IllegalArgumentException - if row is out of bounds or columnName does not exist.

getColumnIndex

public int getColumnIndex(java.lang.String colName)
Returns the column index in the table of the column with the given header name

Parameters:
colName - the column name
Returns:
zero based index of the column or -1 if there is no column with name colName.

getColumnName

public java.lang.String getColumnName(int col)
Returns the header name of the n'th column in the table

Parameters:
col - the column index
Throws:
java.lang.IllegalArgumentException - if col greater equal to numCols().