|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StarTable
Defines basic table functionality.
A table has a fixed number of columns, and a sequence of rows, each of
which has one entry for each column.
The entry in each column is of the same type (or at least a subtype
of a given type) for each row; this type can be determined using
the ColumnInfo
objects returned by getColumnInfo(int)
.
The first row and the first column are numbered 0.
All StarTables allow sequential access, provided by
calling getRowSequence()
. This may in general be
called multiple times so that more than one iteration can be made
through the rows of the table from start to finish.
Additionally, if the isRandom()
method returns true
then the random access methods getRow(long)
and getCell(long, int)
may be used to access table contents directly.
For random tables, the getRow and getCell methods should be thread-safe. Separate RowSequence objects obtained from the same table should be safely usable from different threads, but a given RowSequence in general will not.
Method Summary | |
---|---|
Object |
getCell(long irow,
int icol)
Returns the contents of a given table cell. |
List |
getColumnAuxDataInfos()
Returns an ordered list of ValueInfo objects representing
the auxiliary metadata returned by
getColumnInfo(int).getAuxData() calls. |
int |
getColumnCount()
Returns the number of columns in this table. |
ColumnInfo |
getColumnInfo(int icol)
Returns the object describing the data in a given column. |
String |
getName()
Returns the name of this table, if it has one. |
DescribedValue |
getParameterByName(String parname)
Returns a parameter (table-wide metadata item) of this table located by its name. |
List |
getParameters()
Returns a list of table parameters, that is items which pertain to the entire table. |
Object[] |
getRow(long irow)
Returns the contents of a given table row. |
long |
getRowCount()
Returns the number of rows in this table, if known. |
RowSequence |
getRowSequence()
Returns an object which can iterate over all the rows in the table sequentially. |
URL |
getURL()
Returns the URL of this table, if it has one. |
boolean |
isRandom()
Indicates whether random access is provided by this table. |
void |
setName(String name)
Sets the name of this table. |
void |
setParameter(DescribedValue dval)
Adds the given DescribedValue to the list of parameter metadata objects associated with this table. |
void |
setURL(URL url)
Sets the URL of this table. |
Method Detail |
---|
int getColumnCount()
long getRowCount()
URL getURL()
void setURL(URL url)
getURL()
.
url
- table URLString getName()
void setName(String name)
getName()
.
name
- table nameList getParameters()
DescribedValue
object.
DescribedValue getParameterByName(String parname)
parname
- the name of the table parameter requiredvoid setParameter(DescribedValue dval)
dval
- the new parameter datum to addColumnInfo getColumnInfo(int icol)
icol
- the column for which header information is required
List getColumnAuxDataInfos()
ValueInfo
objects representing
the auxiliary metadata returned by
getColumnInfo(int).getAuxData() calls.
The idea is that the resulting list can be used to find out
the kind of per-column metadata which can be expected to be found
in some or all columns of this table. Each item in the returned
list should have a unique name, and other characteristics which are
applicable to auxData items which may be returned from any of
the columns in this table.
The order of the list may indicate some sort of natural ordering of these keys. The returned list is not guaranteed to be complete; it is legal to return an empty list if nothing is known about auxiliary metadata. The list ought not to contain duplicate elements.
ColumnInfo.getAuxData()
RowSequence getRowSequence() throws IOException
IOException
- if there is an error providing accessboolean isRandom()
getRow(long)
and getCell(long, int)
methods be used.
Object getCell(long irow, int icol) throws IOException
irow
- the index of the cell's rowicol
- the index of the cell's column
IOException
- if there is an error reading the data
UnsupportedOperationException
- if isRandom returns
falseObject[] getRow(long irow) throws IOException
irow
- the index of the row to retrieve
IOException
- if there is an error reading the data
UnsupportedOperationException
- if isRandom returns
false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |