From: Adam Dickmeiss Date: Sun, 9 Jan 2005 21:52:48 +0000 (+0000) Subject: Added whereInList member to SRW Scan Term X-Git-Tag: YAZ.2.0.32~6 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=d62fb74edd3775095d23f2bffbace2b60cd3c57f;p=yaz-moved-to-github.git Added whereInList member to SRW Scan Term --- diff --git a/NEWS b/NEWS index e06f81e..3042cd6 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ Possible compatibility problems with earlier versions marked with '*'. +* Added whereInList member to SRW Scan Term. + Added support for SRW scan in yaz-client. * Changed Z_SRW_scanRequest to be able to carry both CCL and PQF. diff --git a/client/client.c b/client/client.c index b925810..e0ac407 100644 --- a/client/client.c +++ b/client/client.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 1995-2004, Index Data + * Copyright (c) 1995-2005, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.265 2005-01-08 01:20:18 adam Exp $ + * $Id: client.c,v 1.266 2005-01-09 21:52:48 adam Exp $ */ #include @@ -3520,11 +3520,17 @@ static void handle_srw_response(Z_SRW_searchRetrieveResponse *res) static void handle_srw_scan_term(Z_SRW_scanTerm *term) { if (term->displayTerm) - printf ("%s: ", term->displayTerm); - if (term->value) - printf ("%s: ", term->value); + printf("%s:", term->displayTerm); + else if (term->value) + printf("%s:", term->value); + else + printf("No value:"); if (term->numberOfRecords) - printf ("%d", *term->numberOfRecords); + printf(" %d", *term->numberOfRecords); + if (term->whereInList) + printf(" %s", term->whereInList); + if (term->value && term->displayTerm) + printf(" %s", term->value); printf("\n"); } diff --git a/include/yaz/srw.h b/include/yaz/srw.h index df27631..6a9781d 100644 --- a/include/yaz/srw.h +++ b/include/yaz/srw.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 2002-2004, Index Data. + * Copyright (c) 2002-2005, Index Data. * See the file LICENSE for details. * - * $Id: srw.h,v 1.18 2005-01-08 01:20:18 adam Exp $ + * $Id: srw.h,v 1.19 2005-01-09 21:52:48 adam Exp $ */ /** * \file srw.h @@ -106,6 +106,7 @@ typedef struct { char *value; int *numberOfRecords; char *displayTerm; + char *whereInList; } Z_SRW_scanTerm; typedef struct { diff --git a/src/srw.c b/src/srw.c index 0461f2f..d1916aa 100644 --- a/src/srw.c +++ b/src/srw.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 2002-2004, Index Data. + * Copyright (c) 2002-2005, Index Data. * See the file LICENSE for details. * - * $Id: srw.c,v 1.29 2005-01-08 01:20:19 adam Exp $ + * $Id: srw.c,v 1.30 2005-01-09 21:52:49 adam Exp $ */ /** * \file srw.c @@ -353,6 +353,7 @@ static int yaz_srw_term(ODR o, xmlNodePtr pptr, Z_SRW_scanTerm *term, term->value = 0; term->numberOfRecords = 0; term->displayTerm = 0; + term->whereInList = 0; for (ptr = pptr->children; ptr; ptr = ptr->next) { if (match_xsd_string(ptr, "value", o, &term->value)) @@ -363,6 +364,9 @@ static int yaz_srw_term(ODR o, xmlNodePtr pptr, Z_SRW_scanTerm *term, else if (match_xsd_string(ptr, "displayTerm", o, &term->displayTerm)) ; + else if (match_xsd_string(ptr, "whereInList", o, + &term->whereInList)) + ; } } else if (o->direction == ODR_ENCODE) @@ -371,6 +375,7 @@ static int yaz_srw_term(ODR o, xmlNodePtr pptr, Z_SRW_scanTerm *term, add_xsd_string(ptr, "value", term->value); add_xsd_integer(ptr, "value", term->numberOfRecords); add_xsd_string(ptr, "displayTerm", term->displayTerm); + add_xsd_string(ptr, "whereInList", term->whereInList); } return 0; }