Package uk.ac.starlink.ttools.cone
Class ColumnQueryRowSequence
java.lang.Object
uk.ac.starlink.table.WrapperRowSequence
uk.ac.starlink.ttools.cone.ColumnQueryRowSequence
- All Implemented Interfaces:
Closeable
,AutoCloseable
,uk.ac.starlink.table.RowData
,uk.ac.starlink.table.RowSequence
,ConeQueryRowSequence
,uk.ac.starlink.util.Sequence
public class ColumnQueryRowSequence
extends uk.ac.starlink.table.WrapperRowSequence
implements ConeQueryRowSequence
ConeQueryRowSequence implementation which extracts values based on
supplied column indices.
- Since:
- 16 Oct 2007
- Author:
- Mark Taylor
-
Field Summary
Fields inherited from class uk.ac.starlink.table.WrapperRowSequence
baseSeq
-
Constructor Summary
ConstructorsConstructorDescriptionColumnQueryRowSequence
(uk.ac.starlink.table.StarTable table, int raCol, int decCol, int srCol) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConeQueryRowSequence
createFixedRadiusSequence
(uk.ac.starlink.table.StarTable table, int raCol, int decCol, double sr) Utility method which constructs a ConeQueryRowSequence object using column indices for RA and Dec but a constant value for the search radius.double
getDec()
Get central declination for the current row's cone search request in degrees.long
getIndex()
Get the index in the underlying table to which the current row relates.double
getRa()
Get central right ascension for the current row's cone search request in degrees.double
Get search radius for the current row's cone search request in degrees.boolean
next()
Methods inherited from class uk.ac.starlink.table.WrapperRowSequence
close, getCell, getRow, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface uk.ac.starlink.table.RowSequence
close, getCell, getRow
-
Constructor Details
-
ColumnQueryRowSequence
public ColumnQueryRowSequence(uk.ac.starlink.table.StarTable table, int raCol, int decCol, int srCol) throws IOException Constructor.- Parameters:
table
- input tableraCol
- index of column giving right ascension in degreesdecCol
- index of column giving declination in degreessrCol
- index of column giving search radius in degrees- Throws:
IOException
-
-
Method Details
-
getRa
Description copied from interface:ConeQueryRowSequence
Get central right ascension for the current row's cone search request in degrees.- Specified by:
getRa
in interfaceConeQueryRowSequence
- Returns:
- right ascension
- Throws:
IOException
-
getDec
Description copied from interface:ConeQueryRowSequence
Get central declination for the current row's cone search request in degrees.- Specified by:
getDec
in interfaceConeQueryRowSequence
- Returns:
- declination
- Throws:
IOException
-
getRadius
Description copied from interface:ConeQueryRowSequence
Get search radius for the current row's cone search request in degrees.- Specified by:
getRadius
in interfaceConeQueryRowSequence
- Returns:
- search radius
- Throws:
IOException
-
getIndex
public long getIndex()Description copied from interface:ConeQueryRowSequence
Get the index in the underlying table to which the current row relates. The identity of this underlying table is not specified by this interface, but must be understood by the creator and user of instances. In particular, the return value does not necessarily increment by one for each call tonext
.- Specified by:
getIndex
in interfaceConeQueryRowSequence
- Returns:
- row index
-
next
- Specified by:
next
in interfaceuk.ac.starlink.table.RowSequence
- Specified by:
next
in interfaceuk.ac.starlink.util.Sequence
- Overrides:
next
in classuk.ac.starlink.table.WrapperRowSequence
- Throws:
IOException
-
createFixedRadiusSequence
public static ConeQueryRowSequence createFixedRadiusSequence(uk.ac.starlink.table.StarTable table, int raCol, int decCol, double sr) throws IOException Utility method which constructs a ConeQueryRowSequence object using column indices for RA and Dec but a constant value for the search radius.- Parameters:
table
- input tableraCol
- index of column giving right ascension in degreesdecCol
- index of column giving declination in degreessr
- fixed search radius in degrees- Throws:
IOException
-