From b393fdf5e78549672d42e5292f99697c9d0feb76 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 15 Jul 2010 14:38:21 +0200 Subject: [PATCH] get Facet_List from OtherInformation --- src/otherinfo.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/otherinfo.c b/src/otherinfo.c index 9d7e083..7fa2635 100644 --- a/src/otherinfo.c +++ b/src/otherinfo.c @@ -197,6 +197,24 @@ void yaz_oi_set_facetlist_oid ( oi->information.externallyDefinedInfo = z_external; } +Z_FacetList *yaz_oi_get_facetlist_oid ( + Z_OtherInformation **otherInformation, ODR odr, + const Odr_oid *oid, int categoryValue, int delete_flag) +{ + Z_External *z_external = 0; + Z_OtherInformationUnit *oi = + yaz_oi_update(otherInformation, odr, oid, categoryValue, delete_flag); + if (!oi) + return 0; + z_external = oi->information.externallyDefinedInfo; + + if (z_external && z_external->which == Z_External_userFacets) { + return z_external->u.facetList; + } + return 0; +} + + /* * Local variables: * c-basic-offset: 4 -- 1.7.10.4