|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.AbstractStarTable | +--uk.ac.starlink.table.RandomStarTable | +--uk.ac.starlink.table.formats.TextStarTable
Simple ASCII-format table. This reader attempts to make sensible decisions about what is a table and what is not, but inevitably it will not be able to read ASCII tables in any format.
Here are the rules:
This reader reads the whole table into memory before trying to make sense of it, since otherwise it would have to do two passes, one to work out the type of each column and one to read the data. This is not suitable for a very large table, but you're not really expected to have very large tables in plain text format. For similar reasons, it is not coded to provide maximum efficiency for very large tables.
Constructor Summary | |
TextStarTable(DataSource datsrc)
Constructs a new TextStarTable from a datasource. |
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. |
List |
getParameters()
Returns a list of table parameters, that is items which pertain to the entire table. |
Object[] |
getRow(long irow)
The AbstractStarTable implementation of this method constructs a row by repeated invocation of getCell(long, int) . |
long |
getRowCount()
The number of rows in this table. |
Methods inherited from class uk.ac.starlink.table.RandomStarTable |
getRowSequence, isRandom |
Methods inherited from class uk.ac.starlink.table.AbstractStarTable |
checkedLongToInt, getColumnAuxDataInfos, getName, getParameterByName, getURL, setName, setParameters, setURL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextStarTable(DataSource datsrc) throws IOException
Method Detail |
public int getColumnCount()
StarTable
getColumnCount
in interface StarTable
getColumnCount
in class AbstractStarTable
public long getRowCount()
RandomStarTable
getRowCount
in interface StarTable
getRowCount
in class RandomStarTable
public Object getCell(long irow, int icol)
AbstractStarTable
getCell
in interface StarTable
getCell
in class AbstractStarTable
irow
- the index of the cell's rowicol
- the index of the cell's column
public Object[] getRow(long irow)
AbstractStarTable
AbstractStarTable.getCell(long, int)
.
getRow
in interface StarTable
getRow
in class AbstractStarTable
irow
- the index of the row to retrieve
public ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo
in interface StarTable
getColumnInfo
in class AbstractStarTable
icol
- the column for which header information is required
public List getParameters()
StarTable
DescribedValue
object.
getParameters
in interface StarTable
getParameters
in class AbstractStarTable
|
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 |