Package uk.ac.starlink.ttools.cone
Class SequentialResultRowSequence
- java.lang.Object
-
- uk.ac.starlink.ttools.cone.SequentialResultRowSequence
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,uk.ac.starlink.table.RowData,uk.ac.starlink.table.RowSequence,ConeQueryRowSequence,ConeResultRowSequence,uk.ac.starlink.util.Sequence
public class SequentialResultRowSequence extends java.lang.Object implements ConeResultRowSequence
Straightforward implementation of ConeResultRowSequence based on a ConeQueryRowSequence.- Since:
- 16 Jan 2008
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description SequentialResultRowSequence(ConeQueryRowSequence querySeq, ConeSearcher coneSearcher, ConeErrorPolicy errAct, Coverage coverage, boolean bestOnly, boolean distFilter, java.lang.String distanceCol)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.ObjectgetCell(int icol)uk.ac.starlink.table.StarTablegetConeResult()Returns the result of the cone search for the current row of this sequence.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.java.lang.Object[]getRow()booleannext()
-
-
-
Constructor Detail
-
SequentialResultRowSequence
public SequentialResultRowSequence(ConeQueryRowSequence querySeq, ConeSearcher coneSearcher, ConeErrorPolicy errAct, Coverage coverage, boolean bestOnly, boolean distFilter, java.lang.String distanceCol)
Constructor.- Parameters:
querySeq- sequence providing cone search query parametersconeSearcher- cone search implementationerrAct- defines action on cone search invocation errorcoverage- coverage for results, or nullbestOnly- whether all results or just best are requireddistFilter- true to perform post-query filtering on results based on the distance between the query position and the result row positiondistanceCol- name of column to hold distance information in output table, or null
-
-
Method Detail
-
getConeResult
public uk.ac.starlink.table.StarTable getConeResult() throws java.io.IOExceptionDescription copied from interface:ConeResultRowSequenceReturns the result of the cone search for the current row of this sequence. The work will typically be done usingConeMatcher.getConeResult(uk.ac.starlink.ttools.cone.ConeSearcher, uk.ac.starlink.ttools.cone.ConeErrorPolicy, boolean, boolean, java.lang.String, double, double, double).If no records in the cone are found, the return value may either be null or (preferably) an empty table with the correct columns.
- Specified by:
getConeResultin interfaceConeResultRowSequence- Returns:
- table giving rows strictly within the match criteria for the current row of this cone query sequence, or null
- Throws:
java.io.IOException
-
next
public boolean next() throws java.io.IOException- Specified by:
nextin interfaceuk.ac.starlink.table.RowSequence- Specified by:
nextin interfaceuk.ac.starlink.util.Sequence- Throws:
java.io.IOException
-
getCell
public java.lang.Object getCell(int icol) throws java.io.IOException- Specified by:
getCellin interfaceuk.ac.starlink.table.RowData- Specified by:
getCellin interfaceuk.ac.starlink.table.RowSequence- Throws:
java.io.IOException
-
getRow
public java.lang.Object[] getRow() throws java.io.IOException- Specified by:
getRowin interfaceuk.ac.starlink.table.RowData- Specified by:
getRowin interfaceuk.ac.starlink.table.RowSequence- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceuk.ac.starlink.table.RowSequence- 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
-
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
-
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() throws java.io.IOExceptionDescription 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
- Throws:
java.io.IOException
-
-