|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.cds.CDSParser
net.cds.NameResolver
public class NameResolver
This class uses the name-resolving capabilities of the VizeR/Simbad/NED databases via a network-access to the AXIS services provides by CDS. For this class to run, one needs the AXIS-jar extensions, at least the axis.jar, jaxrpc.jar, saaj.jar, commons-logging.jar, commons-discovery.jar, wsdl4j.jar. Additionally, an access package must be created, in this case by issuing the command: java org.apache.axis.wsdl.WSDL2Java http://cdsws.u-strasbg.fr/axis/services/Sesame?wsdl. Additional info is available at CDS.
A typicla output looks like this:
PW And
from cache
RSCVn
00:18:20.89 +30:57:22.0
4.5870708
+30.9561194
1988A&AS...74..449R
137 133
V* PW And
V* PW And
HD 1405
AG+30 25
BD+30 34
EUVE J0018+30.9
[FS2003] 0007
GC 365
LTT 10110
PPM 65186
RBS 39
2RE J001820+305712
2RE J0018+305
RX J0018.3+3057
1RXS J001821.2+305723
SAO 53799
TYC 2261- 1518-1
uvby98 100001405
YZ 30 120
30
The appropriate tags can be queried in accordingly named methods.
This software uses source code created at the Centre de Donn�es astronomiques de Strasbourg, France.
| Nested Class Summary | |
|---|---|
static class |
NameResolver.Client
Titre : Sesame Description : Resolves names in Simbad, VizieR and/or NED Copyright : Copyright (c) 2002-2003 Soci\x{00E9}t\x{00E9} : Centre de Donn\x{00E9}es Astronomique de Strasbourg |
static class |
NameResolver.Query
A test class for resolving names through the simbad service. |
| Field Summary | |
|---|---|
private static Sesame_pkg.SesameService |
locate
The AXIS-enhanced sesame service object. |
private static NameResolver |
resolve
The reference to the only living name-resolver object. |
private static String |
SESAMEFORMAT
The query format for sesame. |
private static Sesame_pkg.Sesame |
sesamequery
The access object created from the sesam service provider. |
| Constructor Summary | |
|---|---|
private |
NameResolver()
Constructs a new name resolver. |
| Method Summary | |
|---|---|
private boolean |
checkString(String target)
Convenience method that transforms the single query string into a one-element list of strings and passes this list to the parent method. |
static List<String> |
getAliases(String ask)
Returns a string-list of other names of the target. |
static String |
getCommonName(String ask)
Returns the main name of the object. |
static double |
getDeclination(String ask)
Returns the declination of the object in degrees. |
static double |
getDeclinationError(String ask)
Returns the error in declination in milli arcseconds. |
static String |
getError(String ask)
Returns the error message or null if no error was encountered. |
static String |
getInfo(String ask)
Returns the info message or null if no info was encountered. |
static String |
getObjectType(String ask)
Returns the object type. |
static String |
getPositionReference(String ask)
Returns the reference to the position of the object. |
static int |
getReferenceCount(String ask)
Returns the number of references to this object. |
static String |
getResolver(String ask)
Get the resolver name. |
static double |
getRightAscension(String ask)
Returns the right ascension of the object in degrees. |
static double |
getRightAscensionError(String ask)
Returns the error of the right ascension in milli arcseconds. |
static String |
getSexagesimalPosition(String ask)
Returns right ascension and declination of the target as a single string in the so-called sexagesimal notation. |
static boolean |
inService()
Returns true, if the sesame service could be located. |
protected boolean |
isRetrievable()
Returns true if the web-service is available. |
protected String |
query(List arg)
This method is called if the cache needs to be updated. |
private static double |
tryDouble(String parse)
Tries to convert a string into a double. |
| Methods inherited from class net.cds.CDSParser |
|---|
checkCache, getParsed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static Sesame_pkg.SesameService locate
private static Sesame_pkg.Sesame sesamequery
private static final String SESAMEFORMAT
private static NameResolver resolve
| Constructor Detail |
|---|
private NameResolver()
| Method Detail |
|---|
public static boolean inService()
public static String getResolver(String ask)
ask - The object description to be queried.
public static String getError(String ask)
ask - The object description to be queried.
public static String getInfo(String ask)
ask - The object description to be queried.
public static String getObjectType(String ask)
ask - The object description to be queried.
public static String getSexagesimalPosition(String ask)
ask - The object description to be queried.
public static double getRightAscension(String ask)
ask - The object description to be queried.
public static double getDeclination(String ask)
ask - The object description to be queried.
public static double getRightAscensionError(String ask)
ask - The object description to be queried.
public static double getDeclinationError(String ask)
ask - The object description to be queried.
public static String getPositionReference(String ask)
ask - The object description to be queried.
private static double tryDouble(String parse)
public static String getCommonName(String ask)
ask - The object description to be queried.
public static List<String> getAliases(String ask)
ask - The object description to be queried.
public static int getReferenceCount(String ask)
ask - The object description to be queried.
protected boolean isRetrievable()
sesamequery is alive.
isRetrievable in class CDSParserprotected String query(List arg)
query in class CDSParserprivate boolean checkString(String target)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||