net.grelf.astro
Class AstroGridGateway

java.lang.Object
  extended by net.grelf.astro.StarChartLoader
      extended by net.grelf.astro.AstroGridGateway

public class AstroGridGateway
extends StarChartLoader

This singleton class contains methods for accessing the online AstroGrid (see www.astrogrid.org). It is necessary to have their Virtual Observatory (VO) Desktop running and the RMI version of its JAR files on the classpath. AstroGrid services are accessed by RMI from the methods in this class.


Field Summary
 
Fields inherited from class net.grelf.astro.StarChartLoader
cos90ap, cosdp, epoch, equinox, sin90ap, sindp, sinFieldRadius
 
Method Summary
 boolean assignConeServiceURI(java.lang.String uri)
          Returns false if the URI is not one for which this class can process the results.
 java.lang.String[] getAcceptableConeServiceURIs()
          Get an array of URIs for which this class is able to process the response to extract Star objects.
 java.lang.String getConeServiceURI()
          Find out which VO service is being used for searchCone ().
static AstroGridGateway getInstance()
          Get a reference to the gateway object (singleton).
 SkyPoint getPositionOfNamedObject(java.lang.String name)
          Uses the Sesame service (see http://cdsweb.u-strasbg.fr/doc/sesame.htx) via AstroGrid.
 boolean isAvailable()
          Returns true if manages to connect to a running instance of AstroGrid RunTime.
 java.util.List<Star> searchCone(SkyPoint centre, double radiusDegrees)
          Search a cone in the sky of given angular radius about the given direction.
 
Methods inherited from class net.grelf.astro.StarChartLoader
calculateChartCoordinates, getEpoch, getEquinox, initialiseChartCoordinates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AstroGridGateway getInstance()
Get a reference to the gateway object (singleton).


isAvailable

public boolean isAvailable()
Returns true if manages to connect to a running instance of AstroGrid RunTime. Will try to run that if it is not already running.


getPositionOfNamedObject

public SkyPoint getPositionOfNamedObject(java.lang.String name)
Uses the Sesame service (see http://cdsweb.u-strasbg.fr/doc/sesame.htx) via AstroGrid. Names that are recognised are described at http://cdsweb.u-strasbg.fr/cgi-bin/Dic-Simbad.


getAcceptableConeServiceURIs

public java.lang.String[] getAcceptableConeServiceURIs()
Get an array of URIs for which this class is able to process the response to extract Star objects.


getConeServiceURI

public java.lang.String getConeServiceURI()
Find out which VO service is being used for searchCone ().


assignConeServiceURI

public boolean assignConeServiceURI(java.lang.String uri)
Returns false if the URI is not one for which this class can process the results. Therefore first use getAcceptableConeServiceURIs () to find possible values.


searchCone

public java.util.List<Star> searchCone(SkyPoint centre,
                                       double radiusDegrees)
Search a cone in the sky of given angular radius about the given direction. Returns null if the AstroGrid service is not available or failed in any way (including by returning something other than a VOTable). If an empty list is returned it means the search was successful but no objects were found in the cone. The IVOA standard for cone searches can be found at http://www.ivoa.net/Documents/latest/ConeSearch.html. The IVOA standard for VOTables (XML) is at http://www.ivoa.net/Documents/VOTable/.