net.grelf.astro
Class SimbadGateway
java.lang.Object
net.grelf.astro.StarChartLoader
net.grelf.astro.SimbadGateway
public class SimbadGateway
- extends StarChartLoader
Access Simbad service at CDS directly over HTTP (not via AstroGrid) to get data for star(s).
|
Method Summary |
static SimbadGateway |
getInstance()
Get a reference to the gateway object (singleton). |
Star |
getStarFromId(java.lang.String id,
java.lang.String rootURL,
javax.swing.JTextArea textarea)
Use a Simbad identity query as a REST web service: HTTP request responds with XML VOTable. |
java.util.List<Star> |
searchCone(SkyPoint centre,
double radiusDegs,
java.lang.String rootURL,
javax.swing.JTextArea textarea)
Use a Simbad coordinate query as a REST web service: HTTP request responds with XML VOTable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static SimbadGateway getInstance()
- Get a reference to the gateway object (singleton).
getStarFromId
public Star getStarFromId(java.lang.String id,
java.lang.String rootURL,
javax.swing.JTextArea textarea)
- Use a Simbad identity query as a REST web service: HTTP request responds with XML VOTable.
If rootURL is not null and not empty, the encoded id will simply be appended to it: do that if
the call has to be via some server code,
eg for an applet: rootURL = "http://mydomain/simbadi.jsp?id=" and then the JSP must be written to make
the real request to "http://simbad.u-strasbg.fr/simbad/sim-id?Ident=" + id + "&output.format=VOTable".
If textarea is not null it will display the VOTable response.
searchCone
public java.util.List<Star> searchCone(SkyPoint centre,
double radiusDegs,
java.lang.String rootURL,
javax.swing.JTextArea textarea)
- Use a Simbad coordinate query as a REST web service: HTTP request responds with XML VOTable.
If rootURL is not null and not empty, search parameters will simply be appended to it: do that if
the call has to be via some server code,
eg for an applet: rootURL = "http://mydomain/simbadc.jsp" and then the JSP must be written to make
the real request (passing on the parameters shown here) to
"http://simbad.u-strasbg.fr/simbad/sim-coo?output.format=VOTable" +
"&Coord=" + centre.getRA ().toDegrees () + centre.getDec ().toDegrees () +
"&CooEpoch=" + centre.getEpoch ().getYear () +
"&Radius=" + radiusDegs + "&Radius.unit=deg&list.idcat=Tycho,HIP2,GSC"
If textarea is not null it will display the VOTable response.