|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.table.WrapperStarTable
public class WrapperStarTable
StarTable which wraps another StarTable. This class acts as a wrapper
around an existing 'base' StarTable object; almost all its methods are
implemented by forwarding to the corresponding methods of that base
table. The exception is the 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| Field Summary | |
|---|---|
protected StarTable |
baseTable
|
| Constructor Summary | |
|---|---|
WrapperStarTable(StarTable baseTable)
Constructs a new WrapperStarTable from a given base table. |
|
| Method Summary | |
|---|---|
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<ValueInfo> |
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<DescribedValue> |
getParameters()
Returns a list of table parameters, that is metadata 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected StarTable baseTable
| Constructor Detail |
|---|
public WrapperStarTable(StarTable baseTable)
baseTable - the table to which methods invoked upon the
new wrapper table will be forwarded| Method Detail |
|---|
public StarTable getBaseTable()
public int getColumnCount()
StarTable
getColumnCount in interface StarTablepublic long getRowCount()
StarTable
getRowCount in interface StarTablepublic java.net.URL getURL()
getURL in interface StarTablepublic void setURL(java.net.URL url)
StarTableStarTable.getURL().
setURL in interface StarTableurl - table URLpublic java.lang.String getName()
StarTable
getName in interface StarTablepublic void setName(java.lang.String name)
StarTableStarTable.getName().
setName in interface StarTablename - table namepublic java.util.List<DescribedValue> getParameters()
StarTable
getParameters in interface StarTablepublic DescribedValue getParameterByName(java.lang.String parname)
StarTable
getParameterByName in interface StarTableparname - the name of the table parameter requiredpublic void setParameter(DescribedValue dval)
StarTable
setParameter in interface StarTabledval - the new parameter datum to addpublic ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo in interface StarTableicol - the column for which header information is required
public java.util.List<ValueInfo> getColumnAuxDataInfos()
StarTableThe 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
StarTable
getRowSequence 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.
isRandom in interface StarTable
public java.lang.Object getCell(long irow,
int icol)
throws java.io.IOException
StarTable
getCell in interface StarTableirow - the index of the cell's rowicol - the index of the cell's column
java.io.IOException - if there is an error reading the data
public java.lang.Object[] getRow(long irow)
throws java.io.IOException
StarTable
getRow in interface StarTableirow - the index of the row to retrieve
java.io.IOException - if there is an error reading the datapublic static int checkedLongToInt(long lval)
Tables.checkedLongToInt(long).
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||