Package uk.ac.starlink.ttools.cone
Class SequentialResultRowSequence
java.lang.Object
uk.ac.starlink.ttools.cone.SequentialResultRowSequence
- All Implemented Interfaces:
Closeable
,AutoCloseable
,uk.ac.starlink.table.RowData
,uk.ac.starlink.table.RowSequence
,ConeQueryRowSequence
,ConeResultRowSequence
,uk.ac.starlink.util.Sequence
Straightforward implementation of ConeResultRowSequence based on a
ConeQueryRowSequence.
- Since:
- 16 Jan 2008
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionSequentialResultRowSequence
(ConeQueryRowSequence querySeq, ConeSearcher coneSearcher, ConeErrorPolicy errAct, Coverage coverage, boolean bestOnly, boolean distFilter, String distanceCol) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getCell
(int icol) uk.ac.starlink.table.StarTable
Returns the result of the cone search for the current row of this sequence.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.Object[]
getRow()
boolean
next()
-
Constructor Details
-
SequentialResultRowSequence
public SequentialResultRowSequence(ConeQueryRowSequence querySeq, ConeSearcher coneSearcher, ConeErrorPolicy errAct, Coverage coverage, boolean bestOnly, boolean distFilter, 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 Details
-
getConeResult
Description copied from interface:ConeResultRowSequence
Returns 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:
getConeResult
in interfaceConeResultRowSequence
- Returns:
- table giving rows strictly within the match criteria for the current row of this cone query sequence, or null
- Throws:
IOException
-
next
- Specified by:
next
in interfaceuk.ac.starlink.table.RowSequence
- Specified by:
next
in interfaceuk.ac.starlink.util.Sequence
- Throws:
IOException
-
getCell
- Specified by:
getCell
in interfaceuk.ac.starlink.table.RowData
- Specified by:
getCell
in interfaceuk.ac.starlink.table.RowSequence
- Throws:
IOException
-
getRow
- Specified by:
getRow
in interfaceuk.ac.starlink.table.RowData
- Specified by:
getRow
in interfaceuk.ac.starlink.table.RowSequence
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceuk.ac.starlink.table.RowSequence
- 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
-
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
-
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
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
- Throws:
IOException
-