next up previous 89
Next: Coordinates, units and formats
Up: The Configuration File
Previous: Types of servers


URL and query specification

The url keyword prescribes how the client should access a remote server to query a database. Following the usual conventions for a CGI gateway it consists of the URL corresponding to the script which constitutes the server, followed by a `?' and then a string defining the query passed to the server. The query string consists of simple characters and `tokens'. The tokens start with a `%' character. When a client makes a query the tokens are replaced with values which correspond to the individual query and the resulting string is sent to the server. An example query string for a server which provides circular area searches on a single catalogue might be:

ra=%ra&dec=%dec&radius=%r2

which contains the tokens %ra, %dec and %r2. The client might substitute them to yield:

ra=10:30:00&dec=-30:30.0&radius=3

The format of the query string must correspond to that expected by the server. This restriction aside, considerable freedom is allowed in the format of the query string. See configuration file simpleconfig.cfg for examples. The complete list of the permitted tokens is as follows.

%ra
Right Ascension (see Section [*]).

%dec
Declination (see Section [*]).

%x
$x$ image pixel coordinate (see Section [*]).

%y
$y$ image pixel coordinate (see Section [*]).

%r
radius of a circular area search (see Section [*]).

%r1
inner radius (see Section [*]).

%r2
outer radius (see Section [*]).

%w
width of a rectangular region (see Section [*]).

%h
height of a rectangular region (see Section [*]).

%m1
Minimum magnitude.

%m2
Maximum magnitude.

%m
Maximum magnitude when no minimum is specified.

%n
Maximum number of objects (or rows) to return.

%cols
A list of the columns which the returned table is to contain. If no value is supplied all the columns in the database will be returned. The order of the list corresponds to the order in which the columns are returned.

%id
The name (or identifier) of an object submitted to a namesvr (`name server') database.

%mime-type
The HTTP mime-type to be inserted in a HTTP get command.

%sort
A list of columns on which the returned table is to be sorted. If no value is specified the table is returned unsorted.

%sortorder
The order into which the returned table is sorted. The permitted values are increasing and decreasing.

%cond
A string specifying one or more range searches. See Section [*].



next up previous 89
Next: Coordinates, units and formats
Up: The Configuration File
Previous: Types of servers

Writing Catalogue and Image Servers for GAIA and CURSA
Starlink System Note 75
A.C. Davenhall
26 July 2000
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils