-/* $Id: d1_doespec.c,v 1.13 2007-04-16 08:44:31 adam Exp $
+/* $Id: d1_doespec.c,v 1.14 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
Z_Variant *vreq =
e->elements[i]->u.simpleElement->variantRequest;
- const int *var_oid = yaz_oid_variant1();
+ const int *var_oid = yaz_oid_varset_variant_1;
if (!vreq)
vreq = e->defaultVariantRequest;
-/* $Id: d1_espec.c,v 1.14 2007-04-16 08:44:31 adam Exp $
+/* $Id: d1_espec.c,v 1.15 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
Z_Variant *r = (Z_Variant *)nmem_malloc(nmem, sizeof(*r));
int i;
- r->globalVariantSetId = odr_oiddup_nmem(nmem, yaz_oid_variant1());
+ r->globalVariantSetId = odr_oiddup_nmem(nmem, yaz_oid_varset_variant_1);
if (argc)
r->triples = (Z_Triple **)nmem_malloc(nmem, sizeof(Z_Triple*) * argc);
else
-/* $Id: alvis.c,v 1.16 2007-04-16 08:44:31 adam Exp $
+/* $Id: alvis.c,v 1.17 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
{
p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS;
}
- else if (!p->input_format || !oid_oidcmp(p->input_format, yaz_oid_xml()))
+ else if (!p->input_format
+ || !oid_oidcmp(p->input_format, yaz_oid_recsyn_xml))
{
xmlChar *buf_out;
int len_out;
else
xmlDocDumpMemory(resDoc, &buf_out, &len_out);
- p->output_format = yaz_oid_xml();
+ p->output_format = yaz_oid_recsyn_xml;
p->rec_len = len_out;
p->rec_buf = odr_malloc(p->odr, p->rec_len);
memcpy(p->rec_buf, buf_out, p->rec_len);
xmlFree(buf_out);
}
- else if (!oid_oidcmp(p->output_format, yaz_oid_sutrs()))
+ else if (!oid_oidcmp(p->output_format, yaz_oid_recsyn_sutrs))
{
xmlChar *buf_out;
int len_out;
else
xmlDocDumpMemory(resDoc, &buf_out, &len_out);
- p->output_format = yaz_oid_sutrs();
+ p->output_format = yaz_oid_recsyn_sutrs;
p->rec_len = len_out;
p->rec_buf = odr_malloc(p->odr, p->rec_len);
memcpy(p->rec_buf, buf_out, p->rec_len);
-/* $Id: attribute.c,v 1.29 2007-04-16 08:44:31 adam Exp $
+/* $Id: attribute.c,v 1.30 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
if (zebra_attr_list_get_ord(
zh, sortAttributes->list,
zinfo_index_category_sort,
- -1 /* any index */, yaz_oid_attset_bib1(), ord) == ZEBRA_OK)
+ -1 /* any index */, yaz_oid_attset_bib_1, ord) == ZEBRA_OK)
return ZEBRA_OK;
return ZEBRA_FAIL;
}
-/* $Id: mod_dom.c,v 1.35 2007-04-16 08:44:31 adam Exp $
+/* $Id: mod_dom.c,v 1.36 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
{
p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS;
}
- else if (!p->input_format || !oid_oidcmp(p->input_format, yaz_oid_xml()))
+ else if (!p->input_format
+ || !oid_oidcmp(p->input_format, yaz_oid_recsyn_xml))
{
xmlChar *buf_out;
int len_out;
else
xmlDocDumpMemory(doc, &buf_out, &len_out);
- p->output_format = yaz_oid_xml();
+ p->output_format = yaz_oid_recsyn_xml;
p->rec_len = len_out;
p->rec_buf = odr_malloc(p->odr, p->rec_len);
memcpy(p->rec_buf, buf_out, p->rec_len);
xmlFree(buf_out);
}
- else if (!oid_oidcmp(p->output_format, yaz_oid_sutrs()))
+ else if (!oid_oidcmp(p->output_format, yaz_oid_recsyn_sutrs))
{
xmlChar *buf_out;
int len_out;
else
xmlDocDumpMemory(doc, &buf_out, &len_out);
- p->output_format = yaz_oid_sutrs();
+ p->output_format = yaz_oid_recsyn_sutrs;
p->rec_len = len_out;
p->rec_buf = odr_malloc(p->odr, p->rec_len);
memcpy(p->rec_buf, buf_out, p->rec_len);
-/* $Id: recgrs.c,v 1.17 2007-04-16 08:44:32 adam Exp $
+/* $Id: recgrs.c,v 1.18 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
NMEM mem;
struct grs_read_info gri;
const char *tagname;
- const int *xml_oid = yaz_oid_xml();
- const int *grs1_oid = yaz_oid_grs1();
const int *requested_schema = 0;
data1_marctab *marctab;
if (!p->input_format)
{ /* SUTRS is default input_format */
- p->input_format = yaz_oid_sutrs();
+ p->input_format = yaz_oid_recsyn_sutrs;
}
assert(p->input_format);
- if (!oid_oidcmp(p->input_format, xml_oid))
+ if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_xml))
zebra_xml_metadata (p, top, mem);
#if 0
}
yaz_log(YLOG_DEBUG, "grs_retrieve: schemaIdentifier");
if (node->u.root.absyn && node->u.root.absyn->oid
- && !oid_oidcmp(p->input_format, grs1_oid))
+ && !oid_oidcmp(p->input_format, yaz_oid_recsyn_grs_1))
{
char oid_str[OID_STR_MAX];
char *dot_str = oid_oid_to_dotstring(node->u.root.absyn->oid, oid_str);
p->output_format = p->input_format;
assert(p->input_format);
- if (!oid_oidcmp(p->input_format, yaz_oid_xml()))
+ if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_xml))
{
#if 0
data1_pr_tree (p->dh, node, stdout);
p->rec_buf = new_buf;
}
}
- else if (!oid_oidcmp(p->input_format, yaz_oid_grs1()))
+ else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_grs_1))
{
data1_iconv (p->dh, mem, node, "UTF-8", data1_get_encoding(p->dh, node));
dummy = 0;
else
p->rec_len = -1;
}
- else if (!oid_oidcmp(p->input_format, yaz_oid_explain()))
+ else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_explain))
{
/* ensure our data1 tree is UTF-8 */
data1_iconv (p->dh, mem, node, "UTF-8", data1_get_encoding(p->dh, node));
else
p->rec_len = -1;
}
- else if (!oid_oidcmp(p->input_format, yaz_oid_summary()))
+ else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_summary))
{
/* ensure our data1 tree is UTF-8 */
data1_iconv (p->dh, mem, node, "UTF-8", data1_get_encoding(p->dh, node));
else
p->rec_len = -1;
}
- else if (!oid_oidcmp(p->input_format, yaz_oid_sutrs()))
+ else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_sutrs))
{
if (p->encoding)
data1_iconv (p->dh, mem, node, p->encoding,
p->rec_buf = new_buf;
}
}
- else if (!oid_oidcmp(p->input_format, yaz_oid_soif()))
+ else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_soif))
{
if (p->encoding)
data1_iconv (p->dh, mem, node, p->encoding,
-/* $Id: rectext.c,v 1.5 2007-04-16 08:44:32 adam Exp $
+/* $Id: rectext.c,v 1.6 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
filter_ptr = p-filter_buf;
}
}
- p->output_format = yaz_oid_sutrs();
+ p->output_format = yaz_oid_recsyn_sutrs;
p->rec_buf = filter_buf;
p->rec_len = filter_ptr;
return 0;
-/* $Id: retrieve.c,v 1.68 2007-04-16 08:44:32 adam Exp $
+/* $Id: retrieve.c,v 1.69 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
int ord;
/* only accept XML and SUTRS requests */
- if (oid_oidcmp(input_format, yaz_oid_xml())
- && oid_oidcmp(input_format, yaz_oid_sutrs()))
+ if (oid_oidcmp(input_format, yaz_oid_recsyn_xml)
+ && oid_oidcmp(input_format, yaz_oid_recsyn_sutrs))
{
yaz_log(YLOG_WARN, "unsupported format for element set zebra::%s",
elemsetname);
zebra_term_untrans(zh, index_type, dst_buf, str);
- if (!oid_oidcmp(input_format, yaz_oid_xml()))
+ if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml))
{
- *output_format = yaz_oid_xml();
+ *output_format = yaz_oid_recsyn_xml;
wrbuf_printf(wrbuf, ZEBRA_XML_HEADER_STR
" sysno=\"" ZINT_FORMAT "\""
" set=\"zebra::index%s/\">\n",
wrbuf_printf(wrbuf, "</index>\n");
wrbuf_printf(wrbuf, "</record>\n");
}
- else if (!oid_oidcmp(input_format, yaz_oid_sutrs()))
+ else if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs))
{
- *output_format = yaz_oid_sutrs();
+ *output_format = yaz_oid_recsyn_sutrs;
wrbuf_printf(wrbuf, "%s %c %s\n", string_index, index_type,
dst_buf);
/* *rec_lenp = 0; */
/* only accept XML and SUTRS requests */
- if (oid_oidcmp(input_format, yaz_oid_xml())
- && oid_oidcmp(input_format, yaz_oid_sutrs()))
+ if (oid_oidcmp(input_format, yaz_oid_recsyn_xml)
+ && oid_oidcmp(input_format, yaz_oid_recsyn_sutrs))
{
yaz_log(YLOG_WARN, "unsupported format for element set zebra::%s",
elemsetname);
struct it_key key_in;
WRBUF wrbuf = wrbuf_alloc();
- if (!oid_oidcmp(input_format, yaz_oid_xml()))
+ if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml))
{
*output_format = input_format;
wrbuf_printf(wrbuf, ZEBRA_XML_HEADER_STR
" set=\"zebra::index%s/\">\n",
sysno, elemsetname);
}
- else if (!oid_oidcmp(input_format, yaz_oid_sutrs()))
+ else if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs))
*output_format = input_format;
while (zebra_rec_keys_read(keys, &str, &slen, &key_in))
zebra_term_untrans(zh, index_type, dst_buf, str);
if (strlen(dst_buf))
{
- if (!oid_oidcmp(input_format, yaz_oid_xml()))
+ if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml))
{
wrbuf_printf(wrbuf, " <index name=\"%s\"",
string_index);
}
}
}
- if (!oid_oidcmp(input_format, yaz_oid_xml()))
+ if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml))
wrbuf_printf(wrbuf, "</record>\n");
*rec_lenp = wrbuf_len(wrbuf);
*rec_bufp = odr_malloc(odr, *rec_lenp);
{
int ret = 0;
WRBUF wrbuf = wrbuf_alloc();
- if (!oid_oidcmp(input_format, yaz_oid_sutrs()))
+ if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs))
{
wrbuf_printf(wrbuf, ZINT_FORMAT, sysno);
*output_format = input_format;
}
- else if (!oid_oidcmp(input_format, yaz_oid_xml()))
+ else if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml))
{
wrbuf_printf(wrbuf, ZEBRA_XML_HEADER_STR
" sysno=\"" ZINT_FORMAT "\"/>\n",
}
/* only accept XML and SUTRS requests from now */
- if (oid_oidcmp(input_format, yaz_oid_xml())
- && oid_oidcmp(input_format, yaz_oid_sutrs()))
+ if (oid_oidcmp(input_format, yaz_oid_recsyn_xml)
+ && oid_oidcmp(input_format, yaz_oid_recsyn_sutrs))
{
yaz_log(YLOG_WARN, "unsupported format for element set zebra::%s",
elemsetname);
WRBUF wrbuf = wrbuf_alloc();
RecordAttr *recordAttr = rec_init_attr(zh->reg->zei, rec);
- if (!oid_oidcmp(input_format, yaz_oid_xml()))
+ if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml))
{
*output_format = input_format;
recordAttr->recordSize,
elemsetname);
}
- else if (!oid_oidcmp(input_format, yaz_oid_sutrs()))
+ else if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs))
{
*output_format = input_format;
wrbuf_printf(wrbuf, "sysno " ZINT_FORMAT "\n", sysno);
-/* $Id: rpnscan.c,v 1.7 2007-04-16 08:44:32 adam Exp $
+/* $Id: rpnscan.c,v 1.8 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
*is_partial = 0;
if (!attributeset)
- attributeset = yaz_oid_attset_bib1();
+ attributeset = yaz_oid_attset_bib_1;
if (!limit_set) /* no limit set given already */
{
-/* $Id: safari.c,v 1.6 2007-04-16 08:44:32 adam Exp $
+/* $Id: safari.c,v 1.7 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
filter_ptr = p-filter_buf;
}
}
- p->output_format = yaz_oid_sutrs();
+ p->output_format = yaz_oid_recsyn_sutrs;
p->rec_buf = filter_buf;
p->rec_len = filter_ptr;
return 0;
-/* $Id: zebraapi.c,v 1.253 2007-04-16 08:44:32 adam Exp $
+/* $Id: zebraapi.c,v 1.254 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
if (poset[i].term)
{
recs[i].errCode = 0;
- recs[i].format = yaz_oid_sutrs();
+ recs[i].format = yaz_oid_recsyn_sutrs;
recs[i].len = strlen(poset[i].term);
recs[i].buf = poset[i].term;
recs[i].base = poset[i].db;
}
else
{
- res = zebra_scan(zh, stream, zapt, yaz_oid_attset_bib1(),
+ res = zebra_scan(zh, stream, zapt, yaz_oid_attset_bib_1,
position, num_entries, entries, is_partial,
setname);
}
-/* $Id: zebrash.c,v 1.45 2007-04-16 08:44:32 adam Exp $
+/* $Id: zebrash.c,v 1.46 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
for (i=0;i<nrecs;i++)
recs[i].position=start+i;
- rc = zebra_records_retrieve (zh, odr, setname,
- pcomp, yaz_oid_xml(), nrecs,recs);
+ rc = zebra_records_retrieve(zh, odr, setname,
+ pcomp, yaz_oid_recsyn_xml, nrecs,recs);
if (0==rc)
{
for (i=0;i<nrecs;i++)
-/* $Id: zebrasrv.c,v 1.13 2007-04-16 08:44:32 adam Exp $
+/* $Id: zebrasrv.c,v 1.14 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
r->search_info->list[0]->which = Z_OtherInfo_externallyDefinedInfo;
ext = odr_malloc (r->stream, sizeof(*ext));
r->search_info->list[0]->information.externallyDefinedInfo = ext;
- ext->direct_reference = odr_oiddup(r->stream, yaz_oid_search_result_1());
+ ext->direct_reference = odr_oiddup(r->stream,
+ yaz_oid_userinfo_searchresult_1);
ext->indirect_reference = 0;
ext->descriptor = 0;
ext->which = Z_External_searchResult1;
-/* $Id: t16.c,v 1.10 2007-04-16 08:44:32 adam Exp $
+/* $Id: t16.c,v 1.11 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
YAZ_CHECK_EQ(res, ZEBRA_OK);
YAZ_CHECK_EQ(hits, 1);
- YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::data", yaz_oid_xml(),
+ YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::data", yaz_oid_recsyn_xml,
"mismatch"), ZEBRA_FAIL);
- YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::data", yaz_oid_sutrs(),
+ YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::data", yaz_oid_recsyn_sutrs,
myrec[0]), ZEBRA_OK);
- YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::data", yaz_oid_xml(),
+ YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::data", yaz_oid_recsyn_xml,
myrec[0]), ZEBRA_OK);
-
- YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::meta::sysno", yaz_oid_sutrs(),
+
+ YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::meta::sysno",
+ yaz_oid_recsyn_sutrs,
"2"), ZEBRA_OK);
- YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::meta::sysno", yaz_oid_xml(),
+ YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::meta::sysno",
+ yaz_oid_recsyn_xml,
zebra_xml_sysno), ZEBRA_OK);
- YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::meta", yaz_oid_xml(),
+ YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::meta", yaz_oid_recsyn_xml,
zebra_xml_meta), ZEBRA_OK);
YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::index::title:p",
- yaz_oid_xml(),
+ yaz_oid_recsyn_xml,
zebra_xml_index_title_p), ZEBRA_OK);
YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::nonexistent",
- yaz_oid_xml(), ""), ZEBRA_OK);
+ yaz_oid_recsyn_xml, ""), ZEBRA_OK);
YAZ_CHECK_EQ(fetch_first_compare(zh, "zebra::index::nonexistent",
- yaz_oid_xml(), ""), ZEBRA_OK);
+ yaz_oid_recsyn_xml, ""), ZEBRA_OK);
YAZ_CHECK(tl_close_down(zh, zs));
}
-/* $Id: t4.c,v 1.23 2007-04-16 08:44:32 adam Exp $
+/* $Id: t4.c,v 1.24 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
retrievalRecord[j].position = j+1;
ret = zebra_records_retrieve(zh, odr_output, setname, 0,
- yaz_oid_xml(), number_to_fetch,
+ yaz_oid_recsyn_xml, number_to_fetch,
retrievalRecord);
if (ret != ZEBRA_OK)
{
-/* $Id: testlib.c,v 1.43 2007-04-16 08:44:32 adam Exp $
+/* $Id: testlib.c,v 1.44 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
odr_output = odr_createmem(ODR_ENCODE);
rc = zebra_records_retrieve(zh, odr_output, setname, 0,
- yaz_oid_xml(), exphits, retrievalRecord);
+ yaz_oid_recsyn_xml, exphits, retrievalRecord);
if (rc != ZEBRA_OK)
ret = 0;
else if (!strstr(retrievalRecord[0].buf, firstrec))