es.unex.sextante.dataObjects
Interface ITable

All Superinterfaces:
IDataObject
All Known Implementing Classes:
AbstractTable

public interface ITable
extends IDataObject

This is the base interface that all table objects have to implement to be able to be used by SEXTANTE algorithms. Instead of implementing this class directly, it is recommended to extend AbstractTable

Author:
Victor Olaya. volaya@unex.es

Method Summary
 void addRecord(java.lang.Object[] attributes)
          adds a new record to the table
 int getFieldCount()
          Returns the total number of fields
 int getFieldIndexByName(java.lang.String fieldName)
          Returns the index of a field from its name.
 java.lang.String getFieldName(int i)
          Returns the name of a field
 java.lang.String[] getFieldNames()
          Returns an array with the names of all the fields in the table
 java.lang.Class getFieldType(int i)
          Returns the data type of a field
 java.lang.Class[] getFieldTypes()
          Returns an array with data types of all the fields in the table
 long getRecordCount()
          Returns the total number of records(rows) in the table
 IRecordsetIterator iterator()
          Returns an iterator to iterate the table
 
Methods inherited from interface es.unex.sextante.dataObjects.IDataObject
close, getBaseDataObject, getFilename, getName, open, postProcess, setName
 

Method Detail

addRecord

void addRecord(java.lang.Object[] attributes)
adds a new record to the table

Parameters:
attributes - the values of the record

iterator

IRecordsetIterator iterator()
Returns an iterator to iterate the table

Returns:
an iterator to iterate the table

getFieldName

java.lang.String getFieldName(int i)
Returns the name of a field

Parameters:
i - the field. zero-based
Returns:
The name of the specified field

getFieldType

java.lang.Class getFieldType(int i)
Returns the data type of a field

Parameters:
i - the field. zero-based
Returns:
The data type of the specified field

getFieldCount

int getFieldCount()
Returns the total number of fields

Returns:
the total number of fields

getFieldTypes

java.lang.Class[] getFieldTypes()
Returns an array with data types of all the fields in the table

Returns:
an array with data types of all the fields in the table

getFieldNames

java.lang.String[] getFieldNames()
Returns an array with the names of all the fields in the table

Returns:
an array with the names of all the fields in the table

getRecordCount

long getRecordCount()
Returns the total number of records(rows) in the table

Returns:
the total number of records(rows) in the table

getFieldIndexByName

int getFieldIndexByName(java.lang.String fieldName)
Returns the index of a field from its name. Returns -1 if there is not a field with that name.

Parameters:
fieldName - the name of the field
Returns:
the index of the given field