Table of Contents

This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.

Z3950 support

This page has been updated for Greenstone 2.82. For an older version of this page, please see this page.

What is Z39.50?

Z39.50 is an international client/server protocol for searching bibliographic data. It can use the Internet Protocol (TCP/IP), which makes the databases on a server available from almost anywhere around the globe. It is widely used, for example, in on-line library catalogues. It allows a user to search one or more databases and retrieve the results of the query.

Greenstone has support for z3950, both as a client and a server. GLI can download records using Z3950 and SRW. These records can then be included in a collection. This support is enabled by default. The Greenstone run-time can also act as a client to multiple Z3950 servers, and a Z3950 server program is also available. This support is not enabled by default, and recompilation is needed to enable it. To do this, you need the source code. If you haven't already got the source, download the version of the sourcecode component that matches the distribution you are using.

z3950 support in Greenstone is based around the YAZ toolkit, written by IndexData. We are currently using YAZ version 2.1.4. This is included in the Greenstone distribution without modification. Greenstone links against the libyaz.a library. We have also written yaz_zclient.h/cpp, which is based on the sample client.h/cpp. This is found in greenstone/runtime-src/src/z3950.

Download through Z39.50 from GLI

Greenstone can download records from a specified Z39.50 server from GLI. Start the Greenstone Librarian Interface. On the left-hand side of the Librarian Interface's Download panel, select Z39.50, and then specify the arguments on the right-hand side of the panel. There are five arguments:

The YAZ client supports the type-1 RPN query model. Both simple and advanced queries are supported, like single term query, boolean search and fielded search, etc. This page describes in detail the query syntax of YAZ. For exmaple, the following query finds records that have the phrase car history in title field @attr 1=4 "car history"

You can view the downloaded MARC files on the Gather panel. On the left-hand side of the panel, double click the Downloaded Files folder to expand its content. The subfolders are named by the Z39.50 server url. The MARC files are named as the combination of database name, query, and max_records if max_records is specified. These MARC files are physically stored in a temporary cache directory.

You can build a collection using these downloaded MARC files by dragging them across to the Collection section on the right-hand side of the Gather panel. MARCPlugin must be included in the collection plugin list. MARCPlugin important options include:

Download through SRW from GLI

SRW (Search/Retrieve Web service) is an alternative method that uses a web service to search and retrieve records from Z39.50 repositories. It replaces the Z39.50 communications protocol with HTTP and SOAP, but still supports the Z39.50 query syntax. Search results from SRW are in XML format.

Greenstone also supports downloading from a Z39.50 server through SRW. Go to the Download panel in Greenstone Librarian Interface and select SRW. On the right-hand side of the panel, there are five parameters, which are the same as for Z39.50 download. But different host and port values should be used here. For example, to connect to the Library of Congress Z39.50 server through SRW, the following host and port should be specified:

 host: http://z3950.loc.gov
 port: 7090/voyager?

The downloaded records are in XML format. Here is a sample record. You can view the downloaded records on the Gather panel. They are in the same subfolder as downloading from Z39.50 above.

To build a collection using the downloaded XML files, MARCXMLPlugin must be added to the collection plugin list. MARCXMLPlugin also uses the metadata_mapping_file option in the smae way as MARCPlugin.

Compiling Greenstone with z3950 support

 ./configure --enable-z3950 (--enable-apache-httpd)
 make
 make install
 nmake /f win32.mak USE_Z3950=1

Using the z3950 client

Once Greenstone has z3950 support compiled in, it can act as a client to multiple z3950 servers. The file greenstone/etc/packages/z3950/z3950.cfg specifies a list of servers to connect to. By default, no servers are set up, although the config file comes with one (commented out) example Z39.50 server, for the United States' Library of Congress.

Each entry consists of:

The entries need only be separated by whitespace, but for the purposes of clarity the sample entry uses newlines and tabs.

There is a list at the Library Of Congress website containing some servers publicly available for testing.

Greenstone will display a new "collection" for each server listed.

Using the z3950 server

 z3950server tcp:server-name:port-num

Testing the server

You can test the z3950 server by connecting to it using the Greenstone z3950 client. In the greenstone/etc/packages/z3950/z3950.cfg file, add a server entry similar to the following:

 zdemo
        kanuka.cs.waikato.ac.nz:9999
        demo
        "The demo collection via z3950"
        About "This collection contains a few records from the Humanity Development Library"

Known Problems/Issues list