|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.table.WrapperStarTable
uk.ac.starlink.ttools.jel.JELTable
public class JELTable
Wrapper table which is constructed entirely of columns defined by JEL expressions based on the base table.
Field Summary |
---|
Fields inherited from class uk.ac.starlink.table.WrapperStarTable |
---|
baseTable |
Constructor Summary | |
---|---|
JELTable(StarTable baseTable,
ColumnInfo[] colInfos,
String[] exprs)
Constructor. |
Method Summary | |
---|---|
static StarTable |
createJELTable(StarTable baseTable,
ValueInfo[] infos,
String[] exprs)
Convenience factory method. |
Object |
getCell(long irow,
int icol)
Returns the contents of a given table cell. |
int |
getColumnCount()
Returns the number of columns in this table. |
ColumnInfo |
getColumnInfo(int icol)
Returns the object describing the data in a given column. |
Object[] |
getRow(long irow)
Returns the contents of a given table row. |
RowSequence |
getRowSequence()
Returns an object which can iterate over all the rows in the table sequentially. |
Methods inherited from class uk.ac.starlink.table.WrapperStarTable |
---|
checkedLongToInt, getBaseTable, getColumnAuxDataInfos, getName, getParameterByName, getParameters, getRowCount, getURL, isRandom, setName, setParameter, setURL, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JELTable(StarTable baseTable, ColumnInfo[] colInfos, String[] exprs) throws gnu.jel.CompilationException
colInfos
, which must be the same as the number of
elements in exprs
.
If the contentClass
attributes of the colInfos
elements are non-null, they must be compatible with the actual
types of the evaluated expressions. If they are not, an
IllegalArgumentException
will be thrown.
baseTable
- table which provides both behaviour determining
whether random access is available etc, and an evaluation
context for the JEL calculationscolInfos
- column metadata for each of the columns
in this tableexprs
- JEL expressions, evaluated in a context determined
by baseTable
, which give the data for this table.
gnu.jel.CompilationException
Method Detail |
---|
public int getColumnCount()
StarTable
getColumnCount
in interface StarTable
getColumnCount
in class WrapperStarTable
public ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo
in interface StarTable
getColumnInfo
in class WrapperStarTable
icol
- the column for which header information is required
public Object getCell(long irow, int icol) throws IOException
StarTable
getCell
in interface StarTable
getCell
in class WrapperStarTable
irow
- the index of the cell's rowicol
- the index of the cell's column
IOException
- if there is an error reading the datapublic Object[] getRow(long irow) throws IOException
StarTable
getRow
in interface StarTable
getRow
in class WrapperStarTable
irow
- the index of the row to retrieve
IOException
- if there is an error reading the datapublic RowSequence getRowSequence() throws IOException
StarTable
getRowSequence
in interface StarTable
getRowSequence
in class WrapperStarTable
IOException
- if there is an error providing accesspublic static StarTable createJELTable(StarTable baseTable, ValueInfo[] infos, String[] exprs) throws ExecutionException
infos
into ColumnInfos and rethrows any CompilationException as an
ExecutionException.
baseTable
- table which provides both behaviour determining
whether random access is available etc, and an evaluation
context for the JEL calculationsinfos
- metadata used to construct column metadataexprs
- JEL expressions, evaluated in a context determined
by baseTable
, which give the data for this table.
ExecutionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |