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 closedSQLExceptionpublic StarTable performSearch(double ra, double dec, double sr) throws IOException
ConeSearcherperformSearch in interface ConeSearcherra - right ascension in degrees of search region centredec - declination in degrees of search region centresr - search radius in degreesIOExceptionpublic int getRaIndex(StarTable result)
ConeSearchergetRaIndex in interface ConeSearcherresult - table returned by performSearchpublic int getDecIndex(StarTable result)
ConeSearchergetDecIndex in interface ConeSearcherresult - table returned by performSearchpublic void close()
close in interface ConeSearcherCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.