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 // NestedExtentInsideNode 00015 // 00016 // 30 Aug 2005 - pto 00017 // 00018 // Behaves the same as a ExtentInsideNode, but has added logic that allows 00019 // for nodes in the inner list to be nested, rather than assuming they will 00020 // be non-overlapping. 00021 // 00022 00023 #ifndef INDRI_NESTEDEXTENTINSIDENODE_HPP 00024 #define INDRI_NESTEDEXTENTINSIDENODE_HPP 00025 00026 #include "indri/ListIteratorNode.hpp" 00027 #include "indri/greedy_vector" 00028 #include "indri/Extent.hpp" 00029 namespace indri 00030 { 00031 namespace infnet 00032 { 00033 00034 class NestedExtentInsideNode : public ListIteratorNode { 00035 ListIteratorNode* _inner; 00036 ListIteratorNode* _outer; 00037 indri::utility::greedy_vector<indri::index::Extent> _extents; 00038 std::string _name; 00039 00040 public: 00041 NestedExtentInsideNode( const std::string& name, ListIteratorNode* inner, ListIteratorNode* outer ); 00042 00043 void prepare( lemur::api::DOCID_T documentID ); 00044 const indri::utility::greedy_vector<indri::index::Extent>& extents(); 00045 lemur::api::DOCID_T nextCandidateDocument(); 00046 void indexChanged( indri::index::Index& index ); 00047 00048 const std::string& getName() const; 00049 void annotate( class Annotator& annotator, lemur::api::DOCID_T documentID, indri::index::Extent &extent ); 00050 }; 00051 } 00052 } 00053 00054 #endif // INDRI_NESTEDEXTENTISIDENODE_HPP 00055