YAZ User's Guide and Reference

Sebastian Hammer

Adam Dickmeiss

Mike Taylor

Heikki Levanto

Dennis Schafroth

5.23.0

Abstract

This document is the programmer's guide and reference to the YAZ package version 5.23.0. YAZ is a compact toolkit that provides access to the Z39.50 and SRU/Solr 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.


Table of Contents

1. Introduction
1. Reading this Manual
2. The API
2. Compilation and Installation
1. Introduction
2. UNIX
2.1. Compiling from source on Unix
2.2. How to make apps using YAZ on UNIX
3. Windows
3.1. Compiling from Source on Windows
3.2. How to make apps using YAZ on Windows
3.3. Compiling Libxml2 and Libxslt on windows
3. ZOOM
1. Connections
1.1. Z39.50 Protocol behavior
1.2. SRU/Solr Protocol behavior
2. Queries
3. Result sets
3.1. Z39.50 Result-set Sort
3.2. Z39.50 Protocol behavior
3.3. SRU Protocol behavior
4. Records
4.1. Z39.50 Protocol behavior
4.2. SRU/Solr Protocol behavior
5. ZOOM Facets
6. Scan
7. Extended Services
7.1. Item Order
7.2. Record Update
7.3. Database Create
7.4. Database Drop
7.5. Commit Operation
7.6. Protocol behavior
8. Options
9. Query conversions
10. Events
4. Generic server
1. Introduction
2. The Database Frontend
3. The Backend API
4. Your main() Routine
5. The Backend Functions
5.1. Init
5.2. Search and Retrieve
5.3. Delete
5.4. Scan
6. Application Invocation
7. GFS Configuration and Virtual Hosts
5. The Z39.50 ASN.1 Module
1. Introduction
2. Preparing PDUs
3. EXTERNAL Data
4. PDU Contents Table
6. SOAP and SRU
1. Introduction
2. HTTP
3. SOAP Packages
4. SRU
7. Supporting Tools
1. Query Syntax Parsers
1.1. Prefix Query Format
1.1.1. Using Proximity Operators with PQF
1.1.2. PQF queries
1.2. CCL
1.2.1. CCL Syntax
1.2.2. CCL Qualifiers
1.2.3. CCL API
1.3. CQL
1.3.1. CQL parsing
1.3.2. CQL tree
1.3.3. CQL to PQF conversion
1.3.4. Specification of CQL to RPN mappings
1.3.5. CQL to XCQL conversion
1.3.6. PQF to CQL conversion
2. Object Identifiers
2.1. OID database
2.2. Standard OIDs
3. Nibble Memory
4. Log
5. MARC
5.1. TurboMARC
6. Retrieval Facility
6.1. Retrieval XML format
6.2. Retrieval Facility Examples
6.3. API
7. Sorting
7.1. Using the Z39.50 sort service
7.2. Type-7 sort
8. Facets
8. The ODR Module
1. Introduction
2. Using ODR
2.1. ODR Streams
2.2. Memory Management
2.3. Encoding and Decoding Data
2.4. Printing
2.5. Diagnostics
2.6. Summary and Synopsis
3. Programming with ODR
3.1. The Primitive ASN.1 Types
3.1.1. INTEGER
3.1.2. BOOLEAN
3.1.3. REAL
3.1.4. NULL
3.1.5. OCTET STRING
3.1.6. BIT STRING
3.1.7. OBJECT IDENTIFIER
3.2. Tagging Primitive Types
3.3. Constructed Types
3.4. Tagging Constructed Types
3.4.1. Implicit Tagging
3.4.2. Explicit Tagging
3.5. SEQUENCE OF
3.6. CHOICE Types
4. Debugging
9. The COMSTACK Module
1. Synopsis (blocking mode)
2. Introduction
3. Common Functions
3.1. Managing Endpoints
3.2. Data Exchange
4. Client Side
5. Server Side
6. Addresses
7. SSL
8. Diagnostics
9. Summary and Synopsis
10. Future Directions
I. Reference
yaz-client — Z39.50/SRU client for implementors
yaz-ztest — Z39.50/SRU Test Server
yaz-config — Script to get information about YAZ.
yaz — Z39.50 toolkit.
zoomsh — ZOOM shell
yaz-asncomp — YAZ ASN.1 compiler
yaz-marcdump — MARC record dump utility
yaz-iconv — YAZ Character set conversion utility
yaz-log — Log handling in all yaz-based programs
yaz-illclient — ILL client
yaz-icu — YAZ ICU utility
yaz-url — YAZ URL fetch utility
Bib-1 Attribute Set — Bib-1 Attribute Set
yaz-json-parse — YAZ JSON parser
yaz-record-iconv — YAZ Record Conversion Utility
A. List of Object Identifiers
B. Bib-1 diagnostics
C. SRU diagnostics
D. License
1. Index Data Copyright
E. About Index Data
F. Credits

List of Figures

1.1. YAZ layers

List of Tables

3.1. ZOOM Connection Options
3.2. ZOOM sort strategy
3.3. ZOOM Result set Options
3.4. Search Info Report Options
3.5. ZOOM Scan Set Options
3.6. Extended Service Type
3.7. Extended Service Common Options
3.8. Item Order Options
3.9. ILL Request Options
3.10. Record Update Options
3.11. Database Create Options
3.12. Database Drop Options
3.13. ZOOM Event IDs
5.1. Default settings for PDU Initialize Request
5.2. Default settings for PDU Initialize Response
5.3. Default settings for PDU Search Request
5.4. Default settings for PDU Search Response
5.5. Default settings for PDU Present Request
5.6. Default settings for PDU Present Response
5.7. Default settings for Delete Result Set Request
5.8. Default settings for Delete Result Set Response
5.9. Default settings for Scan Request
5.10. Default settings for Scan Response
5.11. Default settings for Trigger Resource Control Request
5.12. Default settings for Resource Control Request
5.13. Default settings for Resource Control Response
5.14. Default settings for Access Control Request
5.15. Default settings for Access Control Response
5.16. Default settings for Segment
5.17. Default settings for Close
7.1. Common Bib-1 attributes
7.2. Special attribute combos
7.3. CCL directives
7.4. Facet attributes
8.1. ODR Error codes

List of Examples

4.1. Running the GFS on Unix
4.2. Setting up Apache as SRU Frontend
4.3. Running a server with local access only
7.1. PQF queries using simple terms
7.2. PQF boolean operators
7.3. PQF references to result sets
7.4. Attributes for terms
7.5. PQF Proximity queries
7.6. PQF specification of search term type
7.7. PQF mixed queries
7.8. CCL queries
7.9. CCL profile
7.10. CQL to RPN mapping file
7.11. CQL to RPN string attributes
7.12. CQL to RPN using Bath Profile
7.13. Create OID on stack
7.14. Using oid_oiddotstring_to_oid
7.15. Using odr_getoidbystr
7.16. Create OID with YAZ DB
7.17. Use a built-in OID
7.18. Display of MARC record
7.19. MARC21 backend
7.20. MARCXML backend
7.21. RDF-lookup backend
8.1. Encoding and decoding functions
8.2. Encoding and decoding of an integer
8.3. Element Path for record