ConeSearcherpublic class JdbcConeSearcher extends java.lang.Object implements ConeSearcher
| Constructor | 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 | 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.SQLExceptionpublic uk.ac.starlink.table.StarTable performSearch(double ra,
double dec,
double sr)
throws java.io.IOException
ConeSearcherperformSearch in interface ConeSearcherra - right ascension in degrees of search region centredec - declination in degrees of search region centresr - search radius in degreesjava.io.IOExceptionpublic int getRaIndex(uk.ac.starlink.table.StarTable result)
ConeSearchergetRaIndex in interface ConeSearcherresult - table returned by performSearchpublic int getDecIndex(uk.ac.starlink.table.StarTable result)
ConeSearchergetDecIndex in interface ConeSearcherresult - table returned by performSearchpublic void close()
close in interface ConeSearcherCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.