00001 /*========================================================================== 00002 * Copyright (c) 2001 Carnegie Mellon University. All Rights Reserved. 00003 * 00004 * Use of the Lemur Toolkit for Language Modeling and Information Retrieval 00005 * is subject to the terms of the software license set forth in the LICENSE 00006 * file included with this software, and also available at 00007 * http://www.lemurproject.org/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 00013 00014 #ifndef _LEMURDBMANAGER_HPP 00015 #define _LEMURDBMANAGER_HPP 00016 #include "IndexManager.hpp" 00017 00018 #include "DBManager.hpp" 00019 00020 #include "InvFPIndex.hpp" 00021 00022 #include "RetrievalMethod.hpp" 00023 #include "LemurMemParser.hpp" 00024 #include "RetMethodManager.hpp" 00025 00029 class LemurDBManager : public DBManager { 00030 00031 public: 00034 void open(const string &dbname); 00035 00037 results_t * query (const char * query, int numdocs) const; 00038 00041 MemParser * getParser() const; 00042 00044 doc_t * getDoc(const docid_t docid) const; 00045 00047 void output(const docid_t docid) const; 00049 void setOutputFile(const string &filename) const; 00050 00052 void close(); 00053 00054 private: 00055 00056 Index * index; 00057 RetrievalMethod * model; 00058 ScoreAccumulator * accumulator; 00059 IndexedRealVector * results; 00060 LemurMemParser * parser; 00061 mutable ofstream * outfile; 00062 00063 }; 00064 00065 #endif