public class JdbcConeSearcher extends Object implements ConeSearcher
Constructor and Description |
---|
JdbcConeSearcher(Connection connection,
String tableName,
String raCol,
String decCol,
AngleUnits units,
String tileCol,
SkyTiling tiling,
String cols,
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(StarTable result)
Returns the index of a column giving the declination in the
returned table.
|
int |
getRaIndex(StarTable result)
Returns the index of a column giving the right ascension in the
returned 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(Connection connection, String tableName, String raCol, String decCol, AngleUnits units, String tileCol, SkyTiling tiling, String cols, String where, boolean bestOnly, boolean prepareSql, boolean closeConnection) throws 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 closedSQLException
public StarTable performSearch(double ra, double dec, double sr) throws 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 degreesIOException
public int getRaIndex(StarTable result)
ConeSearcher
getRaIndex
in interface ConeSearcher
result
- table returned by performSearch
public int getDecIndex(StarTable result)
ConeSearcher
getDecIndex
in interface ConeSearcher
result
- table returned by performSearch
public void close()
close
in interface ConeSearcher
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.