![]() |
2008 Summer School |
The exercises presented here were prepared as part of the NVO Summer School.
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 |
|
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. Note that one of the points of the standard interface is that you can use it to search any IVOA-compliant registry. In this exercise, we can use the NVO registry or the Astrogrid registry, so we'll set a variable for each:
on Linux/MacOS, csh:
set nvoreg=http://nvo.stsci.edu/vor10/ristandardservice.asmx set agreg=http://msslxt.mssl.ucl.ac.uk:8080/astrogrid-regtest-1_0/services/RegistryQueryv1_0on Linux/MacOS, sh: nvoreg=http://nvo.stsci.edu/vor10/ristandardservice.asmx agreg=http://msslxt.mssl.ucl.ac.uk:8080/astrogrid-regtest-1_0/services/RegistryQueryv1_0on Windows: set nvoreg=http://nvo.stsci.edu/vor10/ristandardservice.asmx set agreg=http://msslxt.mssl.ucl.ac.uk:8080/astrogrid-regtest-1_0/services/RegistryQueryv1_0 |
In brief, the synopsis of this tool's usage is:
Usage: regsearch -e url [ options ] command [ args ... ]
where command is one of the following:
getidentity return the description of the registry getresource return the description of the resource specified by an identifier searchbyadql search for resources whose descriptions match ADQL constraints searchbykeywords search for resources whose descriptions contain given keywords idsbyadql return just IDs of resources whose descriptions match ADQL constraints idsbykeywords return 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 list extract metadata from the returned records by listing their XPath identifiers in a comma-separated list; e.g. "identifier,title,capability/interface/accessURL" -v print out some extra messages about what's going on -x show 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%'"
The NVO Summer School is made possible through the support of the National Science Foundation.
![]() |