00001 /*========================================================================== 00002 * Copyright (c) 2004 University of Massachusetts. 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 // ExtentInsideNode 00015 // 00016 // 23 February 2004 -- tds 00017 // 00018 // The difference between an include node and an 00019 // and node is that in the include node, the inner 00020 // extent must be contained completely within an 00021 // outer extent. 00022 // 00023 00024 #ifndef INDRI_EXTENTINSIDENODE_HPP 00025 #define INDRI_EXTENTINSIDENODE_HPP 00026 00027 #include "indri/ListIteratorNode.hpp" 00028 #include "indri/greedy_vector" 00029 #include "indri/Extent.hpp" 00030 namespace indri 00031 { 00032 namespace infnet 00033 { 00034 00035 class ExtentInsideNode : public ListIteratorNode { 00036 ListIteratorNode* _inner; 00037 ListIteratorNode* _outer; 00038 indri::utility::greedy_vector<indri::index::Extent> _extents; 00039 std::string _name; 00040 00041 public: 00042 ExtentInsideNode( const std::string& name, ListIteratorNode* inner, ListIteratorNode* outer ); 00043 00044 void prepare( lemur::api::DOCID_T documentID ); 00045 const indri::utility::greedy_vector<indri::index::Extent>& extents(); 00046 lemur::api::DOCID_T nextCandidateDocument(); 00047 void indexChanged( indri::index::Index& index ); 00048 00049 const std::string& getName() const; 00050 void annotate( class Annotator& annotator, lemur::api::DOCID_T documentID, indri::index::Extent &extent ); 00051 }; 00052 } 00053 } 00054 00055 #endif // INDRI_EXTENTISIDENODE_HPP 00056