-/* $Id: filter_record_transform.cpp,v 1.13 2007-12-16 22:22:49 adam Exp $
- Copyright (c) 2005-2007, Index Data.
-
-This file is part of Metaproxy.
+/* This file is part of Metaproxy.
+ Copyright (C) 2005-2011 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
for more details.
You should have received a copy of the GNU General Public License
-along with Metaproxy; see the file LICENSE. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
- */
+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 "filter.hpp"
#include "filter_record_transform.hpp"
-#include "package.hpp"
-#include "util.hpp"
+#include <metaproxy/package.hpp>
+#include <metaproxy/util.hpp>
#include "gduutil.hpp"
-#include "xmlutil.hpp"
#include <yaz/diagbib1.h>
#include <yaz/zgdu.h>
#include <yaz/retrieval.h>
-//#include <boost/thread/mutex.hpp>
-
#include <iostream>
namespace mp = metaproxy_1;
Impl();
~Impl();
void process(metaproxy_1::Package & package) const;
- void configure(const xmlNode * xml_node);
+ void configure(const xmlNode * xml_node, const char *path);
private:
yaz_retrieval_t m_retrieval;
};
{ // must have a destructor because of boost::scoped_ptr
}
-void yf::RecordTransform::configure(const xmlNode *xmlnode)
+void yf::RecordTransform::configure(const xmlNode *xmlnode, bool test_only,
+ const char *path)
{
- m_p->configure(xmlnode);
+ m_p->configure(xmlnode, path);
}
void yf::RecordTransform::process(mp::Package &package) const
yaz_retrieval_destroy(m_retrieval);
}
-void yf::RecordTransform::Impl::configure(const xmlNode *xml_node)
+void yf::RecordTransform::Impl::configure(const xmlNode *xml_node,
+ const char *path)
{
- //const char *srcdir = getenv("srcdir");
- //if (srcdir)
- // yaz_retrieval_set_path(m_retrieval, srcdir);
+ yaz_retrieval_set_path(m_retrieval, path);
if (!xml_node)
throw mp::XMLError("RecordTransform filter config: empty XML DOM");
|| !gdu_res->u.z3950->u.presentResponse)
{
- std::cout << "record-transform: error back present\n";
package.session().close();
return;
}
/*
* 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
*/
+