X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Ffilter_cql_to_rpn.cpp;h=08dd4474640c0c0bf20954c0066482d8f86bd345;hb=e9530d6289df9b848e4901d7c73f5a2f27706d66;hp=9b3e20bc910bedb91a5d39d2ef821af940c055ce;hpb=9c4d6a0006e8c99412865e3f3b924345ae782a77;p=metaproxy-moved-to-github.git diff --git a/src/filter_cql_to_rpn.cpp b/src/filter_cql_to_rpn.cpp index 9b3e20b..08dd447 100644 --- a/src/filter_cql_to_rpn.cpp +++ b/src/filter_cql_to_rpn.cpp @@ -1,5 +1,22 @@ -/* $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-2008 Index Data + +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 +*/ +/* $Id: filter_cql_to_rpn.cpp,v 1.8 2008-02-20 15:07:51 adam Exp $ + Copyright (c) 2005-2007, Index Data. See the LICENSE file for details */ @@ -12,15 +29,12 @@ #include "filter_cql_to_rpn.hpp" - -#include +#include #include +#include #include -#include #include #include -#include -#include namespace mp = metaproxy_1; @@ -51,7 +65,7 @@ yf::CQLtoRPN::~CQLtoRPN() { // 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) { m_p->configure(xmlnode); } @@ -108,14 +122,15 @@ void yf::CQLtoRPN::Impl::configure(const xmlNode *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); } } @@ -141,12 +156,11 @@ void yf::CQLtoRPN::Impl::process(mp::Package &package) &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; } @@ -154,7 +168,6 @@ void yf::CQLtoRPN::Impl::process(mp::Package &package) { 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;