public abstract class AbstractStarTable extends Object implements StarTable
StarTable interface.
 This implementation assumes that random access is not available;
 subclasses which provide random access should override 
 the isRandom, getCell
 and perhaps getRow methods.| 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, waitgetParameterByName, setParameterpublic List<ValueInfo> getColumnAuxDataInfos()
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.
 Subclasses should override this if they can do better, for instance
 providing an order for the keys.getColumnAuxDataInfos in interface StarTableValueInfo
          items which in fact crop up in column metadataDefaultValueInfo.getAuxData()public List<DescribedValue> getParameters()
StarTablegetParameters in interface StarTableList of DescribedValue objects 
          constituting table-wide metadata not covered elsewhere 
          in this interfacepublic void setParameters(List<DescribedValue> parameters)
parameters should be a DescribedValue object.parameters - a List of DescribedValues pertaining
         to this tablepublic String getName()
StarTablepublic void setName(String name)
public URL getURL()
StarTablepublic void setURL(URL url)
public static int checkedLongToInt(long lval)
public boolean isRandom()
AbstractStarTable implementation of this method 
 returns false.public RowAccess getRowAccess() throws IOException
StarTablegetRowAccess in interface StarTableIOException - 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 StarTableTables.getDefaultRowSplittable(this)IOExceptionRowRunnerpublic Object getCell(long irow, int icol) throws IOException
AbstractStarTable implementation of this method
 throws an UnsupportedOperationException,
 since unless otherwise provided there is no random access.getCell in interface StarTableirow - 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
AbstractStarTable implementation of this method 
 constructs a row by repeated invocation of getCell(long, int).getRow in interface StarTableirow - the index of the row to retrieveirowIOException - if there is an error reading the datapublic void close()
           throws IOException
AbstractStarTable implementation of this method
 does nothing.close in interface Closeableclose in interface AutoCloseableclose in interface StarTableIOExceptionpublic abstract ColumnInfo getColumnInfo(int icol)
StarTablegetColumnInfo in interface StarTableicol - the column for which header information is requiredicolpublic abstract int getColumnCount()
StarTablegetColumnCount in interface StarTablepublic abstract long getRowCount()
StarTablegetRowCount in interface StarTablepublic abstract RowSequence getRowSequence() throws IOException
StarTablegetRowSequence in interface StarTableIOException - if there is an error providing accessCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.