Package uk.ac.starlink.ttools.cone
Class ServiceConeSearcher
java.lang.Object
uk.ac.starlink.ttools.cone.DalConeSearcher
uk.ac.starlink.ttools.cone.ServiceConeSearcher
- All Implemented Interfaces:
ConeSearcher
ConeSearcher implementation using a VO
Cone Search service.
- Since:
- 17 Apr 2009
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionServiceConeSearcher(uk.ac.starlink.vo.ConeSearch csearch, int verb, boolean believeEmpty, uk.ac.starlink.table.StarTableFactory tfact) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Called when this searcher is no longer required.intgetDecIndex(uk.ac.starlink.table.StarTable result) Returns the index of a column giving the declination in the returned table.intgetRaIndex(uk.ac.starlink.table.StarTable result) Returns the index of a column giving the right ascension in the returned table.uk.ac.starlink.table.StarTableperformSearch(double ra, double dec, double sr) Returns a table consisting of all the objects within a given search radius of a specified point on the sky.Methods inherited from class uk.ac.starlink.ttools.cone.DalConeSearcher
getConsistentTable, getInconsistentEmptyAdvice, getUcd1DecIndex, getUcd1RaIndex
-
Constructor Details
-
ServiceConeSearcher
public ServiceConeSearcher(uk.ac.starlink.vo.ConeSearch csearch, int verb, boolean believeEmpty, uk.ac.starlink.table.StarTableFactory tfact) Constructor.- Parameters:
csearch- cone search service specification objectverb- verbosity parameterbelieveEmpty- whether empty tables are considered to contain correct metadatatfact- table factory
-
-
Method Details
-
performSearch
public uk.ac.starlink.table.StarTable performSearch(double ra, double dec, double sr) throws IOException Description copied from interface:ConeSearcherReturns a table consisting of all the objects within a given search radius of a specified point on the sky. If no matching objects are found, then it is preferable to return an empty table with the correct columns. However, if this cannot be done, it is permissible to return null. For every table returned, the columns should be the same.- Specified by:
performSearchin interfaceConeSearcher- Parameters:
ra- right ascension in degrees of search region centredec- declination in degrees of search region centresr- search radius in degrees- Returns:
- table containing records in the given cone, or possibly null if no records are found
- Throws:
IOException
-
getRaIndex
public int getRaIndex(uk.ac.starlink.table.StarTable result) Description copied from interface:ConeSearcherReturns the index of a column giving the right ascension in the returned table. This should be the same quantity which is used for the match assessment.- Specified by:
getRaIndexin interfaceConeSearcher- Parameters:
result- table returned byperformSearch- Returns:
- index of RA column, or -1 if it can't be found
-
getDecIndex
public int getDecIndex(uk.ac.starlink.table.StarTable result) Description copied from interface:ConeSearcherReturns the index of a column giving the declination in the returned table. This should be the same quantity which is used for the match assessment.- Specified by:
getDecIndexin interfaceConeSearcher- Parameters:
result- table returned byperformSearch- Returns:
- index of dec column, or -1 if it can't be found
-
close
public void close()Description copied from interface:ConeSearcherCalled when this searcher is no longer required.- Specified by:
closein interfaceConeSearcher
-