public abstract class AbstractStarTable extends Object implements StarTable
Constructor and Description |
---|
AbstractStarTable() |
Modifier and Type | Method and Description |
---|---|
static int |
checkedLongToInt(long lval)
Convenience method to get an int value from a long.
|
void |
close()
The AbstractStarTable implementation of this method
does nothing.
|
Object |
getCell(long irow,
int icol)
The AbstractStarTable implementation of this method throws an
UnsupportedOperationException, since unless otherwise
provided there is no random access.
|
List<ValueInfo> |
getColumnAuxDataInfos()
Goes through the table columns (ColumnInfo objects)
and picks out all the AuxData items which exist, generalising
where necessary and returning a union of them in
alphabetical order by name.
|
abstract int |
getColumnCount()
Returns the number of columns in this table.
|
abstract ColumnInfo |
getColumnInfo(int icol)
Returns the object describing the data in a given column.
|
String |
getName()
Returns the name of this table, if it has one.
|
List<DescribedValue> |
getParameters()
Returns a list of table parameters, that is metadata 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) . |
RowAccess |
getRowAccess()
Returns an object which can provide random access to this
table's data, if random access is implemented.
|
abstract long |
getRowCount()
Returns the number of rows in this table, if known.
|
abstract RowSequence |
getRowSequence()
Returns an object which can iterate over all the rows in the table
sequentially.
|
RowSplittable |
getRowSplittable()
Returns a default splittable which relies on table random access
if available, or otherwise provides only sequential access (no splits).
|
URL |
getURL()
Returns the URL of this table, if it has one.
|
boolean |
isRandom()
The AbstractStarTable implementation of this method
returns false.
|
void |
setName(String name)
Sets the name for this table.
|
void |
setParameters(List<DescribedValue> parameters)
Sets the list of table parameters, that is items which pertain
to the entire table.
|
void |
setURL(URL url)
Sets the URL for this table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameterByName, setParameter
public List<ValueInfo> getColumnAuxDataInfos()
getColumnAuxDataInfos
in interface StarTable
DefaultValueInfo.getAuxData()
public List<DescribedValue> getParameters()
StarTable
getParameters
in interface StarTable
public void setParameters(List<DescribedValue> parameters)
DescribedValue
object.parameters
- a List of DescribedValues pertaining
to this tablepublic String getName()
StarTable
public void setName(String name)
public URL getURL()
StarTable
public void setURL(URL url)
public static int checkedLongToInt(long lval)
Tables.checkedLongToInt(long)
.public boolean isRandom()
public RowAccess getRowAccess() throws IOException
StarTable
getRowAccess
in interface StarTable
IOException
- if there is an error setting up accesspublic RowSplittable getRowSplittable() throws IOException
It is often possible to provide a better implementation than this.
getRowSplittable
in interface StarTable
Tables.getDefaultRowSplittable(this)
IOException
RowRunner
public Object getCell(long irow, int icol) throws IOException
getCell
in interface StarTable
irow
- the index of the cell's rowicol
- the index of the cell's columnIOException
- if there is an error reading the datapublic Object[] getRow(long irow) throws IOException
getCell(long, int)
.getRow
in interface StarTable
irow
- the index of the row to retrieveIOException
- if there is an error reading the datapublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface StarTable
IOException
public abstract ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo
in interface StarTable
icol
- the column for which header information is requiredpublic abstract int getColumnCount()
StarTable
getColumnCount
in interface StarTable
public abstract long getRowCount()
StarTable
getRowCount
in interface StarTable
public abstract RowSequence getRowSequence() throws IOException
StarTable
getRowSequence
in interface StarTable
IOException
- if there is an error providing accessCopyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.