VO-Technologies are based on open standards that are programming language and platform independent. As part of the NVO Summer School a set of libraries in Java for accessing registries, VOTable, SIA services,
SkyNodes, as well as other VO-enabled web services has been released. Similar libraries and packages in other programming languages were also presented at the NVO Summer School. There is no library currently available in PHP. In view of this a library of PHP scripts shall be created to provide a useful framework for small and medium size projects. This complements the existing pool of libraries and provides a simple toolkit for client side support.
The first design goal of this implementation is to provide a very simple package with no other requirement than the use of the Apache web server with the PHP module. A simple XML parser shall be developed on which a VOTable class and a VOResource class can build on. Based on these classes, 3 web pages shall be created to demonstrate the usage of VO web services with PHP.
A keyword query web page shall be created using the keyword search web service described in
http://nvo.stsci.edu/VORegistry/registry.asmx, and using HTTP GET only.
This page submits a keyword query to the web service, parses and formats its output, which comes in VOResource format, and presents the results in a tabular form.
The results of the keyword search is a list of resources providing different types of web services from which only cone search service and simple image access service will be considered here. For all resources, the title, the description and a link to the reference URL are listed. A link to the cone search page or to the SIAP page shall be added if a resource provides the corresponding service.
The cone search page requires the access URL of the web services which is included in the query result of the keyword search. In addition, the parameters RA, DEC and SR must be provided. As a bonus, the sesame name resolution web service shall offer quick coordinates lookups. These parameters shall be displayed in a web form for the user to fill out or change. Results from a cone search are in VOTable format which can be displayed as HTML tables, or raw XML, or in a Java applet for more advanced display capabilities. Alternatively, the raw XML file can be stored and handled with voplot, topcat or Mirage.
The SIAP page is similar to the cone search page. The query output, which is also a VOTable, contains a list of links to images that satisfy the query. These images can be in FITS, or in another graphics format such as gif or jpeg. While web browsers can handle gif and jpeg images, FITS files need an external program for display. Alternatively, a Java applet can be included in the web page to display FITS images.
The files XNode.php and XParser.php implement the simple XML parser. No validation is performed and only basic error handling is included. The files VoTable.php and VoResource.php implement the classes that handle VOTable and VOResource formats respectively. Sesame.php implements the name resolution class via the web service provided by
http://cdsweb.u-strasbg.fr/doc/sesame.htx. These are very simple classes that read a XML file and extract specific contents.
The files kwdSearch.php, coneSearch.php, and siap.php implement the web pages mentioned above. They handle the user requests and reformat the output. DispFits.php, DispGif.php, applet.php, and proxyGet.php are helper files to display Java applets which are included in the file imgViewer.jar. The file header.php and kecklogo.jpg contain the banner and logo. The file utils.php contains miscellaneous useful routines. The package contains 17 files.
The jar file imgViewer.jar contains 2 Java applets. One is a simple VOTable viewer that can be used as standalone application also. This viewer does not require any external library and does not use swing. To start the viewer as an application:
java -cp imgViewer.jar voBrowser fileName
where fileName is the VOTable in XML format.
The second applet is a FITS viewer. To start:
java -cp imgViewer.jar sk.fits.FitsView fitsFile
where fitsFile is the name of the FITS file.
Source code for the Java applets are not included in this package. Please contact the author if you are interested in using the libraries.
Many applications can be built using the VoTable class and the VoResource class. The three web pages mentioned above are just a few of the many variations possible. One variation might be the number of services included in a cone search or siap search. Other applications can be implemented easily by adapting existing PHP files. On another level, the PHP scripts can run standalone, be extended, or included in other scripts to perform automated retrieval images and catalog information.
- A class to interface with SkyNode services.
- SOAP handling.
- Server side toolkit.
| Attachment: |
Size: | Date: | Comment: |
| vo.tar.gz |
307589 | 02 Oct 2004 - 01:02 | PHP VO Client Toolkit |