Debian Codegraph @

Source/Reasoner/Query/CRedlandRasqalBGPsCompositionQuery.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 "CRedlandRasqalBGPsCompositionQuery.h"
23
24
25 namespace Konclude {
26
27 namespace Reasoner {
28
29 namespace Query {
30
31 CRedlandRasqalBGPsCompositionQuery::CRedlandRasqalBGPsCompositionQuery(CConcreteOntology* baseOntology, CConcreteOntology* expressionOntology, const QSet<QString>& dependentKBNames, const QString& queryText, librdf_world* redlandWorld, librdf_query* redlandQuery, rasqal_query* rasqalQuery, CConfigurationBase* configuration, const QString& queryName) : CComplexAnsweringCompositionQuery(baseOntology, expressionOntology,configuration,queryName) {
32 mDependentKBNames = dependentKBNames;
33 mRedlandWorld = redlandWorld;
34 mRedlandQuery = redlandQuery;
35 mRasqalQuery = rasqalQuery;
36 mQueryText = queryText;
37 }
38
39 CRedlandRasqalBGPsCompositionQuery::~CRedlandRasqalBGPsCompositionQuery() {
40 }
41
42
43 QString CRedlandRasqalBGPsCompositionQuery::getQueryText() {
44 return mQueryText;
45 }
46
47
48 QSet<QString>* CRedlandRasqalBGPsCompositionQuery::getDependentKnowledgeBaseNames() {
49 return &mDependentKBNames;
50 }
51
52 librdf_world* CRedlandRasqalBGPsCompositionQuery::getRedlandWorld() {
53 return mRedlandWorld;
54 }
55
56 librdf_query* CRedlandRasqalBGPsCompositionQuery::getRedlandQuery() {
57 return mRedlandQuery;
58 }
59
60 rasqal_query* CRedlandRasqalBGPsCompositionQuery::getRasqalQuery() {
61 return mRasqalQuery;
62 }
63
64 QHash<QString, TDependentOntologyPair>* CRedlandRasqalBGPsCompositionQuery::getDependentKnowledgeBaseRevisionHash() {
65 return &mDependentKnowledgeBaseRevisionHash;
66 }
67
68 CRedlandRasqalBGPsCompositionQuery* CRedlandRasqalBGPsCompositionQuery::setDependentKnowledgeBaseRevision(const QString& kbName, TDependentOntologyPair depOntPair) {
69 mDependentKnowledgeBaseRevisionHash.insert(kbName, depOntPair);
70 return this;
71 }
72
73 CRedlandRasqalBGPsCompositionQuery* CRedlandRasqalBGPsCompositionQuery::setDependentKnowledgeBaseRevision(const QString& kbName, CConcreteOntology* baseOntology, CConcreteOntology* expressionOntology) {
74 TDependentOntologyPair depOntPair(baseOntology, expressionOntology);
75 return setDependentKnowledgeBaseRevision(kbName, depOntPair);
76 }
77
78
79 CConcreteOntology* CRedlandRasqalBGPsCompositionQuery::getDependentBaseKnowledgeBaseRevision(const QString& kbName) {
80 TDependentOntologyPair depOntPair = mDependentKnowledgeBaseRevisionHash.value(kbName);
81 return depOntPair.first;
82 }
83
84 CConcreteOntology* CRedlandRasqalBGPsCompositionQuery::getDependentExpressionKnowledgeBaseRevisionBase(const QString& kbName) {
85 TDependentOntologyPair depOntPair = mDependentKnowledgeBaseRevisionHash.value(kbName);
86 return depOntPair.second;
87 }
88
89
90 }; // end namespace Query
91
92 }; // end namespace Reasoner
93
94 }; // end namespace Konclude
95
96 #endif // KONCLUDE_REDLAND_INTEGRATION