Debian Codegraph @

Source/Reasoner/Answerer/CComplexQueryCompositionRedlandRasqalProcessingData.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 #ifdef KONCLUDE_REDLAND_INTEGRATION
21
22 #ifndef KONCLUDE_REASONER_ANSWERER_CCOMPLEXQUERYCOMPOSITIONREDLANDRASQALPROCESSINGDATA_H
23 #define KONCLUDE_REASONER_ANSWERER_CCOMPLEXQUERYCOMPOSITIONREDLANDRASQALPROCESSINGDATA_H
24
25 // Libraries includes
26
27
28 // Namespace includes
29 #include "AnswererSettings.h"
30 #include "CAnsweringHandlingStatistics.h"
31 #include "CComplexQueryCompositionProcessingData.h"
32 #include "CRedlandRasqalSubQueryProcessingData.h"
33 #include "CRedlandRasqalModelSubQueryResolver.h"
34
35
36
37 // Other includes
38 #include "Reasoner/Query/CRedlandRasqalBGPsCompositionQuery.h"
39
40 #include "Concurrent/Callback/CCallbackData.h"
41
42 // Logger includes
43 #include "Logger/CLogger.h"
44
45
46 namespace Konclude {
47
48 using namespace Concurrent::Callback;
49
50 namespace Reasoner {
51
52 using namespace Query;
53
54 namespace Answerer {
55
56
57 /*!
58 *
59 * \class CComplexQueryCompositionRedlandRasqalProcessingData
60 * \author Andreas Steigmiller
61 * \version 0.1
62 * \brief TODO
63 *
64 */
65 class CComplexQueryCompositionRedlandRasqalProcessingData : public CComplexQueryCompositionProcessingData {
66 // public methods
67 public:
68 //! Constructor
69 CComplexQueryCompositionRedlandRasqalProcessingData(CRedlandRasqalBGPsCompositionQuery* query = nullptr, CCallbackData* callback = nullptr);
70
71 ~CComplexQueryCompositionRedlandRasqalProcessingData();
72
73
74 CRedlandRasqalBGPsCompositionQuery* getRedlandRasqalQuery();
75
76
77 QVector<CRedlandRasqalSubQueryProcessingData*>* getSubQueryProcessingDataVector();
78 CRedlandRasqalSubQueryProcessingData* getSubQueryProcessingData(cint64 subQueryId);
79
80 CRedlandRasqalModelSubQueryResolver* getResolver();
81 CComplexQueryCompositionRedlandRasqalProcessingData* setResolver(CRedlandRasqalModelSubQueryResolver* resolver);
82
83
84 QStringList* getRedlandRasqalErrorWarningMessageList();
85
86 bool areResultDirectlyFromSubQueryStreamed();
87 CComplexQueryCompositionRedlandRasqalProcessingData* setResultDirectlyFromSubQueryStreamed(bool directlyStreamed);
88
89
90 bool hasSubQueriesGenerated();
91 CComplexQueryCompositionRedlandRasqalProcessingData* setSubQueriesGenerated(bool generated);
92
93
94 bool hasRemainingSubQueriesProcessing();
95 cint64 getRemainingSubQueriesProcessingCount();
96
97 QSet<CRedlandRasqalSubQueryProcessingData*>* getRemainingSubQueriesProcessingSet();
98 QSet<cint64>* getProcessedSubQueryIdSet();
99
100
101 bool isQueryProcessed();
102 CComplexQueryCompositionRedlandRasqalProcessingData* setQueryProcessed(bool processed);
103
104 bool isDependentOntologiesLoaded();
105 CComplexQueryCompositionRedlandRasqalProcessingData* setDependentOntologiesLoaded(bool loaded);
106
107 bool isDependentOntologiesIdentified();
108 CComplexQueryCompositionRedlandRasqalProcessingData* setDependentOntologiesIdentified(bool identified);
109
110 QHash<CQuery*, CRedlandRasqalSubQueryProcessingData*>* getSubQueryDataHash();
111 QHash<cint64, CRedlandRasqalSubQueryProcessingData*>* getIdSubQueryDataHash();
112
113 // protected methods
114 protected:
115
116 // protected variables
117 protected:
118 CRedlandRasqalBGPsCompositionQuery* mQuery;
119
120 QVector<CRedlandRasqalSubQueryProcessingData*> mSubQueryProcDataVec;
121 CRedlandRasqalModelSubQueryResolver* mResolver;
122
123 QStringList mMessageList;
124 bool mResultDirectlyFromSubQueryStreamed;
125
126 bool mSubQueriesGenerated;
127 bool mQueryProcessed;
128
129 bool mDependentOntologiesIdentified;
130 bool mDependentOntologiesLoaded;
131
132
133 QSet<CRedlandRasqalSubQueryProcessingData*> mRemainingSubQueriesProcessingSet;
134 QSet<cint64> mProcessedSubQueryIdSet;
135
136 QHash<CQuery*, CRedlandRasqalSubQueryProcessingData*> mSubQueryDataHash;
137 QHash<cint64, CRedlandRasqalSubQueryProcessingData*> mIdSubQueryDataHash;
138
139
140
141 // private methods
142 private:
143
144 // private variables
145 private:
146
147 };
148
149 }; // end namespace Answerer
150
151 }; // end namespace Reasoner
152
153 }; // end namespace Konclude
154
155 #endif // KONCLUDE_REASONER_ANSWERER_CCOMPLEXQUERYCOMPOSITIONREDLANDRASQALPROCESSINGDATA_H
156
157 #endif // KONCLUDE_REDLAND_INTEGRATION