Package skyview.vo

Class ConeQuerier

java.lang.Object
skyview.vo.ConeQuerier
All Implemented Interfaces:
java.lang.Runnable

public class ConeQuerier
extends java.lang.Object
implements java.lang.Runnable
This class queries a cone search service and returns the positions and IDs.
  • Constructor Summary

    Constructors 
    Constructor Description
    ConeQuerier​(java.lang.String URL, java.lang.String id)
    Build a cone querier using the full URL.
    ConeQuerier​(java.lang.String baseURL, java.lang.String id, double ra, double dec, double size)
    Build a cone querier using the base URL and cone search parameters.
  • Method Summary

    Modifier and Type Method Description
    void addCriterion​(java.lang.String name, java.lang.String op, java.lang.String value)  
    static java.lang.String checkURLEnd​(java.lang.String url)
    Make sure that URLs can be appended to
    static ConeQuerier factory​(java.lang.String id, double ra, double dec, double size)
    Create a ConeQuerier Object.
    int getCount()
    Get the number of rows returned
    java.lang.String[] getExtraNames()
    Get the names of extra columns
    java.util.ArrayList<java.lang.String[]> getExtras()
    Get the list of extra columns
    java.lang.String[] getIDs()
    Get the specified IDs
    double[][] getPositions()
    Get the array of position
    double getSize()
    Get the size of the request
    java.lang.String getURL()
    Get the URL used.
    static void main​(java.lang.String[] args)  
    void run()
    Run the query
    void setEntriesUsed​(int n)  
    void setOutput​(java.io.PrintStream str)  
    void updateHeader​(nom.tam.fits.Header hdr)  

    Methods inherited from class java.lang.Object

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

    • ConeQuerier

      public ConeQuerier​(java.lang.String baseURL, java.lang.String id, double ra, double dec, double size)
      Build a cone querier using the base URL and cone search parameters.
    • ConeQuerier

      public ConeQuerier​(java.lang.String URL, java.lang.String id)
      Build a cone querier using the full URL.
  • Method Details

    • checkURLEnd

      public static java.lang.String checkURLEnd​(java.lang.String url)
      Make sure that URLs can be appended to
    • setEntriesUsed

      public void setEntriesUsed​(int n)
    • setOutput

      public void setOutput​(java.io.PrintStream str)
    • addCriterion

      public void addCriterion​(java.lang.String name, java.lang.String op, java.lang.String value)
    • getSize

      public double getSize()
      Get the size of the request
    • run

      public void run()
      Run the query
      Specified by:
      run in interface java.lang.Runnable
    • getPositions

      public double[][] getPositions()
      Get the array of position
      Returns:
      a double[n][2] array.
    • getIDs

      public java.lang.String[] getIDs()
      Get the specified IDs
    • getCount

      public int getCount()
      Get the number of rows returned
    • getURL

      public java.lang.String getURL()
      Get the URL used.
    • getExtras

      public java.util.ArrayList<java.lang.String[]> getExtras()
      Get the list of extra columns
    • getExtraNames

      public java.lang.String[] getExtraNames()
      Get the names of extra columns
    • factory

      public static ConeQuerier factory​(java.lang.String id, double ra, double dec, double size)
      Create a ConeQuerier Object.
      Parameters:
      id -
      • NED: query the NED cone search services
      • SIMBAD: query SIMBAD
      • contains '/': assume this is a Vizier table.
      • otherwise: assume this is a HEASARC table.
    • main

      public static void main​(java.lang.String[] args) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • updateHeader

      public void updateHeader​(nom.tam.fits.Header hdr)