Science With the Virtual Observatory
2006 Summer School

Publishing and Resource Discovery with Registries -- Exercises

The exercises presented here are companions to the presentation Publishing and Resource Discovery with Registries (PDF, PPT).

Part 1: Advanced Searching via the new Standard Search Interface

The ivoaregistry Java package provides a Java API and a rudimentary command-line tool for searching registries through the IVOA standard search interface. To build the library and tool, change into the package directory and run ant:

on Linux/MacOS:
cd $NVOSS_HOME/java/src/ivoaregistry
ant
   on Windows:
cd %NVOSS_HOME%\java\src\ivoaregistry
ant

Exercise 1. Sample Advanced Queries

regsearch is the command line tool for searching registries via the standard interface. Currently, all the documentation is in-lined to the command script; thus, to view it, load src/scripts/regsearch into your favorite editor or browser.

To use the tool, it's helpful to store the registry endpoint into a variable. At this writing, we have two compliant registries we can use; one from the AstroGrid project in the UK and one on our local network, an upgraded version of the Carnivore registry. We'll set a variable for each:

on Linux/MacOS, csh:
set agreg=http://msslxt.mssl.ucl.ac.uk:8080/astrogrid-regtest-1_0/services/RegistryQueryv1_0
set locreg=http://localhost:8080/carnivore/services
on Linux/MacOS, sh:
agreg=http://msslxt.mssl.ucl.ac.uk:8080/astrogrid-regtest-1_0/services/RegistryQueryv1_0
locreg=http://localhost:8080/carnivore/services
on Windows:
set agreg=http://msslxt.mssl.ucl.ac.uk:8080/astrogrid-regtest-1_0/services/RegistryQueryv1_0
set locreg=http://localhost:8080/carnivore/services
In brief, the synopsis of this tool's usage is:
Usage: regsearch -e url [ options ] command [ args ... ]
where command is one of the following:
getidentityreturn the description of the registry
getresourcereturn the description of the resource specified by an identifier
searchbyadqlsearch for resources whose descriptions match ADQL constraints
searchbykeywordssearch for resources whose descriptions contain given keywords
idsbyadqlreturn just IDs of resources whose descriptions match ADQL constraints
idsbykeywordsreturn just IDs of resources whose descriptions contain given keywords

In this exercise, we will use the searchbyadql command. Let's try an example.

Find all resource that mention quasars in its description:
regsearch -e $agreg searchbyadql "content/description like '%galaxy%'"
Here some options you may find helpful or instructive:
-s listextract metadata from the returned records by listing their XPath identifiers in a comma-separated list; e.g. "identifier,title,capability/interface/accessURL"
-vprint out some extra messages about what's going on
-xshow the SOAP request and response messages
Try some more examples:
Find all registered organisations:
regsearch -e $agreg searchbyadql "@xsi:type like '%Organisation%'"

Find all registered organisations that work in radio astronomy:
regsearch -e $agreg searchbyadql "@xsi:type like '%Organisation%' and content/subject like '%radio%'"

Find all cone search services:
regsearch -e $agreg searchbyadql "capability/@xsi:type like '%ConeSearch%'"

Exercise 2. Registering Resources

In this exercise, we will together walk through the process using the NCSA Publishing Registry.

  1. Access the Registry via the link above.

  2. We will enter via the left panel for first time users. Before you do anything, click the check box for trying out the form without really publishing any records. After that click "Create a new site".

  3. The first thing you have to do is register yourself--or, more precisely, your organization--as a recognized publisher in the VO. Fill out the form describing your organisation. Note the color coding indicating which fields are required and which are recommended.

  4. When your finished filling out the form, click "Next". You now enter a login name and password for protecting write access to the records you access.

  5. From here you can add new Resource records.


The NVO Summer School is made possible through the support of the National Science Foundation and the National Aeronautics and Space Administration.