#include "config.hpp"
#include "filter_zoom.hpp"
#include <yaz/zoom.h>
+#include <yaz/yaz-version.h>
#include <yaz/srw.h>
#include <metaproxy/package.hpp>
#include <metaproxy/util.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
+#include <yaz/ccl_xml.h>
#include <yaz/ccl.h>
#include <yaz/rpn2cql.h>
#include <yaz/pquery.h>
bool use_turbomarc;
bool piggyback;
CCL_bibset ccl_bibset;
- Searchable();
+ Searchable(CCL_bibset base);
~Searchable();
};
class Zoom::Backend : boost::noncopyable {
std::string torus_url;
std::map<std::string,std::string> fieldmap;
std::string xsldir;
+ CCL_bibset bibset;
};
}
}
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()
yf::Zoom::Impl::Impl()
{
+ bibset = ccl_qual_mk();
}
yf::Zoom::Impl::~Impl()
{
+ ccl_qual_rm(&bibset);
}
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)
attr->name));
}
}
+ else if (!strcmp((const char *) ptr->name, "cclmap"))
+ {
+ const char *addinfo = 0;
+ ccl_xml_config(bibset, ptr, &addinfo);
+ }
else if (!strcmp((const char *) ptr->name, "fieldmap"))
{
const struct _xmlAttr *attr;
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