astro
Class Resolver

java.lang.Object
  extended by astro.Resolver

public class Resolver
extends Object

A class used to resolve targets by names, get their postions and field of view. Uses different techniques, i.e. databse look-up and SIMBAD queries. Allows matching of different query results to avoid multiple refernces to the same star.


Nested Class Summary
static class Resolver.CatalogServlet
          Tries the servlet catalog method.
static class Resolver.NameServlet
          Tries the servlet resolve method.
static class Resolver.Print
          A simple test class.
 
Field Summary
private static String BRIGHTESTSTARRESOURCE
          The resource name for serialized bright star catalog.
private static URL BRIGHTESTSTARS
          The URL for the serialized brightes star catalog.
private static URL BRIGHTSTAR
          The URL for the serialized bright star catalog.
private static String BRIGHTSTARRESOURCE
          The resource name for serialized bright star catalog.
private static URL HIPPSTAR
          The URL for the serialized Hipparchos star catalog.
private static String HIPPSTARRESOURCE
          The resource name for serialized hipparchos star catalog.
private static List<String> NAMEPRIORITY
          A priority list for star names.
private static boolean REMOTE
          The class loader used for resolving local resources cannot be accessed.
private static String REMOTESESAME
          The Sesama servlet URL.
private static String REMOTEVIZIER
          The Vizier servlet URL.
 
Constructor Summary
Resolver()
           
 
Method Summary
static List<StarDescription> databaseFromHipparchos(StarDescription center, Double radius)
          Queries a fieled-of-view around a central star using the Hipparchos plus Tycho merged database on furmint.
static List<StarDescription> databaseFromUCAC2(StarDescription center, Double radius)
          Queries a fieled-of-view around a central star using the UCAC2 plus Supplement merged database on furmint.
static List<StarDescription> emptyList(StarDescription center, Double radius)
          Returns an empty list.
private static StarDescription resolveServlet(String name, boolean common)
          In VM, where the class loader cannot be read (unsigned applets), we rely instead on a servlet running on #REMOTEURL to which we pass the name and the common parameter.
private static StarDescription resolveSesame(String name, boolean common)
          We use the normal Sesame-resolving service based on axis protocols.
static StarDescription resolveSimbad(String name)
          Queries the SIMBAD service using their AXIS protocol.
static StarDescription resolveSimbad(String name, boolean common)
          Queries the SIMBAD service using their AXIS protocol.
private static List<StarDescription> serializedFieldOfView(URL catalog, StarDescription center, double radius)
          Deserializes a StarDescription list from the given URL and returns all stars within the radius around the center given.
static List<StarDescription> serializedFromBrightestStars(StarDescription center, Double radius)
          Queries the serialized version of the brightest-star catalog.
static List<StarDescription> serializedFromBSC(StarDescription center, Double radius)
          Queries the serialized version of the bright star catalog.
static List<StarDescription> serializedFromHipparchos(StarDescription center, Double radius)
          Queries the serialized version of the bright star catalog.
private static List<StarDescription> servletRetrieve(VizierStar vizier, StarDescription center, double radius)
           
static void setClassLoader(ClassLoader c)
          Sets a class loader for locating resources.
private static List<StarDescription> vizierFieldOfView(Map<String,String> props, StarDescription center, double radius)
          Returns a VizieR catalog quries using the properties supplied to instantiate the service.
static List<StarDescription> vizierFromAscc(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the all-sky compiled catalog (Kharchenko 2001).
static List<StarDescription> vizierFromBSC(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the Bright Star Catalogue.
static List<StarDescription> vizierFromGsc(StarDescription center, Double radius)
          Queries a fieled-of-view around a central star using the GSC 1.2 catalog.
static List<StarDescription> vizierFromGsc2(StarDescription center, Double radius)
          Queries a fieled-of-view around a central star using the GSC 2.2 catalog.
static List<StarDescription> vizierFromHipparchos(StarDescription center, Double radius)
          Queries a fieled-of-view around a central star using the Hipparchos catalog.
static List<StarDescription> vizierFromPPMX(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the UCAC2-catalog.
static List<StarDescription> vizierFromPPMXL(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the UCAC2-catalog.
static List<StarDescription> vizierFromTycho2(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the Tycho2 catalog (Hog 2000).
static List<StarDescription> vizierFromTycho2Supp(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the Tycho2 catalog (Hog 2000) plus its first supplement.
static List<StarDescription> vizierFromUCAC2(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the UCAC2-catalog.
static List<StarDescription> vizierFromUCAC3(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the UCAC3catalog.
static List<StarDescription> vizierFromUCAC3Complete(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the UCAC3 catalog and adds all from the bright star supplement catalog.
static List<StarDescription> vizierFromUCACSupplement(StarDescription center, Double radius)
          Queries a field-of-view around a central star using the UCAC2 bright-star supplement.
private static List<StarDescription> vizierRetrieve(VizierStar vizier, StarDescription center, double radius)
          Normal access to vizier service if local VM can read its class loader and has unlimited access to the internet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIPPSTARRESOURCE

private static final String HIPPSTARRESOURCE
The resource name for serialized hipparchos star catalog.

See Also:
Constant Field Values

BRIGHTSTARRESOURCE

private static final String BRIGHTSTARRESOURCE
The resource name for serialized bright star catalog.

See Also:
Constant Field Values

BRIGHTESTSTARRESOURCE

private static final String BRIGHTESTSTARRESOURCE
The resource name for serialized bright star catalog.

See Also:
Constant Field Values

BRIGHTESTSTARS

private static URL BRIGHTESTSTARS
The URL for the serialized brightes star catalog.


BRIGHTSTAR

private static URL BRIGHTSTAR
The URL for the serialized bright star catalog.


HIPPSTAR

private static URL HIPPSTAR
The URL for the serialized Hipparchos star catalog.


REMOTE

private static boolean REMOTE
The class loader used for resolving local resources cannot be accessed.


REMOTESESAME

private static final String REMOTESESAME
The Sesama servlet URL.

See Also:
Constant Field Values

REMOTEVIZIER

private static final String REMOTEVIZIER
The Vizier servlet URL.

See Also:
Constant Field Values

NAMEPRIORITY

private static final List<String> NAMEPRIORITY
A priority list for star names.

Constructor Detail

Resolver

public Resolver()
Method Detail

setClassLoader

public static void setClassLoader(ClassLoader c)
Sets a class loader for locating resources.


resolveSimbad

public static StarDescription resolveSimbad(String name)
Queries the SIMBAD service using their AXIS protocol. The only thing retrievable from this query is the position of the object. Uses the name queried as the target name.


resolveSimbad

public static StarDescription resolveSimbad(String name,
                                            boolean common)
Queries the SIMBAD service using their AXIS protocol. The only thing retrievable from this query is the position of the object. If the common flag is true, the common name as retrieved by the simbad query is used as the target name, otherwise the query-name is inserted.


resolveServlet

private static StarDescription resolveServlet(String name,
                                              boolean common)
In VM, where the class loader cannot be read (unsigned applets), we rely instead on a servlet running on #REMOTEURL to which we pass the name and the common parameter. This servlet than does the Simbad query and returns the star description in an object stream.

Parameters:
name - A Simbad-resolvable name
common - If true, the name is deduced from Simbad aliases.
Returns:
A non-null, but maybe invalid star

resolveSesame

private static StarDescription resolveSesame(String name,
                                             boolean common)
We use the normal Sesame-resolving service based on axis protocols. This requires that the class loader can be read in one of the external jars.

Parameters:
name - A Simbad-resolvable name
common - If true, the name is deduced from Simbad aliases.
Returns:
A non-null, but maybe invalid star

vizierFromPPMX

public static List<StarDescription> vizierFromPPMX(StarDescription center,
                                                   Double radius)
Queries a field-of-view around a central star using the UCAC2-catalog.


vizierFromPPMXL

public static List<StarDescription> vizierFromPPMXL(StarDescription center,
                                                    Double radius)
Queries a field-of-view around a central star using the UCAC2-catalog.


vizierFromUCAC3

public static List<StarDescription> vizierFromUCAC3(StarDescription center,
                                                    Double radius)
Queries a field-of-view around a central star using the UCAC3catalog.


vizierFromUCAC3Complete

public static List<StarDescription> vizierFromUCAC3Complete(StarDescription center,
                                                            Double radius)
Queries a field-of-view around a central star using the UCAC3 catalog and adds all from the bright star supplement catalog.


vizierFromUCAC2

public static List<StarDescription> vizierFromUCAC2(StarDescription center,
                                                    Double radius)
Queries a field-of-view around a central star using the UCAC2-catalog.


vizierFromBSC

public static List<StarDescription> vizierFromBSC(StarDescription center,
                                                  Double radius)
Queries a field-of-view around a central star using the Bright Star Catalogue.


vizierFromUCACSupplement

public static List<StarDescription> vizierFromUCACSupplement(StarDescription center,
                                                             Double radius)
Queries a field-of-view around a central star using the UCAC2 bright-star supplement.


vizierFromHipparchos

public static List<StarDescription> vizierFromHipparchos(StarDescription center,
                                                         Double radius)
Queries a fieled-of-view around a central star using the Hipparchos catalog.


vizierFromGsc

public static List<StarDescription> vizierFromGsc(StarDescription center,
                                                  Double radius)
Queries a fieled-of-view around a central star using the GSC 1.2 catalog.


vizierFromGsc2

public static List<StarDescription> vizierFromGsc2(StarDescription center,
                                                   Double radius)
Queries a fieled-of-view around a central star using the GSC 2.2 catalog.


vizierFromAscc

public static List<StarDescription> vizierFromAscc(StarDescription center,
                                                   Double radius)
Queries a field-of-view around a central star using the all-sky compiled catalog (Kharchenko 2001).


vizierFromTycho2

public static List<StarDescription> vizierFromTycho2(StarDescription center,
                                                     Double radius)
Queries a field-of-view around a central star using the Tycho2 catalog (Hog 2000).


vizierFromTycho2Supp

public static List<StarDescription> vizierFromTycho2Supp(StarDescription center,
                                                         Double radius)
Queries a field-of-view around a central star using the Tycho2 catalog (Hog 2000) plus its first supplement.


databaseFromUCAC2

public static List<StarDescription> databaseFromUCAC2(StarDescription center,
                                                      Double radius)
Queries a fieled-of-view around a central star using the UCAC2 plus Supplement merged database on furmint.


databaseFromHipparchos

public static List<StarDescription> databaseFromHipparchos(StarDescription center,
                                                           Double radius)
Queries a fieled-of-view around a central star using the Hipparchos plus Tycho merged database on furmint.


serializedFromBrightestStars

public static List<StarDescription> serializedFromBrightestStars(StarDescription center,
                                                                 Double radius)
Queries the serialized version of the brightest-star catalog.


serializedFromBSC

public static List<StarDescription> serializedFromBSC(StarDescription center,
                                                      Double radius)
Queries the serialized version of the bright star catalog.


serializedFromHipparchos

public static List<StarDescription> serializedFromHipparchos(StarDescription center,
                                                             Double radius)
Queries the serialized version of the bright star catalog.


emptyList

public static List<StarDescription> emptyList(StarDescription center,
                                              Double radius)
Returns an empty list. An escape pod for method look-up.


vizierFieldOfView

private static List<StarDescription> vizierFieldOfView(Map<String,String> props,
                                                       StarDescription center,
                                                       double radius)
Returns a VizieR catalog quries using the properties supplied to instantiate the service.


vizierRetrieve

private static List<StarDescription> vizierRetrieve(VizierStar vizier,
                                                    StarDescription center,
                                                    double radius)
Normal access to vizier service if local VM can read its class loader and has unlimited access to the internet.

Parameters:
props -
center - Position of the center for the field of view reolving.
radius - Radius of the FoV in degrees.
Returns:
The list of stars from the specified catalog.

servletRetrieve

private static List<StarDescription> servletRetrieve(VizierStar vizier,
                                                     StarDescription center,
                                                     double radius)

serializedFieldOfView

private static List<StarDescription> serializedFieldOfView(URL catalog,
                                                           StarDescription center,
                                                           double radius)
Deserializes a StarDescription list from the given URL and returns all stars within the radius around the center given. This method should only be used with catalogs having not more then, say, 10000 entries, but it allows really big fields that normally fail in VizieR.