Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

NetworkServerProxy.hpp

Go to the documentation of this file.
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 // NetworkServerProxy
00015 //
00016 // 23 March 2004 -- tds
00017 //
00018 
00019 #ifndef INDRI_NETWORKSERVERPROXY_HPP
00020 #define INDRI_NETWORKSERVERPROXY_HPP
00021 
00022 #include "indri/XMLNode.hpp"
00023 #include "indri/XMLWriter.hpp"
00024 #include "indri/QueryResponseUnpacker.hpp"
00025 #include "indri/QueryServer.hpp"
00026 #include "indri/Packer.hpp"
00027 #include "indri/NetworkMessageStream.hpp"
00028 #include "indri/Buffer.hpp"
00029 
00030 class NetworkServerProxy : public QueryServer {
00031 private:
00032   NetworkMessageStream* _stream;
00033 
00034 public:
00035   NetworkServerProxy( NetworkMessageStream* stream );
00036 
00037   QueryServerResponse* runQuery( std::vector<indri::lang::Node*>& roots, int resultsRequested, bool optimize );
00038   QueryServerDocumentsResponse* documents( const std::vector<int>& documentIDs );
00039   QueryServerMetadataResponse* documentMetadata( const std::vector<int>& documentIDs, const std::string& attributeName );
00040 
00041   // terms -- implemented (but not on stub)
00042   INT64 termCount();
00043   INT64 termCount( int term );
00044   INT64 termCount( const std::string& term );
00045   INT64 stemCount( const std::string& stem );
00046   std::string termName( int term );
00047   int termID( const std::string& term );
00048 
00049   // fields
00050   std::vector<std::string> fieldList(); // unimpl
00051   INT64 termFieldCount( int term, const std::string& field );
00052   INT64 termFieldCount( const std::string& term, const std::string& field );
00053   INT64 stemFieldCount( const std::string& stem, const std::string& field );
00054 
00055   // documents
00056   int documentLength( int documentID );
00057   INT64 documentCount();
00058   INT64 documentCount( const std::string& term );
00059 
00060   // document vector
00061   QueryServerVectorsResponse* documentVectors( const std::vector<int>& documentIDs );
00062 };
00063 
00064 #endif // INDRI_NETWORKSERVERPROXY_HPP

Generated on Wed Nov 3 12:59:00 2004 for Lemur Toolkit by doxygen1.2.18