Package uk.ac.starlink.ttools.plot2.data
Interface UserDataReader
-
public interface UserDataReader
Reader that can interrogate a row sequence to return the coordinate and mask values specified by a DataSpec. It is applied to a RowSequence obtained from the DataSpec's source table.Note this object is applied to an external RowSequence which must be advanced externally, rather than owning and advancing its own RowSequence. This is because multiple instances of this class may share the same RowSequence.
The read methods are sequential and must be presented with RowSequence and row index values appropriate for a given row in the table. Despite the presence of the row index parameters, they are not random-access methods, but the row index may be needed alongside the correctly positioned row sequence.
Instances of this object are not expected to be usable from multiple concurrent threads.
- Since:
- 10 Feb 2013
- Author:
- Mark Taylor
- See Also:
DataSpec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
getMaskFlag(uk.ac.starlink.table.RowSequence rseq, long irow)
Returns the mask flag for the current position in a row sequence.java.lang.Object[]
getUserCoordValues(uk.ac.starlink.table.RowSequence rseq, long irow, int icoord)
Returns a user coordinate value array for a given coordinate at the current position in a row sequence.
-
-
-
Method Detail
-
getMaskFlag
boolean getMaskFlag(uk.ac.starlink.table.RowSequence rseq, long irow) throws java.io.IOException
Returns the mask flag for the current position in a row sequence.- Parameters:
rseq
- row sequence positioned at the row of interestirow
- row index of the row of interest- Returns:
- true iff the row of interest is included in the data set
- Throws:
java.io.IOException
-
getUserCoordValues
java.lang.Object[] getUserCoordValues(uk.ac.starlink.table.RowSequence rseq, long irow, int icoord) throws java.io.IOException
Returns a user coordinate value array for a given coordinate at the current position in a row sequence. The returned value is an array which may be re-used, so it should not be assumed to retain its contents between calls to this method.- Parameters:
rseq
- row sequence positioned at the row of interestirow
- row index of the row of interesticoord
- coordinate index to read- Returns:
- array of user values (not storage values) for the specified coordinate at the row of interest
- Throws:
java.io.IOException
-
-