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:
uk.ac.starlink.table.RowSequence,ConeQueryRowSequence
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
-
-
Constructor Summary
Constructors Constructor Description ColumnQueryRowSequence(uk.ac.starlink.table.StarTable table, int raCol, int decCol, int srCol)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConeQueryRowSequencecreateFixedRadiusSequence(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.doublegetDec()Get central declination for the current row's cone search request in degrees.longgetIndex()Get the index in the underlying table to which the current row relates.doublegetRa()Get central right ascension for the current row's cone search request in degrees.doublegetRadius()Get search radius for the current row's cone search request in degrees.booleannext()-
Methods inherited from class uk.ac.starlink.table.WrapperRowSequence
close, getCell, getRow, toString
-
-
-
-
Constructor Detail
-
ColumnQueryRowSequence
public ColumnQueryRowSequence(uk.ac.starlink.table.StarTable table, int raCol, int decCol, int srCol) throws java.io.IOExceptionConstructor.- 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:
java.io.IOException
-
-
Method Detail
-
getRa
public double getRa() throws java.io.IOExceptionDescription copied from interface:ConeQueryRowSequenceGet central right ascension for the current row's cone search request in degrees.- Specified by:
getRain interfaceConeQueryRowSequence- Returns:
- right ascension
- Throws:
java.io.IOException
-
getDec
public double getDec() throws java.io.IOExceptionDescription copied from interface:ConeQueryRowSequenceGet central declination for the current row's cone search request in degrees.- Specified by:
getDecin interfaceConeQueryRowSequence- Returns:
- declination
- Throws:
java.io.IOException
-
getRadius
public double getRadius() throws java.io.IOExceptionDescription copied from interface:ConeQueryRowSequenceGet search radius for the current row's cone search request in degrees.- Specified by:
getRadiusin interfaceConeQueryRowSequence- Returns:
- search radius
- Throws:
java.io.IOException
-
getIndex
public long getIndex()
Description copied from interface:ConeQueryRowSequenceGet 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:
getIndexin interfaceConeQueryRowSequence- Returns:
- row index
-
next
public boolean next() throws java.io.IOException- Specified by:
nextin interfaceuk.ac.starlink.table.RowSequence- Overrides:
nextin classuk.ac.starlink.table.WrapperRowSequence- Throws:
java.io.IOException
-
createFixedRadiusSequence
public static ConeQueryRowSequence createFixedRadiusSequence(uk.ac.starlink.table.StarTable table, int raCol, int decCol, double sr) throws java.io.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:
java.io.IOException
-
-