00001 /*========================================================================== 00002 * Copyright (c) 2002 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 #ifndef _INDRIDOCUMENTMANAGER_HPP 00013 #define _INDRIDOCUMENTMANAGER_HPP 00014 00022 #include "IndexTypes.hpp" 00023 #include "DocumentManager.hpp" 00024 #include "indri/Repository.hpp" 00025 #include "Match.hpp" 00026 00027 class IndriDocMgr : public DocumentManager { 00028 public: 00029 IndriDocMgr(Repository &repository, string name="IndriDocMgr") : 00030 _repository(repository), _name(name) {} 00031 virtual ~IndriDocMgr() {} 00034 virtual bool open(const string &manname) { 00035 return true; 00036 } 00037 00039 virtual char* getDoc(const EXDOCID_T &docID) const; 00040 00044 vector<Match> getOffsets(const EXDOCID_T &docID) const; 00045 00046 00048 virtual Parser* getParser() const {return NULL;} 00049 00051 virtual void buildMgr() {} 00052 00054 virtual const string &getMyID() const {return _name; } 00055 00056 private: 00057 Repository &_repository; 00058 string _name; 00059 }; 00060 00061 #endif 00062 // _INDRIDOCUMENTMANAGER_HPP