Package uk.ac.starlink.ttools.jel
Class SequentialJELRowReader
java.lang.Object
gnu.jel.DVMap
uk.ac.starlink.ttools.jel.JELRowReader
uk.ac.starlink.ttools.jel.StarTableJELRowReader
uk.ac.starlink.ttools.jel.SequentialJELRowReader
- All Implemented Interfaces:
Closeable,AutoCloseable,uk.ac.starlink.table.RowData,uk.ac.starlink.table.RowSequence,uk.ac.starlink.util.Sequence
public class SequentialJELRowReader
extends StarTableJELRowReader
implements uk.ac.starlink.table.RowSequence
Implements JELRowReader for sequential access to a table.
This class also implements
RowSequence,
and this object should be treated in the same way as a row sequence
taken out on its table, that is iteration should proceed using the
next and close methods.- Since:
- 8 Feb 2005
- Author:
- Mark Taylor (Starlink)
-
Field Summary
Fields inherited from class uk.ac.starlink.ttools.jel.StarTableJELRowReader
PARAM_PREFIX, UCD_PREFIX, UTYPE_PREFIXFields inherited from class uk.ac.starlink.ttools.jel.JELRowReader
COLUMN_ID_CHAR, NULL_QUERY_PREFIX, OBJECT_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionSequentialJELRowReader(uk.ac.starlink.table.StarTable table) Constructs a new row reader for sequential access.SequentialJELRowReader(uk.ac.starlink.table.StarTable table, uk.ac.starlink.table.RowSplittable rsplit) Constructs a new row reader for sequential access, based on a supplied row splittable. -
Method Summary
Methods inherited from class uk.ac.starlink.ttools.jel.StarTableJELRowReader
createDescribedValueConstant, getBooleanColumnValue, getByteColumnValue, getCharColumnValue, getColumnClass, getColumnIndexByName, getConstantByName, getDescribedValueByName, getDoubleColumnValue, getFloatColumnValue, getIntColumnValue, getLongColumnValue, getObjectColumnValue, getShortColumnValue, getSpecialByName, getTable, getUcdRegex, getUtypeRegex, isBlank, requiresRowIndex, valueDouble, valueInt, valueLong, valueObject, valueStringMethods inherited from class uk.ac.starlink.ttools.jel.JELRowReader
evaluate, evaluateBoolean, evaluateDouble, foundNull, getBooleanArrayProperty, getBooleanProperty, getBooleanProperty, getBooleanValue, getByteArrayProperty, getByteProperty, getByteValue, getCharArrayProperty, getCharProperty, getCharValue, getColumnIndex, getDateArrayProperty, getDoubleArrayProperty, getDoubleProperty, getDoubleValue, getFloatArrayProperty, getFloatProperty, getFloatValue, getIntArrayProperty, getIntProperty, getIntValue, getLongArrayProperty, getLongProperty, getLongValue, getNumberProperty, getObjectArrayProperty, getObjectProperty, getShortArrayProperty, getShortProperty, getShortValue, getStringArrayProperty, getStringProperty, getTranslatedColumns, getTranslatedConstants, getTypeName, setFailOnNull, stripPrefix, translate
-
Constructor Details
-
SequentialJELRowReader
Constructs a new row reader for sequential access. This constructor also takes out a row sequence ontable.- Parameters:
table- table to read- Throws:
IOException
-
SequentialJELRowReader
public SequentialJELRowReader(uk.ac.starlink.table.StarTable table, uk.ac.starlink.table.RowSplittable rsplit) Constructs a new row reader for sequential access, based on a supplied row splittable.Note if the
RowSplittable.rowIndex()method of the supplied RowSplittable returns null, thegetCurrentRow()method of the object constructed here will throw an exception. Before using this reader to evaluate an expression, theStarTableJELRowReader.requiresRowIndex()method should be called to determine if trouble lies ahead.- Parameters:
table- table to readrsplit- row splittable, must apply to the supplied table
-
-
Method Details
-
getCell
Description copied from class:StarTableJELRowReaderReturns the value for a given column in this reader's table at the current row.- Specified by:
getCellin interfaceuk.ac.starlink.table.RowData- Specified by:
getCellin interfaceuk.ac.starlink.table.RowSequence- Specified by:
getCellin classStarTableJELRowReader- Parameters:
icol- column index- Returns:
- contents of column
icolat the current row - Throws:
IOException
-
getRow
- Specified by:
getRowin interfaceuk.ac.starlink.table.RowData- Specified by:
getRowin interfaceuk.ac.starlink.table.RowSequence- Throws:
IOException
-
next
- Specified by:
nextin interfaceuk.ac.starlink.table.RowSequence- Specified by:
nextin interfaceuk.ac.starlink.util.Sequence- Throws:
IOException
-
getCurrentRow
public long getCurrentRow()If the current row is not known, an RuntimeException will be thrown.- Specified by:
getCurrentRowin classStarTableJELRowReader- Returns:
- row index (first row is 0)
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceuk.ac.starlink.table.RowSequence- Throws:
IOException
-