ZOOM_connection_scan1 (ZOOM_connection c, ZOOM_query startterm)
ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
-->
-<!-- $Id: zoom.xml,v 1.60 2007-06-21 09:00:53 adam Exp $ -->
+<!-- $Id: zoom.xml,v 1.61 2007-06-29 08:05:07 adam Exp $ -->
<chapter id="zoom"><title>ZOOM</title>
<para>
&zoom; is an acronym for 'Z39.50 Object-Orientation Model' and is
<literal>recordDelete</literal>,
<literal>elementUpdate</literal>.
</entry>
- <entry><literal>specialUpdate</literal></entry>
+ <entry><literal>specialUpdate (recordInsert for updateVersion=1 which does not support specialUpdate)</literal></entry>
</row>
<row>
<entry>recordIdOpaque</entry>
<entry>Element Set for Record</entry>
<entry>none</entry>
</row>
+ <row>
+ <entry>updateVersion</entry>
+ <entry>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
+ (<ulink url="&url.z39.50.extupdate1;">first version</ulink>) ,
+ 1.2.840.10003.9.5.1
+ (second version) and
+ 1.2.840.10003.9.5.1.1
+ (<ulink url="&url.z39.50.extupdate3;">third and
+ newest version</ulink>).
+ </entry>
+ <entry>3</entry>
+ </row>
</tbody>
</tgroup>
</table>
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: zoom-c.c,v 1.137 2007-06-25 18:34:27 adam Exp $
+ * $Id: zoom-c.c,v 1.138 2007-06-29 08:05:07 adam Exp $
*/
/**
* \file zoom-c.c
odr_prepend(c->odr_out, "ZOOM-C",
ireq->implementationName));
- version = odr_strdup(c->odr_out, "$Revision: 1.137 $");
+ version = odr_strdup(c->odr_out, "$Revision: 1.138 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
ireq->implementationVersion =
const char *recordIdNumber = ZOOM_options_get(p->options, "recordIdNumber");
const char *record_buf = ZOOM_options_get(p->options, "record");
const char *syntax_str = ZOOM_options_get(p->options, "syntax");
+ const char *version = ZOOM_options_get(p->options, "updateVersion");
const char *correlationInfo_note =
ZOOM_options_get(p->options, "correlationInfo.note");
ZOOM_options_get(p->options, "correlationInfo.id");
int action_no = -1;
Odr_oid *syntax_oid = 0;
+ const Odr_oid *package_oid = yaz_oid_extserv_database_update;
+ if (!version)
+ version = "3";
if (!syntax_str)
syntax_str = "xml";
if (!record_buf)
if (num_db > 0)
first_db = db[0];
- if (!action)
- action = "specialUpdate";
+ switch(*version)
+ {
+ case '1':
+ package_oid = yaz_oid_extserv_database_update_first_version;
+ /* old update does not support specialUpdate */
+ if (!action)
+ action = "recordInsert";
+ break;
+ case '2':
+ if (!action)
+ action = "specialUpdate";
+ package_oid = yaz_oid_extserv_database_update_second_version;
+ break;
+ case '3':
+ if (!action)
+ action = "specialUpdate";
+ package_oid = yaz_oid_extserv_database_update;
+ break;
+ default:
+ return 0;
+ }
if (!strcmp(action, "recordInsert"))
action_no = Z_IUOriginPartToKeep_recordInsert;
else
return 0;
- apdu = create_es_package(p, yaz_oid_extserv_database_update);
+ apdu = create_es_package(p, package_oid);
if (apdu)
{
Z_IUOriginPartToKeep *toKeep;
ZOOM_options_get(p->options, "elementSetName");
apdu->u.extendedServicesRequest->taskSpecificParameters = r;
-
- r->direct_reference = odr_oiddup(p->odr_out,
- yaz_oid_extserv_database_update);
+ r->direct_reference = odr_oiddup(p->odr_out, package_oid);
r->descriptor = 0;
r->which = Z_External_update;
r->indirect_reference = 0;