Class DalConeSearcher

java.lang.Object
uk.ac.starlink.ttools.cone.DalConeSearcher
Direct Known Subclasses:
ServiceConeSearcher, SiaConeSearcher, SsaConeSearcher

public class DalConeSearcher extends Object
Utility class to aid with implementation of ConeSearcher classes based on contact with remote Data Access Layer-type services. A new instance of this class should be used for each set of related calls to a given service.
Since:
23 Sep 2009
Author:
Mark Taylor
  • Constructor Summary

    Constructors
    Constructor
    Description
    DalConeSearcher(String stdName, String stdVers, boolean believeEmpty)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected uk.ac.starlink.table.StarTable
    getConsistentTable(uk.ac.starlink.table.StarTable table)
    Takes a table which is the result of a query to the service handled by this searcher, and returns a table which has compatible column structure to any tables returned by previous calls to this method.
    protected String
    Returns implementation-specific advice to the user about how to swich off trusting the metadata of zero-row tables.
    int
    getUcd1DecIndex(uk.ac.starlink.table.StarTable table)
    Returns the column index for a column in a given table identified with the UCD POS_EQ_DEC_MAIN.
    int
    getUcd1RaIndex(uk.ac.starlink.table.StarTable table)
    Returns the column index for a column in a given table identified with the UCD POS_EQ_RA_MAIN.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DalConeSearcher

      public DalConeSearcher(String stdName, String stdVers, boolean believeEmpty)
      Constructor.
      Parameters:
      stdName - name of the DAL standard (used in user messages)
      stdVers - version of the DAL standard (used in user messages)
      believeEmpty - whether empty tables are considered to contain correct metadata
  • Method Details

    • getConsistentTable

      protected uk.ac.starlink.table.StarTable getConsistentTable(uk.ac.starlink.table.StarTable table) throws IOException
      Takes a table which is the result of a query to the service handled by this searcher, and returns a table which has compatible column structure to any tables returned by previous calls to this method. If the given table looks inconsistent (different number or type of columns), an exception may be thrown or null returned instead.
      Parameters:
      table - candidate table
      Returns:
      same table if it's consistent, or possibly null
      Throws:
      IOException
    • getUcd1RaIndex

      public int getUcd1RaIndex(uk.ac.starlink.table.StarTable table)
      Returns the column index for a column in a given table identified with the UCD POS_EQ_RA_MAIN. If it can't be done, some attempt is made to warn and guess an alternative.
      Parameters:
      table - table
      Returns:
      index of RA column, or -1 if it can't be found
    • getUcd1DecIndex

      public int getUcd1DecIndex(uk.ac.starlink.table.StarTable table)
      Returns the column index for a column in a given table identified with the UCD POS_EQ_DEC_MAIN. If it can't be done, some attempt is made to warn and guess an alternative.
      Parameters:
      table - table
      Returns:
      index of Dec column, or -1 if it can't be found
    • getInconsistentEmptyAdvice

      protected String getInconsistentEmptyAdvice()
      Returns implementation-specific advice to the user about how to swich off trusting the metadata of zero-row tables. This is issued to the user in the event that zero-row tables are trusted (believeEmpty==true), but subsequent results make it look like they shouldn't be.
      Returns:
      warning message