en:user_advanced:z3950
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:user_advanced:z3950 [2014/04/13 23:52] – external edit 127.0.0.1 | en:user_advanced:z3950 [2023/03/13 01:46] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | |||
====== Z39.50====== | ====== Z39.50====== | ||
**[[http:// | **[[http:// | ||
- | Greenstone has support for Z39.50, both as a client and a server. GLI can download MARC records using Z39.50 and MARCXML records using SRU. These records can then be included in a collection. This support is enabled by default. | + | Greenstone |
- | The Greenstone run-time can also act as a client to multiple Z39.50 servers, and a Z39.50 server program is also available. | + | The Greenstone |
- | Z39.50 support in Greenstone is based around the YAZ toolkit, written by [[http:// | + | Z39.50 support in Greenstone is based around the YAZ toolkit, written by [[http:// |
===== Download through Z39.50 ===== | ===== Download through Z39.50 ===== | ||
See the [[en: | See the [[en: | ||
- | Greenstone can download records from a specified Z39.50 server from the GLI (from the Download panel) or the command line (using the '' | + | Greenstone |
^Argument^Description^ | ^Argument^Description^ | ||
- | |Host ('' | + | |Host ('' |
- | |Port ('' | + | |Port ('' |
- | |Database ('' | + | |Database ('' |
- | |Find ('' | + | |Find ('' |
|Max records ('' | |Max records ('' | ||
Line 24: | Line 27: | ||
If downloading via the command line, a folder containing the files will be downloaded into the directory from which you run the script (unless the '' | If downloading via the command line, a folder containing the files will be downloaded into the directory from which you run the script (unless the '' | ||
+ | |||
+ | To see the script options, run | ||
+ | < | ||
+ | downloadfrom.pl -h | ||
+ | downloadfrom.pl -download_mode Z3950 -h (shows the specific options for Z3950 mode) | ||
+ | </ | ||
+ | |||
+ | A sample command might be | ||
+ | < | ||
+ | downloadfrom.pl -download_mode Z3950 -host lx2.loc.gov -port 210 -database LCDB_MARC8 -find " | ||
+ | </ | ||
+ | |||
+ | This will make a folder called lx2.loc.gov in the folder that you ran the command from, containing a MARC file with your result records. | ||
As the files downloaded via Z39.50 are in MARC format, they can be processed by [[en: | As the files downloaded via Z39.50 are in MARC format, they can be processed by [[en: | ||
+ | |||
+ | [[https:// | ||
+ | |||
==== Querying in YAZ ==== | ==== Querying in YAZ ==== | ||
Line 38: | Line 57: | ||
Greenstone also supports downloading from a Z39.50 server through SRU. If using the GLI, select SRU on the Download panel. The options for SRU 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 SRU, the following host and port should be specified: | Greenstone also supports downloading from a Z39.50 server through SRU. If using the GLI, select SRU on the Download panel. The options for SRU 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 SRU, the following host and port should be specified: | ||
< | < | ||
- | host: http://z3950.loc.gov | + | host: http://lx2.loc.gov |
- | | + | |
</ | </ | ||
Line 50: | Line 69: | ||
To build a collection using the downloaded XML files, [[en: | To build a collection using the downloaded XML files, [[en: | ||
- | ===== Compiling Greenstone with Z39.50 support ===== | + | ===== Compiling Greenstone |
* Linux/ | * Linux/ | ||
Line 70: | Line 89: | ||
* To enable iconv or xml2, edit greenstone\runtime-src\win32.mak, | * To enable iconv or xml2, edit greenstone\runtime-src\win32.mak, | ||
- | ===== Using the Z39.50 client ===== | + | ===== Using the Greenstone 2 Z39.50 client ===== |
- | Once Greenstone has Z39.50 support compiled in, it can act as a client to multiple z39.50 servers. The file | + | Once Greenstone |
- | <TABAREA tabs=" | + | |
- | <TAB>'' | + | |
- | < | + | |
- | </ | + | |
- | + | ||
- | 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' | + | |
Each entry consists of: | Each entry consists of: | ||
Line 95: | Line 108: | ||
Greenstone will display a new " | Greenstone will display a new " | ||
- | ===== Using the z3950 server ===== | + | ===== Using the Greenstone 2 z3950 server ===== |
* The z3950server program is installed into '' | * The z3950server program is installed into '' | ||
* The '' | * The '' | ||
* Before running the server, set up your Greenstone environment in the terminal by running the following in your top level Greenstone directory: | * Before running the server, set up your Greenstone environment in the terminal by running the following in your top level Greenstone directory: | ||
- | <TABAREA tabs=" | + | Linux/Mac |
- | < | + | |
- | < | + | |
- | source gs3-setup.bash | + | |
- | </ | + | |
- | Windows | + | |
- | < | + | |
- | gs3-setup.bat | + | |
- | </ | + | |
- | <TAB>Linux/Mac | + | |
< | < | ||
source setup.bash | source setup.bash | ||
Line 116: | Line 120: | ||
< | < | ||
setup.bat | setup.bat | ||
- | </code></ | + | </ |
- | </ | + | |
* By default, the server listens on localhost: | * By default, the server listens on localhost: | ||
< | < | ||
Line 144: | Line 148: | ||
* **The Z39.50 client will not work when fast-cgi is used**. Currently, the use of the fast-cgi package (off by default) will disable the use of the Z39.50 client code for Greenstone. | * **The Z39.50 client will not work when fast-cgi is used**. Currently, the use of the fast-cgi package (off by default) will disable the use of the Z39.50 client code for Greenstone. | ||
* When viewing a Z39.50 " | * When viewing a Z39.50 " | ||
+ | |||
+ | ===== About z39.50 ===== | ||
+ | |||
+ | Sometimes, the best explanation is the simplest one. Z39.50 is a network protocol that provides | ||
+ | access to information systems. | ||
+ | |||
+ | Z39.50 was originally developed to meet the needs of libraries to integrate their online catalog | ||
+ | systems. It has since been adopted by various other domains, and it remains arguably the most | ||
+ | flexible, versatile and efficient information retrieval around. It is also open; the specification | ||
+ | can be downloaded freely from the net. | ||
+ | |||
+ | It has been considered complex by some, but its flexibility is mostly derived from the fact that it | ||
+ | is a fairly complete model of the task if information retrieval -- and from that follows a certain | ||
+ | measure of complexity. | ||
+ | |||
+ | We still consider Z39.50 to be an important building block in the construction of information | ||
+ | architectures, | ||
+ | minimising the complexity of Z39.50 by providing well-designed toolkits for programmers wishing to | ||
+ | implement the protocol. You'll find much more information about our tools under the software page. | ||
+ | |||
+ | ===== About YAZ ===== | ||
+ | |||
+ | YAZ stands for Yet Another Z39.50 toolkit. | ||
+ | |||
+ | YAZ is a compact toolkit that provides access to the Z39.50 and SRW/SRU protocols, as well as a | ||
+ | set of higher-level tools for implementing the server and client roles, respectively. The documentation | ||
+ | can be used on its own, or as a reference when looking at the example applications provided with | ||
+ | the package. | ||
+ | |||
+ | === How to make apps using YAZ on UNIX === | ||
+ | |||
+ | http:// | ||
+ | |||
+ | This section describes how to compile - and link your own applications using the YAZ toolkit. | ||
+ | If you're used to Makefiles this shouldn' | ||
+ | you have to set a proper include path for your C/C++ compiler and specify the location of YAZ | ||
+ | libraries. You can do it by hand, but generally we suggest you use the yaz-config that is generated | ||
+ | by configure. This is especially important if you're using the threaded version of YAZ which requires | ||
+ | you to pass more options to your linker/ | ||
+ | |||
+ | The yaz-config script accepts command line options that makes the yaz-config script print options that | ||
+ | you should use in your make process. The most important ones are: --cflags, --libs which prints C compiler | ||
+ | flags, and linker flags respectively. | ||
+ | |||
+ | A small and complete Makefile for a C application consisting of one source file, myprog.c, may look | ||
+ | like this: | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | $ (CC) $(CFLAGS) -o myprog myprog.o $(LIBS) | ||
+ | |||
+ | The CFLAGS variable consists of a C compiler directive that will set the include path to the parent | ||
+ | directory of yaz. That is, if YAZ header files were installed in / | ||
+ | path is set to / | ||
+ | # include < | ||
+ | and not | ||
+ | # include < | ||
+ | |||
+ | For Libtool users, the yaz-config script provides a different variant of option --libs, called | ||
+ | --lalibs that returns the name of the Libtool acrhive(s) for YAZ rather than the ordinary ones. | ||
+ | |||
+ | For applications using the threaded version of YAZ, specify threads after the other options. When | ||
+ | threads is given, more flags and linker flags will be printed by yaz-config. If our previous example | ||
+ | was using threads, you'd have to modify the lines that set CFLAGS and LIBS as follows: | ||
+ | | ||
+ | | ||
+ | |||
+ | There is no need specify POSIX thread libraries in your Makefile. The LIBS variable includes that | ||
+ | as well. |
en/user_advanced/z3950.1397433132.txt.gz · Last modified: 2018/03/26 01:29 (external edit)