Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
<?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>

Plik konfiguracyjny zapisany jest w formacie XML. Głównym węzłem w pliku jest <servers>, w którym znajdują się definicje serwerów Z39.50 (liczba serwerów nie jest ograniczona). Każdy serwer zdefiniowany jest w ramach znacznika <server> w którym znajdować się powinny następujące informacje w poszczególnych znacznikach:

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 langin 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;
  • <name> - jest to nazwa serwera wyświetlana redaktorowi w oknie wyszukiwania metadanych. Nazwę można wprowadzić dla konkretnego języka poprzez zastosowanie w znaczniku <name> atrybutu lang. Wartością atrybutu lang powinien być dwuliterowy symbol języka (zgodnie ze standardem ISO 639), w którym specyfikowana jest nazwa serwera. Domyślna nazwa serwera określana jest w znaczniku <name>, który nie posiada atrybutu lang. Proszę zauważyć, że poszczególne nazwy definiowane są w odrębnych znacznikach <name>.
  • <host> - jest to adres internetowy serwera Z39.50 (adres IP lub adres domenowy).
  • <port> - jest to port serwera Z39.50.
  • <user> - nazwa użytkownika, jeśli serwer wymaga uwierzytelniania
  • <password> - hasło użytkownika, jeśli serwer wymaga go do uwierzytelniania
  • <databases> - w tym znaczniku znajdują się nazwy baz danych, które redaktor może przeszukiwać. Poszczególne nazwy powinny być wprowadzane w znacznikach <database>.
  • <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 - jest to kodowanie, w jakim mają być wysyłane frazy w zapytaniach do serwera. Znacznik jest opcjonalny, domyślnie stosowane jest kodowanie US-ANSI.<setname> - jest to nazwa zbioru właściwości, który ma być zwrócony dla każdego znalezionego elementu. Jest to znacznik opcjonalny, domyślnie przyjmuje wartość F (od full - pełen zbiór). Często jest też używana wartość B (od brief - skrócone). Jeśli nazwa zbioru nie jest poprawnie ustawiona, pobieranie danych zakończy się błędem, a w konsoli Java pojawi się komunikat: Z3950SearchTask - Non surrogate diagnostics [25].;
  • <queries> - jest to węzeł w którym definiuje się informacje związane z panelem wyszukiwawczym. Wszystkie wartości, które rozpoczynają się od znaku @ związane są z językiem zapytań stosowanym w bibliotece JZKit 2 – 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/). I tak; thus:
    • <attrset> - określa zestaw atrybutów jaki jest używany do wyszukiwania.
    • <operator> - określa operator logiczny, który będzie używany do łączenia specyfikowanych wartości/fraz w polach wyszukiwawczych.
    • <query> - specyfikuje nazwę atrybutu po którym możliwe będzie wyszukiwanie oraz zapytanie wyszukiwawcze związane z tym atrybutem. Nazwa atrybutu podobnie jak w przypadku nazwy serwera może być wprowadzona w wielu językach (użycie atrybutu lang). Domyślna nazwa atrybutu to wartość zawarta w znaczniku <name>, który nie posiada atrybutu lang. Zapytanie wyszukiwawcze specyfikuje się w znaczniku <searchquery>, gdzie w miejsce znacznika $1 wstawiana jest wartość z odpowiedniego pola wyszukiwawczego.

...

    •  – 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.