From: Dennis Schafroth Date: Thu, 15 Jul 2010 12:38:21 +0000 (+0200) Subject: get Facet_List from OtherInformation X-Git-Tag: v4.0.12~53 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=b393fdf5e78549672d42e5292f99697c9d0feb76;p=yaz-moved-to-github.git get Facet_List from OtherInformation --- 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