Debian Codegraph @

Source/Reasoner/Answerer/Conclusion/CVariableBindingsQueryResultWriter.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_REASONER_ANSWERER_CONCLUSION_CVARIABLEBINDINGSQUERYRESULTWRITER_H
22 #define KONCLUDE_REASONER_ANSWERER_CONCLUSION_CVARIABLEBINDINGSQUERYRESULTWRITER_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "ConclusionSettings.h"
29
30
31 // Other includes
32 #include "Reasoner/Query/CVariableBindingResult.h"
33 #include "Reasoner/Query/CComplexVariablesAnsweringQuery.h"
34 #include "Reasoner/Query/CVariableBindingStringDataResult.h"
35 #include "Reasoner/Query/CVariableBindingStringResult.h"
36 #include "Reasoner/Query/CVariableBindingsAnswersResult.h"
37 #include "Reasoner/Query/CVariableBindingsListAnswerResult.h"
38
39 #include "Reasoner/Answerer/CComplexQueryExpressionProcessingData.h"
40
41 // Logger includes
42 #include "Logger/CLogger.h"
43
44
45 namespace Konclude {
46
47 namespace Reasoner {
48
49 using namespace Query;
50
51 namespace Answerer {
52
53 namespace Conclusion {
54
55 /*!
56 *
57 * \class CVariableBindingsQueryResultWriter
58 * \author Andreas Steigmiller
59 * \version 0.1
60 * \brief TODO
61 *
62 */
63 class CVariableBindingsQueryResultWriter {
64 // public methods
65 public:
66 //! Constructor
67 CVariableBindingsQueryResultWriter();
68
69 virtual ~CVariableBindingsQueryResultWriter();
70
71 CVariableBindingResult* createVariableBindingResult(CComplexVariablesAnsweringQuery* query, bool dataliteral);
72 CVariableBindingResult* createVariableBindingResult(CDataLiteral* dataLiteral, CComplexVariablesAnsweringQuery* query);
73 CVariableBindingResult* createVariableBindingResult(CIndividual* individual, CComplexVariablesAnsweringQuery* query);
74 CVariableBindingResult* createVariableBindingResult(CConcept* concept, CComplexVariablesAnsweringQuery* query);
75 CVariableBindingResult* createVariableBindingResult(CRole* role, CComplexVariablesAnsweringQuery* query);
76
77 CVariableBindingResult* createVariableBindingResult(const CIndividualReference& indiRef, CComplexVariablesAnsweringQuery* query, CIndividualNameResolver* indiNameResolver);
78 CVariableBindingResult* createVariableBindingResult(const CIndividualReference& indiRef, CComplexVariablesAnsweringQuery* query, const QString& resolvedIndiName);
79
80 CVariableBindingsAnswersResult* addVariableBindingAnswerToResult(CVariableBindingsAnswersResult* bindsAnswersResult, CVariableBindingsListAnswerResult* bindAns, CVariableBindingFilteringAnswerMapping* filteringAnsweringMapping, CComplexVariablesAnsweringQuery* compAssIndVarQuery, cint64 cardinality = 1);
81 CVariableBindingsAnswersResult* addReusedVariableBindingAnswerToResult(CVariableBindingsAnswersResult* bindsAnswersResult, CVariableBindingsListAnswerResult* bindAns, CVariableBindingFilteringAnswerMapping* filteringAnsweringMapping, CComplexVariablesAnsweringQuery* compAssIndVarQuery, cint64 cardinality = 1);
82 CVariableBindingsAnswersResult* addReusedVariableBindingAnswerToResultConsideringOffsetLimit(CVariableBindingsAnswersResult* bindsAnswersResult, CVariableBindingsListAnswerResult* bindAns, CVariableBindingFilteringAnswerMapping* filteringAnsweringMapping, CComplexVariablesAnsweringQuery* compAssIndVarQuery, CComplexQueryExpressionProcessingData* queryProcessingData, cint64 cardinality);
83
84
85 CVariableBindingsAnswersResult* addVariableBindingAnswerToResult(CVariableBindingsAnswersResult* bindsAnswersResult, CVariableBindingsListAnswerResult* bindAns, cint64 cardinality = 1);
86 CVariableBindingsAnswersResult* addReusedVariableBindingAnswerToResult(CVariableBindingsAnswersResult* bindsAnswersResult, CVariableBindingsListAnswerResult* bindAns, cint64 cardinality = 1);
87
88 // protected methods
89 protected:
90
91 // protected variables
92 protected:
93
94
95 // private methods
96 private:
97
98 // private variables
99 private:
100
101 };
102
103 }; // end namespace Conclusion
104
105 }; // end namespace Answerer
106
107 }; // end namespace Reasoner
108
109 }; // end namespace Konclude
110
111 #endif // KONCLUDE_REASONER_ANSWERER_CONCLUSION_CVARIABLEBINDINGSQUERYRESULTWRITER_H