The HEASARC Open ArchiveThe HEASARC archive and catalog resources are openly available for use by other archive sites. This document describes several ways that other archive sites can use our resources. Options include:
Tar filesDownload this file, untar and follow directions in the README file. CPAN site
The Browse system assumes the user has a relational database available. Communication with the database is exclusively through the Perl DBI interface. DBI modules are available to support all major database system including the free (for non-commercial use) MySQL and mSQL databases.
Users are free to modify the Browse code, however the HEASARC can provide only very limited support to users who wish to make more than cosmetic changes.
The HEASARC's Browse configuration uses directories specified by the installer for the
Location of HTML documents
Location of CGI scripts
Location of Perl libraries used in Browse
Location of executables used in Browse -- primarily the NED and SIMBAD name resolvers.
Location of class files used in HEASARC Java applets.
This module controls a number of configuration options for Browse, including the directories in which various files will be found. Please read the comments in this file for directions on customizing it.
This is the HEASARC's home Browse page and is located in the cgi-bin script directory. Other sites may wish to customize its appearance and to include links to sites appropriate for their usage.
This file in the HTML document directory contains html for the header part on w3browse.pl, version-history.html and w3browse-help.html pages.w3browse-form-tables.html, inc_*html
These files in the HTML document directory control the apppearance of the main interface.databases.dat
This file in the cgi-bin directory indicates the databases that Browse will query. The first line describes the default database that Browse will use for all metabase queries. A line is also required for all remote databases in the system. The databases.dat file consists of four fields. The first field is the database name used in Browse. This corresponds to the database_location field in the Browse ZZGEN metabase table. The second entry is the DBI name for the database. The third and fourth entries are the user and password to be used in connecting to the database.
The DBI comprises a database independent layer -- the DBI itself, and
database dependent modules called
DBD's. DBD's are available from CPAN for all popular databases including
Sybase, Oracle, Informix and Ingres. To access the database, a Perl script
makes a DBI connection. The DBI connection name includes the type of the
database and so DBI calls the appropriate DBD to actually make a connection
to the database. For Sybase and Oracle a direct connection to the database
port is made. Subsequent DBI calls can use the existing connection.
We suggest the CPAN modules be installed in the following order:
The DBI module creates the DBD entry for proxies. If you are only going to talk to proxy servers, no further DBD's need to be included. If you are going to talk to a native database, or if you are going to install a proxy server yourself, then DBD's for the databases to which you are going to connect will also have to be installed.
Typically you will need to set appropriate logical variables to install these DBD's correctly. Copies of Sybase and Oracle DBD's are included in the distribution directory. E.g., to add in the DBD for Sybase, the environment variable SYBASE must be set to the SYBASE installation directory, and the LD_LIBRARY_PATH must be set to the directory $SYBASE/lib. These environment variables will also need to be set whenever a Sybase DBD is used within a Perl script.
For a given Perl module the sequence of steps to install the module
might look like:
dbiproxy --localport=9119Now ISAS can access our database using the DBI name
dbi:Proxy:hostname=dbsrv.gsfc.nasa.gov;port=9119;dsn=dbi:Sybase:SYBASENote that the proxy server supports persistent connections, so that we can still access the database quite efficiently.
HEASARC documentation. Users may wish to look at dumps of the HEASARC tables to understand how to populate these tables. Note that the metabase describes all tables that a Browse system knows about even if the table data itself is stored at some other site. I.e.,
if ISDC wishes to query tables at both ISDC and HEASARC, the ISDC metabase must contain descriptions of all of these tables.
Two Perl DBM libraries are used to cache results of name resolver requests. These are located at the HEASARC at
which directory is created by the CGI tar file.
You need to initialize these files, or queries for named objects will fail.
Create four empty files:
NED.dir, NED.pag, SIMBAD.dir and SIMBAD.pag
These will need to be writable by the user ID under which the CGI scripts run. Let us know if you'd like current copies of our tables -- caching NED and SIMBAD queries may be particularly desirable from Japan unless there is a local mirror. Currently, the Simbad query program uses the US mirror. If your connections to Europe are better you may wish to reset it to use the main Simbad site.
You would need to update the variable baseUrl in the /www/htdocs/classes/heasarc/w3browse/HeasarcQuery.java file with the correct url reference. Then compile it using 'javac HeasarcQuery.java'.
It is best to recompile the class files in /www/htdocs/classes with your version of Java 1.1.x. If you wish to speed up the client-side downloads, you may create w3browse.jar and ptolemy.jar files using commands:
cd /www/htdocs/classesGetting the Server-side Application to work
Here are the steps involved in getting the application side to work:
Browse Home Page W3Browse/w3blaunch.html (or just W3Browse) Allows the user to select from several interfaces. Main Interface cgi-bin/W3Browse/w3browse.pl -> w3table.pl Allows users to select one or more missions of interest. Query page cgi-bin/W3Browse/w3table.pl -> w3query.pl Format a query against one or more tables. Query Results page cgi-bin/W3Browse/w3query.pl -> w3hdprods.pl, w3cross.pl Get the results of a query. Ask for cross-correlations of results or data products. Data Products page cgi-bin/W3Browse/w3hdprods.pl -> w3tar.pl Show the available data products. User can create tar file of desired products. Tar page cgi-bin/W3Browse/w3tar.pl Create and download results tar file. Tables cross-correlation page cgi-bin/W3Browse/w3fullcross.pl Cross-correlate two tables. Results cross-correlation page cgi-bin/W3Browse/w3cross.pl Cross-correlate query results with another table.
Using Existing CGI ScriptsA quick way for remote sites to get up in using the HEASARC resources is to use a command line browser or HTTP access library (e.g., the Perl LWP library) to query the HEASARC's Browse Web pages. This method is not recommended, since it typically relies upon the detailed format of Browse queries and the returned results.
Using the Batch InterfaceThe HEASARC's Batch Interface to the catalog system was designed to provide a mechanisms for users to query HEASARC catalogs from a command line environment especially scripts. It can easily be adapted to be used within CGI scripts. There is little explicit support for access to the HEASARC's archive resources.
Open access using DBI and FTPAll of the HEASARC's catalog and archive resources are directly accessible to the user. The HEASARC provides a DBI inteface through which outside users can send arbitrary queries to the HEASARC database. All archive files are immediately and individually visible through FTP and HTTP protocols. The DBI interface to the HEASARC catalog is discussed above.
Sites going this route may want to understand the HEASARC catalog structures and metadata.