public class WrapperStarTable extends java.lang.Object implements StarTable
getURL() method which returns
null as an indication that the actual table is not a persistent
one (though it may be based on, and even identical to, a persistent one).
This class is provided so that it can be extended by subclasses which modify the view of the base table in useful ways.
WrapperRowSequence| Constructor and Description |
|---|
WrapperStarTable(StarTable baseTable)
Constructs a new WrapperStarTable from a given base table.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
checkedLongToInt(long lval)
Convenience method to get an int value from a long.
|
StarTable |
getBaseTable()
Returns the base table underlying this wrapper table.
|
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()
Initially returns null to indicate that this table
itself is not persistent.
|
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.
|
java.lang.String |
toString()
Returns an indication of the wrapper structure of this table.
|
protected StarTable baseTable
public WrapperStarTable(StarTable baseTable)
baseTable - the table to which methods invoked upon the
new wrapper table will be forwardedpublic StarTable getBaseTable()
public int getColumnCount()
StarTablegetColumnCount in interface StarTablepublic long getRowCount()
StarTablegetRowCount in interface StarTablepublic java.net.URL getURL()
public void setURL(java.net.URL url)
StarTableStarTable.getURL().public java.lang.String getName()
StarTablepublic void setName(java.lang.String name)
StarTableStarTable.getName().public java.util.List getParameters()
StarTableDescribedValue object.getParameters in interface StarTablepublic DescribedValue getParameterByName(java.lang.String parname)
StarTablegetParameterByName in interface StarTableparname - the name of the table parameter requiredpublic void setParameter(DescribedValue dval)
StarTablesetParameter in interface StarTabledval - the new parameter datum to addpublic ColumnInfo getColumnInfo(int icol)
StarTablegetColumnInfo in interface StarTableicol - the column for which header information is requiredpublic java.util.List getColumnAuxDataInfos()
StarTableValueInfo 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.
getColumnAuxDataInfos in interface StarTableColumnInfo.getAuxData()public RowSequence getRowSequence() throws java.io.IOException
StarTablegetRowSequence in interface StarTablejava.io.IOException - if there is an error providing accesspublic boolean isRandom()
StarTableStarTable.getRow(long)
and StarTable.getCell(long, int) methods be used.public java.lang.Object getCell(long irow,
int icol)
throws java.io.IOException
StarTablepublic java.lang.Object[] getRow(long irow)
throws java.io.IOException
StarTablepublic static int checkedLongToInt(long lval)
Tables.checkedLongToInt(long).public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.