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.cs.cmu.edu/~lemur/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 00013 #ifndef _DOCUMENT_HPP 00014 #define _DOCUMENT_HPP 00015 00016 #include "Term.hpp" 00017 #include "DocumentProps.hpp" 00018 00020 00021 class TokenTerm : public Term { 00022 public: 00023 00025 virtual const char *spelling() = 0; 00026 }; 00027 00028 00030 00037 class Document { 00038 public: 00039 virtual ~Document() {}; 00040 00042 virtual char *getID() const =0; 00043 00044 00046 virtual void startTermIteration()=0; 00047 00049 virtual bool hasMore() = 0; 00050 00052 virtual TokenTerm *nextTerm()=0; 00053 00055 virtual DocumentProps *property() { 00056 return (props); 00057 } 00058 private: 00059 DocumentProps *props; 00060 }; 00061 00062 00063 #endif 00064 00065 00066 00067 00068