Note

For a better understand the mechanism of retrieving metadata through the Z39.50 extension, the information from the chapter about importing metadata in the bibliographic description editor will be useful, as well as acquaintance with the Z39.50 protocol.

Note

The programming library for that extension is dlibra-app-extension-sl-z3950.

Many library systems make metadata available through the Z39.50 protocol. The Editor Application extension discussed here makes it possible to retrieve metadata from systems which make them available through the Z39.50 protocol. The Z39.50 protocol is a very complex standard for sending metadata in various formats. The extension in question only allows metadata retrieval from the MARC 21 communication format (specifically, the USMARC format). The metadata retrieved with the use of that extension can be imported by means of an extension for importing files in the MARC format.

In order to retrieve metadata with the use of the Z39.50 protocol:

  1. In the metadata editor, in the “Metadata import/export” panel, click the “Import...” button. The metadata import window will appear (see the image below). The metadata import window contains the Z39.50 option which determines the use of the Z39.50 extension for selecting the file with the metadata to be imported.

    Okno importu metadanych
  2. In order to select the metadata to be imported, click the “Select...” button. The metadata search window will be displayed (see the image below). In that window, the user can select the server and the base to which search queries will be directed. A search query is built on the basis of three values/phrases which are entered by a user in fields on the “Search” panel. The attribute search can be adjusted by a user by selecting appropriate attributes from the expandable lists. In the image below, the attributes selected for the search are “Author”, “Title”, and “Publisher”. In order to start the search, click the “Search” button. Once the search has finished, the results can be viewed with the use of the “Previous” and “Next” buttons, which lead, respectively, to the previous or next page of the search results. The editor can also select a particular page from the search results directly, by means of the expandable list located between the “Previous” and “Next” buttons.

    Okno wyszukiwania metadanych poprzez protokół Z39.50
  3. In order to select the metadata, select the appropriate item on the list of search results and click the “Select” button. The file will be downloaded to the local computer drive. The Z39.50 search window will be closed. In the metadata import window, the path to the downloaded metadata file will be entered (automatically). The next steps should be taken in accordance with the instructions in the section about importing metadata (in the simplest cases, one just has to click the “Import” button in the metadata import window).

The Z39.50 extension can be adjusted to the needs of a particular installation by means of an appropriate configuration. The configuration of the extension is located in the configuration file, z3950_servers.xml. That file defines, among other things, the servers and databases in which the editor will be able to find metadata, the attributes for searching a particular server, and the logical connective for connecting queries from particular search fields. The default configuration file of the Z39.50 extension is shown below.

<?xml version="1.0" encoding="UTF-8"?>
<servers>
	<server>
		<name>Library of Congress</name>
		<name lang="en">Library of Congress</name>
		<name lang="pl">Biblioteka Kongresu Stanów Zjednoczonych</name>
		<host>z3950.loc.gov</host>
		<port>7090</port>
		<databases>
			<database>Voyager</database>
		</databases>
		<recordencoding>MARC-8</recordencoding>
		<queries>
			<attrset>@attrset bib-1</attrset>
			<operator>@and</operator>
			<query>
				<name>Author</name>
				<name lang="pl">Autor</name>
				<name lang="en">Author</name>
				<searchquery>@attr 1=1003 $1</searchquery>
			</query>
			<query>
				<name>Title</name>
				<name lang="pl">Tytuł</name>
				<name lang="en">Title</name>
				<searchquery>@attr 1=4 $1</searchquery>
			</query>
			<query>
				<name>Publisher</name>
				<name lang="pl">Wydawca</name>
				<name lang="en">Publisher</name>
				<searchquery>@attr 1=1018 $1</searchquery>
			</query>
			<query>
				<name>Everywhere</name>
				<name lang="pl">Wszędzie</name>
				<name lang="en">Everywhere</name>
				<searchquery>@attr 1=1035 $1</searchquery>
			</query>
		</queries>
	</server>
</servers>

The configuration file is saved in the XML format. The main node of the file is <servers>; it contains definitions of Z39.50 servers (the number of the servers is not limited). Every server is defined within the <server> tag; the tag should contain the following information, in specific tags:

  • <name> – this is the server name which is displayed to the editor in the metadata search window; it can be entered for a particular language by using attribute lang in the <name> tag; the value of attribute lang should be the two-letter symbol of the language (in accordance with the ISO 639 standard) in which the server name is specified; the default server name is determined in the <name> tag which does not have the lang attribute; Please note that particular names are defined in separate <name> tags.
  • <host> – the Internet address of the Z39.50 server (the Internet Protocol address or domain address).
  • <port> – the port of the Z39.50 server;
  • <user> – the name of the user if the server requires authentication;
  • <password> – the password of the user if the server requires it for authentication;
  • <databases> – this tag contains the names of the databases which can be searched by the editor; particular names should be entered in <databases> tags;
  • <recordencoding> – jest to kodowanie rekordów metadanych, które udostępnia definiowany serwer Z39.50.
  • <queryencoding> – the encoding in which the phrases are to be sent to the server; the tag is optional; by default, the US-ANSI encoding is used;
  • <setname> – the name of the set of properties which is to be returned fro every found element; this is an optional tag which, by default, assumes value F (from the word “full”); Value B (from “brief” is also often used; if the name of the set is not set correctly, the data retrieval will end in an error and the following message will appear in the Java console: Z3950SearchTask - Non surrogate diagnostics [25];
  • <queries> – the node in which information related to the search panel is defined; all values which begin with character @ are related to the query language used in the JZKit 2 library (http://jzkit.org/); thus:
    • <attrset> – defines the attribute set used for searching;
    • <operator> – determines the logical connective which will be used for connecting the values/phrases specified in the search fields;
    • <query> – specifies the name of the attribute for searching and the search query related to that attribute; the attribute name, just like the server name, can be entered in many languages (with the use of the lang attribute); the default attribute name is the value in the <name> tag which does not have the lang attribute; the search query is specified in the <searchquery> tag where the $l tag is replaced with the value from the appropriate search query.

In order to change the configuration of the Z39.50 extension, the user should follow the instructions included in the application configuration section.

  • No labels