uk.ac.starlink.vo
Class ConeSearch

java.lang.Object
  extended by uk.ac.starlink.vo.ConeSearch

public class ConeSearch
extends Object

Encapsulates the mechanics of a standard cone search web service. The cone search service definition is taken to be supplied by the document at http://us-vo.org/pubs/files/conesearch.html.

Since:
16 Dec 2004
Author:
Mark Taylor (Starlink)

Constructor Summary
ConeSearch(RegResource resource, RegCapabilityInterface capability)
          Constructs a new ConeSearch from a CONE-type resource.
ConeSearch(String serviceUrl)
          Constructs a new ConeSearch from its service URL.
 
Method Summary
 URL getSearchURL(double ra, double dec, double sr, int verb)
          Returns a cone search CGI URL for this service.
 URL getServiceURL()
          Returns the service URL for this service.
 StarTable performSearch(double ra, double dec, double sr, int verb, StarTableFactory tfact)
          Synchronously executes a cone search request.
 void performSearch(double ra, double dec, double sr, int verb, TableSink sink)
          Asynchronously executes a cone search request, feeding the resulting table to a TableSink.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConeSearch

public ConeSearch(String serviceUrl)
Constructs a new ConeSearch from its service URL.

Parameters:
serviceUrl - base URL for cone search
Throws:
IllegalArgumentException - if the service URL is unsuitable

ConeSearch

public ConeSearch(RegResource resource,
                  RegCapabilityInterface capability)
Constructs a new ConeSearch from a CONE-type resource.

Parameters:
resource - resource from registry
capability - cone search capability interface
Throws:
IllegalArgumentException - if the service URL is unsuitable
Method Detail

performSearch

public void performSearch(double ra,
                          double dec,
                          double sr,
                          int verb,
                          TableSink sink)
                   throws IOException
Asynchronously executes a cone search request, feeding the resulting table to a TableSink. Note this will not correctly identify error conditions.

Parameters:
ra - J2000 right ascension in decimal degrees
dec - J2000 declination in decimal degrees
sr - search radius in decimal degrees
verb - verbosity level - 1, 2 or 3 for increasing verbosity, other values give default
sink - table destination
Throws:
IOException

performSearch

public StarTable performSearch(double ra,
                               double dec,
                               double sr,
                               int verb,
                               StarTableFactory tfact)
                        throws IOException
Synchronously executes a cone search request.

Parameters:
ra - J2000 right ascension in decimal degrees
dec - J2000 declination in decimal degrees
sr - search radius in decimal degrees
verb - verbosity level - 1, 2 or 3 for increasing verbosity, other values give default
Returns:
table
Throws:
IOException

getSearchURL

public URL getSearchURL(double ra,
                        double dec,
                        double sr,
                        int verb)
Returns a cone search CGI URL for this service.

Parameters:
ra - J2000 right ascension in decimal degrees
dec - J2000 declination in decimal degrees
sr - search radius in decimal degrees
verb - verbosity level - 1, 2 or 3 for increasing verbosity, other values give default
Returns:
CGI url which will return the VOTable result of this query

getServiceURL

public URL getServiceURL()
Returns the service URL for this service.

Returns:
base URL for cone search queries

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.