Developer’s corner

[[ucd]]

The UCD XML Web Service. How to consume it in Java ? in Perl ?

This XML Web Service provides a few methods to ease manipulation of the Unified Content Descriptors (UCD).

XML Web Service URL at CDS : http://cdsws.u-strasbg.fr/axis/services/UCD

                  a second server is available at CDS : http://cdsws2.u-strasbg.fr

Available methods:

The following method makes the translation of old-style UCD1 into the newer UCD1+ easier:

.translate(String ucd)

Parameter(s) : ucd The argument is a UCD1 (not UCD1+ !).

Result : String ucd. This function returns the default UCD1+ corresponding to an old-style UCD1.

Get the SOAP result ucd=PHOT_JHN_V

Available methods for UCD1+: Note that the following methods are related to UCD1+: the parameters and result are UCD1+, and they won't work with old-style UCD1. The .translate method can be used to convert old-style UCD into UCD1+.

.assign(String descr)

Parameter(s) : descr Plain text description of a parameter to be described

                                             (e.g. V magnitude)

Result : String ucd. This function returns the UCD1+ corresponding to the description

Get the SOAP result descr=V magnitude

.explain(String ucd)

Parameter(s) : ucd (e.g. ivoa:phot.mag;em.opt.B)

Result : String, this function gives a human-readable explanation for a UCD composed of one or several words

Get the SOAP result ucd=ivoa:phot.mag;em.opt.B

.validate(String ucd)

Parameter(s) : ucd (e.g. ivoa:phot.mag;em.opt.B)

Result : String, this function checks that a UCD is well-formed The first word of the string is an error code, possibly followed by an explanation of the error. A return value of 0 indicates no error (valid UCD).

The error-code results from the combination (logical OR) of the following values:

  • 1: warning indicating use of non-standard namespace (not ivoa:)
  • 2: use of deprecated word
  • 4: use of non-existing word
  • 8: syntax error (extra space or unallowed character)

Get the SOAP result ucd=ivoa:phot.mag;em.opt.B

.upgrade(String ucd)

Parameter(s) : ucd a deprecated UCD1+ (word or combination).

                  Useful when the 'validate' method returns with code 2.

Result : String ucd. This function returns a valid UCD1+ corresponding to a deprecated word.

                    It is useful when some reference words of the UCD1+ vocabulary are changed,
                    and ensures backward compatibility.

Get the SOAP result ucd=pos.gal.lat

. getAvailability() Parameter(s) : none

Result : returns an XML file conform to the “availability 0.2” schema (IVOA Support Interfaces and Basic Profile)

Available methods for UCD1: Note that the following methods are related to UCD1, and won't work with newer UCD1+. The .translate method can be used to convert old-style UCD into UCD1+.

. resolveUCD(String ucd) Parameter(s) : ucd the UCD1 to resolve (example : PHOT_JHN_V)

Result : sentence corresponding to the UCD1 (example : Johnson magnitude V (JHN))

Get the SOAP result for ucd=PHOT_JHN_V

. UCDList()

Parameter(s) : none

Result : list of UCD1 in HTML

Get the SOAP result UCDList()

. UCDofCatalog(String catalog_designation)

Parameter(s) : catalog_designation designes the catalog (example : I/239)

Result : list of UCD1 (in raw text) contained in a given catalog

Get the SOAP result catalog_designation=I/239

ucd.txt · Last modified: 2011/11/28 10:01 by administrator

Thanks for acknowledging the CDS developer’s resources (libraries, source code, etc.)

© UDS/CNRS

Contact