UNPKG

node-zoom

Version:
114 lines (111 loc) 12.3 kB
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>7.�Extended Services</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="zoom.html" title="Chapter�3.�ZOOM"><link rel="prev" href="zoom.scan.html" title="6.�Scan"><link rel="next" href="zoom.options.html" title="8.�Options"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">7.�Extended Services</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="zoom.scan.html">Prev</a></td><th width="60%" align="center">Chapter�3.�ZOOM</th><td width="20%" align="right"><a accesskey="n" href="zoom.options.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="zoom.extendedservices"></a>7.�Extended Services</h2></div></div></div><p> ZOOM offers an interface to a subset of the Z39.50 extended services as well as a few privately defined ones: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Z39.50 Item Order (ILL). See <a class="xref" href="zoom.extendedservices.html#zoom.item.order" title="7.1.�Item Order">Section�7.1, &#8220;Item Order&#8221;</a>. </p></li><li class="listitem"><p> Record Update. This allows a client to insert, modify or delete records. See <a class="xref" href="zoom.extendedservices.html#zoom.record.update" title="7.2.�Record Update">Section�7.2, &#8220;Record Update&#8221;</a>. </p></li><li class="listitem"><p> Database Create. This a non-standard feature. Allows a client to create a database. See <a class="xref" href="zoom.extendedservices.html#zoom.database.create" title="7.3.�Database Create">Section�7.3, &#8220;Database Create&#8221;</a>. </p></li><li class="listitem"><p> Database Drop. This a non-standard feature. Allows a client to delete/drop a database. See <a class="xref" href="zoom.extendedservices.html#zoom.database.drop" title="7.4.�Database Drop">Section�7.4, &#8220;Database Drop&#8221;</a>. </p></li><li class="listitem"><p> Commit operation. This a non-standard feature. Allows a client to commit operations. See <a class="xref" href="zoom.extendedservices.html#zoom.commit" title="7.5.�Commit Operation">Section�7.5, &#8220;Commit Operation&#8221;</a>. </p></li></ul></div><p> To create an extended service operation a <code class="literal">ZOOM_package</code> must be created. The operation is a five step operation. The package is created, package is configured by means of options, the package is send, result is inspected (by means of options), the package is destroyed. </p><pre class="synopsis"> ZOOM_package ZOOM_connection_package(ZOOM_connection c, ZOOM_options options); const char *ZOOM_package_option_get(ZOOM_package p, const char *key); void ZOOM_package_option_set(ZOOM_package p, const char *key, const char *val); void ZOOM_package_send(ZOOM_package p, const char *type); void ZOOM_package_destroy(ZOOM_package p); </pre><p> The <code class="function">ZOOM_connection_package</code> creates a package for the connection given using the options specified. </p><p> Functions <code class="function">ZOOM_package_option_get</code> and <code class="function">ZOOM_package_option_set</code> gets and sets options. </p><p> <code class="function">ZOOM_package_send</code> sends the package the via connection specified in <code class="function">ZOOM_connection_package</code>. The <em class="parameter"><code>type</code></em> specifies the actual extended service package type to be sent. </p><div class="table"><a name="zoom.extendedservices.options"></a><p class="title"><b>Table�3.6.�Extended Service Common Options</b></p><div class="table-contents"><table summary="Extended Service Common Options" border="1"><colgroup><col class="name"><col class="description"><col class="default"></colgroup><thead><tr><th>Option</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td>package-name</td><td>Extended Service Request package name. Must be specified as part of a request</td><td>none</td></tr><tr><td>user-id</td><td>User ID of Extended Service Package. Is a request option</td><td>none</td></tr><tr><td>function</td><td> Function of package - one of <code class="literal">create</code>, <code class="literal">delete</code>, <code class="literal">modify</code>. Is a request option. </td><td><code class="literal">create</code></td></tr><tr><td>waitAction</td><td> Wait action for package. Possible values: <code class="literal">wait</code>, <code class="literal">waitIfPossible</code>, <code class="literal">dontWait</code> or <code class="literal">dontReturnPackage</code>. </td><td><code class="literal">waitIfPossible</code></td></tr><tr><td>targetReference</td><td> Target Reference. This is part of the response as returned by the server. Read it after a successful operation. </td><td><code class="literal">none</code></td></tr></tbody></table></div></div><br class="table-break"><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="zoom.item.order"></a>7.1.�Item Order</h3></div></div></div><p> For Item Order, type must be set to <code class="literal">itemorder</code> in <code class="function">ZOOM_package_send</code>. </p><div class="table"><a name="zoom.item.order.options"></a><p class="title"><b>Table�3.7.�Item Order Options</b></p><div class="table-contents"><table summary="Item Order Options" border="1"><colgroup><col class="name"><col class="description"><col class="default"></colgroup><thead><tr><th>Option</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td>contact-name</td><td>ILL contact name</td><td>none</td></tr><tr><td>contact-phone</td><td>ILL contact phone</td><td>none</td></tr><tr><td>contact-email</td><td>ILL contact email</td><td>none</td></tr><tr><td>itemorder-item</td><td>Position for item (record) requested. An integer</td><td>1</td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="zoom.record.update"></a>7.2.�Record Update</h3></div></div></div><p> For Record Update, type must be set to <code class="literal">update</code> in <code class="function">ZOOM_package_send</code>. </p><div class="table"><a name="zoom.record.update.options"></a><p class="title"><b>Table�3.8.�Record Update Options</b></p><div class="table-contents"><table summary="Record Update Options" border="1"><colgroup><col class="name"><col class="description"><col class="default"></colgroup><thead><tr><th>Option</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td>action</td><td> The update action. One of <code class="literal">specialUpdate</code>, <code class="literal">recordInsert</code>, <code class="literal">recordReplace</code>, <code class="literal">recordDelete</code>, <code class="literal">elementUpdate</code>. </td><td><code class="literal">specialUpdate (recordInsert for updateVersion=1 which does not support specialUpdate)</code></td></tr><tr><td>recordIdOpaque</td><td>Opaque Record ID</td><td>none</td></tr><tr><td>recordIdNumber</td><td>Record ID number</td><td>none</td></tr><tr><td>record</td><td>The record itself</td><td>none</td></tr><tr><td>recordOpaque</td><td>Specifies an opaque record which is encoded as an ASN.1 ANY type with the OID as tiven by option <code class="literal">syntax</code> (see below). Option <code class="literal">recordOpaque</code> is an alternative to record - and <code class="literal">record</code> option (above) is ignored if recordOpaque is set. This option is only available in YAZ 3.0.35 and later and is meant to facilitate Updates with servers from OCLC. </td><td>none</td></tr><tr><td>syntax</td><td>The record syntax (transfer syntax). Is a string that is a known record syntax. </td><td>no syntax</td></tr><tr><td>databaseName</td><td>Database from connection object</td><td>Default</td></tr><tr><td>correlationInfo.note</td><td>Correlation Info Note (string)</td><td>none</td></tr><tr><td>correlationInfo.id</td><td>Correlation Info ID (integer)</td><td>none</td></tr><tr><td>elementSetName</td><td>Element Set for Record</td><td>none</td></tr><tr><td>updateVersion</td><td>Record Update version which holds one of the values 1, 2 or 3. Each version has a distinct OID: 1.2.840.10003.9.5 (<a class="ulink" href="http://www.loc.gov/z3950/agency/markup/18.html#auxiliaryStatus4" target="_top">first version</a>) , 1.2.840.10003.9.5.1 (second version) and 1.2.840.10003.9.5.1.1 (<a class="ulink" href="http://www.loc.gov/z3950/agency/defns/update-es-rev1.html" target="_top">third and newest version</a>). </td><td>3</td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="zoom.database.create"></a>7.3.�Database Create</h3></div></div></div><p> For Database Create, type must be set to <code class="literal">create</code> in <code class="function">ZOOM_package_send</code>. </p><div class="table"><a name="zoom.database.create.options"></a><p class="title"><b>Table�3.9.�Database Create Options</b></p><div class="table-contents"><table summary="Database Create Options" border="1"><colgroup><col class="name"><col class="description"><col class="default"></colgroup><thead><tr><th>Option</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td>databaseName</td><td>Database from connection object</td><td>Default</td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="zoom.database.drop"></a>7.4.�Database Drop</h3></div></div></div><p> For Database Drop, type must be set to <code class="literal">drop</code> in <code class="function">ZOOM_package_send</code>. </p><div class="table"><a name="zoom.database.drop.options"></a><p class="title"><b>Table�3.10.�Database Drop Options</b></p><div class="table-contents"><table summary="Database Drop Options" border="1"><colgroup><col class="name"><col class="description"><col class="default"></colgroup><thead><tr><th>Option</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td>databaseName</td><td>Database from connection object</td><td>Default</td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="zoom.commit"></a>7.5.�Commit Operation</h3></div></div></div><p> For Commit, type must be set to <code class="literal">commit</code> in <code class="function">ZOOM_package_send</code>. </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="zoom.extended.services.behavior"></a>7.6.�Protocol behavior</h3></div></div></div><p> All the extended services are Z39.50-only. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> The database create, drop and commit services are privately defined operations. Refer to <code class="filename">esadmin.asn</code> in YAZ for the ASN.1 definitions. </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="zoom.scan.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="zoom.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="zoom.options.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.�Scan�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�8.�Options</td></tr></table></div></body></html>