AbstractStarTable
, AsciiStarTable
, BeanStarTable
, CalcStarTable
, ColumnPermutedStarTable
, ColumnRandomWrapperStarTable
, ColumnStarTable
, ConcatStarTable
, ConstantStarTable
, CsvStarTable
, EmptyStarTable
, ExplodedStarTable
, JDBCStarTable
, JoinStarTable
, MetaCopyStarTable
, MetadataStarTable
, ProgressBarStarTable
, ProgressLineStarTable
, RandomResultSetStarTable
, RandomStarTable
, RandomWrapperStarTable
, RowListStarTable
, RowPermutedStarTable
, RowRandomWrapperStarTable
, RowSubsetStarTable
, SelectorStarTable
, SequentialResultSetStarTable
, StreamStarTable
, WrapperStarTable
public interface StarTable
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.
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
getCell(long irow,
int icol) |
Returns the contents of a given table cell.
|
java.util.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.
|
java.lang.String |
getName() |
Returns the name of this table, if it has one.
|
DescribedValue |
getParameterByName(java.lang.String parname) |
Returns a parameter (table-wide metadata item) of this table located
by its name.
|
java.util.List |
getParameters() |
Returns a list of table parameters, that is items which pertain to
the entire table.
|
java.lang.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.
|
java.net.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(java.lang.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(java.net.URL url) |
Sets the URL of this table.
|
int getColumnCount()
long getRowCount()
java.net.URL getURL()
void setURL(java.net.URL url)
getURL()
.url
- table URLjava.lang.String getName()
void setName(java.lang.String name)
getName()
.name
- table namejava.util.List getParameters()
DescribedValue
object.DescribedValue getParameterByName(java.lang.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 requiredjava.util.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 java.io.IOException
java.io.IOException
- if there is an error providing accessboolean isRandom()
getRow(long)
and getCell(long, int)
methods be used.java.lang.Object getCell(long irow, int icol) throws java.io.IOException
irow
- the index of the cell's rowicol
- the index of the cell's columnjava.io.IOException
- if there is an error reading the datajava.lang.UnsupportedOperationException
- if isRandom returns
falsejava.lang.Object[] getRow(long irow) throws java.io.IOException
irow
- the index of the row to retrievejava.io.IOException
- if there is an error reading the datajava.lang.UnsupportedOperationException
- if isRandom returns
falseCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.