Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.lang.Object getCell​(int icol)  
      uk.ac.starlink.table.StarTable getConeResult()
      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 getRadius()
      Get search radius for the current row's cone search request in degrees.
      java.lang.Object[] getRow()  
      boolean next()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 parameters
        coneSearcher - cone search implementation
        errAct - defines action on cone search invocation error
        coverage - coverage for results, or null
        bestOnly - whether all results or just best are required
        distFilter - true to perform post-query filtering on results based on the distance between the query position and the result row position
        distanceCol - name of column to hold distance information in output table, or null
    • Method Detail

      • next

        public boolean next()
                     throws java.io.IOException
        Specified by:
        next in interface uk.ac.starlink.table.RowSequence
        Specified by:
        next in interface uk.ac.starlink.util.Sequence
        Throws:
        java.io.IOException
      • getCell

        public java.lang.Object getCell​(int icol)
                                 throws java.io.IOException
        Specified by:
        getCell in interface uk.ac.starlink.table.RowData
        Specified by:
        getCell in interface uk.ac.starlink.table.RowSequence
        Throws:
        java.io.IOException
      • getRow

        public java.lang.Object[] getRow()
                                  throws java.io.IOException
        Specified by:
        getRow in interface uk.ac.starlink.table.RowData
        Specified by:
        getRow in interface uk.ac.starlink.table.RowSequence
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface uk.ac.starlink.table.RowSequence
        Throws:
        java.io.IOException
      • getDec

        public double getDec()
                      throws java.io.IOException
        Description copied from interface: ConeQueryRowSequence
        Get central declination for the current row's cone search request in degrees.
        Specified by:
        getDec in interface ConeQueryRowSequence
        Returns:
        declination
        Throws:
        java.io.IOException
      • getRa

        public double getRa()
                     throws java.io.IOException
        Description copied from interface: ConeQueryRowSequence
        Get central right ascension for the current row's cone search request in degrees.
        Specified by:
        getRa in interface ConeQueryRowSequence
        Returns:
        right ascension
        Throws:
        java.io.IOException
      • getRadius

        public double getRadius()
                         throws java.io.IOException
        Description copied from interface: ConeQueryRowSequence
        Get search radius for the current row's cone search request in degrees.
        Specified by:
        getRadius in interface ConeQueryRowSequence
        Returns:
        search radius
        Throws:
        java.io.IOException
      • getIndex

        public long getIndex()
                      throws java.io.IOException
        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 to next.
        Specified by:
        getIndex in interface ConeQueryRowSequence
        Returns:
        row index
        Throws:
        java.io.IOException