|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.table.AbstractStarTable
uk.ac.starlink.table.JoinStarTable
public class JoinStarTable
Joins a number of tables to produce a single combined table. The result consists of all the constituent tables side by side, so has a number of columns equal to the sum of the numbers of columns in all the constituent tables. The nth row of this table is composed by appending the nth rows of all the constituent tables together in sequence. The number of rows is equal to the smallest of all the number of rows in the constituent tables (typically they will all have the same number of rows). Random access is only available if it is available in all the constituent tables.
While this table is active, the columns that the constituent tables had at the time of its construction shouldn't change their characteristics in incompatible ways or disappear. It's OK to add new columns though.
| Constructor Summary | |
|---|---|
JoinStarTable(StarTable[] tables)
Constructs a new JoinStarTable from a list of constituent tables. |
|
JoinStarTable(StarTable[] tables,
JoinFixAction[] fixCols)
Constructs a new JoinStarTable from a list of constituent tables, optionally renaming duplicated column names. |
|
| Method Summary | |
|---|---|
Object |
getCell(long irow,
int icol)
The AbstractStarTable implementation of this method throws an UnsupportedOperationException, since unless otherwise provided there is no random access. |
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)
The AbstractStarTable implementation of this method constructs a row by repeated invocation of AbstractStarTable.getCell(long, int). |
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. |
List |
getTables()
Returns an unmodifiable list of the constituent tables providing the base data for this join table. |
boolean |
isRandom()
The AbstractStarTable implementation of this method returns false. |
| Methods inherited from class uk.ac.starlink.table.AbstractStarTable |
|---|
checkedLongToInt, getColumnAuxDataInfos, getName, getParameterByName, getParameters, getURL, setName, setParameter, setParameters, setURL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JoinStarTable(StarTable[] tables,
JoinFixAction[] fixCols)
tables - array of constituent table objects providing the
data and metadata for a new joined tablefixCols - actions to be taken in modifying column names from
the originals (may be null for no action)public JoinStarTable(StarTable[] tables)
tables - array of constituent table objects providing the
data and metadata for a new joined table| Method Detail |
|---|
public List getTables()
public int getColumnCount()
StarTable
getColumnCount in interface StarTablegetColumnCount in class AbstractStarTablepublic long getRowCount()
StarTable
getRowCount in interface StarTablegetRowCount in class AbstractStarTablepublic ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo in interface StarTablegetColumnInfo in class AbstractStarTableicol - the column for which header information is required
public boolean isRandom()
AbstractStarTable
isRandom in interface StarTableisRandom in class AbstractStarTable
public Object getCell(long irow,
int icol)
throws IOException
AbstractStarTable
getCell in interface StarTablegetCell in class AbstractStarTableirow - the index of the cell's rowicol - the index of the cell's column
IOException - if there is an error reading the data
public Object[] getRow(long irow)
throws IOException
AbstractStarTableAbstractStarTable.getCell(long, int).
getRow in interface StarTablegetRow in class AbstractStarTableirow - the index of the row to retrieve
IOException - if there is an error reading the data
public RowSequence getRowSequence()
throws IOException
StarTable
getRowSequence in interface StarTablegetRowSequence in class AbstractStarTableIOException - if there is an error providing access
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||