From: Adam Dickmeiss Date: Fri, 17 Jun 2011 10:18:47 +0000 (+0200) Subject: Allow local ccl maps to be given (as base) X-Git-Tag: v1.2.7~14 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=2274da63f443fefed5ac36848f9a695d32d0cd0d;p=metaproxy-moved-to-github.git Allow local ccl maps to be given (as base) Element cclmap specifies a CCL mapping to a core CCL bibset and is used as base point for all search sessions. This feature requires new YAZ utiolity ccl_qual_dup. --- diff --git a/etc/config-zoom.xml b/etc/config-zoom.xml index 481b8b9..8335b30 100644 --- a/etc/config-zoom.xml +++ b/etc/config-zoom.xml @@ -39,6 +39,12 @@ + + + + + + diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index 2544189..a90bf97 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "config.hpp" #include "filter_zoom.hpp" #include +#include #include #include #include @@ -61,7 +62,7 @@ namespace metaproxy_1 { bool use_turbomarc; bool piggyback; CCL_bibset ccl_bibset; - Searchable(); + Searchable(CCL_bibset base); ~Searchable(); }; class Zoom::Backend : boost::noncopyable { @@ -244,11 +245,11 @@ const char *yf::Zoom::Backend::get_option(const char *name) return ZOOM_connection_option_get(m_connection, name); } -yf::Zoom::Searchable::Searchable() +yf::Zoom::Searchable::Searchable(CCL_bibset base) { piggyback = true; use_turbomarc = true; - ccl_bibset = ccl_qual_mk(); + ccl_bibset = ccl_qual_dup(base); } yf::Zoom::Searchable::~Searchable() @@ -338,7 +339,7 @@ yf::Zoom::SearchablePtr yf::Zoom::Impl::parse_torus(const xmlNode *ptr1) continue; if (!strcmp((const char *) ptr2->name, "layer")) { - Zoom::SearchablePtr s(new Searchable); + Zoom::SearchablePtr s(new Searchable(bibset)); const xmlNode *ptr3 = ptr2; for (ptr3 = ptr3->children; ptr3; ptr3 = ptr3->next) @@ -473,10 +474,6 @@ void yf::Zoom::Impl::configure(const xmlNode *ptr, bool test_only) if (cql_field.length()) fieldmap[cql_field] = ccl_field; } - else if (!strcmp((const char *) ptr->name, "records")) - { - yaz_log(YLOG_WARN, "records ignored!"); - } else { throw mp::filter::FilterException