Debian Codegraph @

Source/Reasoner/Answerer/CComplexQueryCompositionRedlandRasqalProcessingData.cpp

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