public class JdbcConeSearcher extends java.lang.Object implements ConeSearcher
Constructor and Description |
---|
JdbcConeSearcher(java.sql.Connection connection,
java.lang.String tableName,
java.lang.String raCol,
java.lang.String decCol,
AngleUnits units,
java.lang.String tileCol,
SkyTiling tiling,
java.lang.String cols,
java.lang.String where,
boolean bestOnly,
boolean prepareSql,
boolean closeConnection)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the connection if requested to.
|
int |
getDecIndex(uk.ac.starlink.table.StarTable result)
Returns the index of a column giving the declination in the
returned table.
|
int |
getRaIndex(uk.ac.starlink.table.StarTable result)
Returns the index of a column giving the right ascension in the
returned table.
|
uk.ac.starlink.table.StarTable |
performSearch(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.
|
public JdbcConeSearcher(java.sql.Connection connection, java.lang.String tableName, java.lang.String raCol, java.lang.String decCol, AngleUnits units, java.lang.String tileCol, SkyTiling tiling, java.lang.String cols, java.lang.String where, boolean bestOnly, boolean prepareSql, boolean closeConnection) throws java.sql.SQLException
connection
- live connection to databasetableName
- name of a table in the database to searchraCol
- name of table column containing right ascensiondecCol
- name of table column containing declinationunits
- angular units used by ra and dec columnstileCol
- column containing a sky tiling index value, or nulltiling
- tiling scheme used by tileCol columncols
- list of column names for the SELECT statementwhere
- additional WHERE clause constraintsbestOnly
- true iff only the closest match is required (hint)prepareSql
- whether to use PreparedStatements or notcloseConnection
- whether to close the connection when this
object is closedjava.sql.SQLException
public uk.ac.starlink.table.StarTable performSearch(double ra, double dec, double sr) throws java.io.IOException
ConeSearcher
performSearch
in interface ConeSearcher
ra
- right ascension in degrees of search region centredec
- declination in degrees of search region centresr
- search radius in degreesjava.io.IOException
public int getRaIndex(uk.ac.starlink.table.StarTable result)
ConeSearcher
getRaIndex
in interface ConeSearcher
result
- table returned by performSearch
public int getDecIndex(uk.ac.starlink.table.StarTable result)
ConeSearcher
getDecIndex
in interface ConeSearcher
result
- table returned by performSearch
public void close()
close
in interface ConeSearcher
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.