strus  0.17
summarizerFunctionInstanceInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_SUMMARIZER_FUNCTION_INSTANCE_INTERFACE_HPP_INCLUDED
11 #define _STRUS_SUMMARIZER_FUNCTION_INSTANCE_INTERFACE_HPP_INCLUDED
13 #include <string>
14 
15 namespace strus
16 {
17 
19 class NumericVariant;
21 class StorageClientInterface;
23 class QueryProcessorInterface;
25 class MetaDataReaderInterface;
27 class SummarizerFunctionContextInterface;
28 
29 
32 {
33 public:
36 
40  virtual void addStringParameter(
41  const std::string& name,
42  const std::string& value)=0;
43 
47  virtual void addNumericParameter(
48  const std::string& name,
49  const NumericVariant& value)=0;
50 
54  virtual void defineResultName(
55  const std::string& resultname,
56  const std::string& itemname)=0;
57 
60  virtual std::vector<std::string> getVariables() const=0;
61 
68  const StorageClientInterface* storage_,
69  MetaDataReaderInterface* metadata_,
70  const GlobalStatistics& stats) const=0;
71 
74  virtual std::string tostring() const=0;
75 };
76 
77 }//namespace
78 #endif
79 
80 
Interface of a strus IR storage.
Definition: storageClientInterface.hpp:52
virtual std::string tostring() const =0
Get a comma ',' separated list of the function parameters as assignments (e.g. name=value) ...
virtual void addStringParameter(const std::string &name, const std::string &value)=0
Add a named string value parameter.
virtual SummarizerFunctionContextInterface * createFunctionContext(const StorageClientInterface *storage_, MetaDataReaderInterface *metadata_, const GlobalStatistics &stats) const =0
Create an execution context for this summarization function instance.
Interface for the summarization execution context.
Definition: summarizerFunctionContextInterface.hpp:26
virtual void defineResultName(const std::string &resultname, const std::string &itemname)=0
Rename a specific result item with a hardcoded name to another name.
virtual ~SummarizerFunctionInstanceInterface()
Destructor.
Definition: summarizerFunctionInstanceInterface.hpp:35
Interface for accessing meta data from a strus storage.
Definition: metaDataReaderInterface.hpp:24
Global document statistics, if passed down with the query.
Definition: globalStatistics.hpp:16
Interface for a parameterized instance of summarization.
Definition: summarizerFunctionInstanceInterface.hpp:31
virtual void addNumericParameter(const std::string &name, const NumericVariant &value)=0
Add a named numeric value parameter.
virtual std::vector< std::string > getVariables() const =0
Get the list of variables used by this function defined in the query with 'QueryInterface::setWeighti...