-/* $Id: filter_cql_to_rpn.cpp,v 1.4 2007-01-16 08:49:05 marc Exp $
- Copyright (c) 2005-2006, Index Data.
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2011 Index Data
- See the LICENSE file for details
- */
+Metaproxy is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "config.hpp"
-#include "util.hpp"
+#include <metaproxy/util.hpp>
-#include "filter.hpp"
-#include "package.hpp"
+#include <metaproxy/filter.hpp>
+#include <metaproxy/package.hpp>
#include "filter_cql_to_rpn.hpp"
-
-#include <yaz/log.h>
+#include <yazpp/z-query.h>
#include <yaz/cql.h>
+#include <yazpp/cql2rpn.h>
#include <yaz/zgdu.h>
-#include <yaz/otherinfo.h>
#include <yaz/diagbib1.h>
#include <yaz/srw.h>
-#include <yazpp/z-query.h>
-#include <yazpp/cql2rpn.h>
namespace mp = metaproxy_1;
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::CQLtoRPN::configure(const xmlNode *xmlnode)
+void yf::CQLtoRPN::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
m_p->configure(xmlnode);
}
}
if (fname.length() == 0)
{
- throw mp::filter::FilterException("Missing conversion spec for "
- "filter cql_rpn");
+ throw mp::filter::FilterException("Missing conversion configuration "
+ "for filter cql_rpn");
}
int error = 0;
if (!m_cql2rpn.parse_spec_file(fname.c_str(), &error))
{
- throw mp::filter::FilterException("Bad or missing CQL to RPN spec "
+ throw mp::filter::FilterException("Bad or missing "
+ "CQL to RPN configuration "
+ fname);
}
}
&addinfo);
if (r == -3)
{
- yaz_log(YLOG_LOG, "No CQL to RPN table");
Z_APDU *f_apdu =
odr.create_searchResponse(
apdu_req,
YAZ_BIB1_TEMPORARY_SYSTEM_ERROR,
- "Missing CQL to RPN spec");
+ "Missing CQL to RPN configuration");
package.response() = f_apdu;
return;
}
{
int error_code = yaz_diag_srw_to_bib1(r);
- yaz_log(YLOG_LOG, "CQL Conversion error %d", r);
Z_APDU *f_apdu =
odr.create_searchResponse(apdu_req, error_code, addinfo);
package.response() = f_apdu;
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
- * c-file-style: "stroustrup"
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
+