Debian Codegraph @

Source/Reasoner/Query/CComplexVariablesAnsweringQuery.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
21 #include "CComplexVariablesAnsweringQuery.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Query {
29
30 CComplexVariablesAnsweringQuery::CComplexVariablesAnsweringQuery(CConcreteOntology* baseOntology, CConcreteOntology* expressionOntology, const QList<CAxiomExpression*>& axiomExpressions, const QList<CExpressionVariable*>& disVariables, CConfigurationBase* configuration, const QString& queryName) : CComplexAnsweringExpressionQuery(baseOntology,expressionOntology,configuration,queryName) {
31 mAxiomExpressions = axiomExpressions;
32 mDisVariables = disVariables;
33 mDistinct = false;
34 mBooleanEntailmentResult = false;
35 mResultLimit = -1;
36 mResultOffset = 0;
37 }
38
39 CComplexVariablesAnsweringQuery::~CComplexVariablesAnsweringQuery() {
40 }
41
42 QList<CAxiomExpression*>* CComplexVariablesAnsweringQuery::getAxiomExpressions() {
43 return &mAxiomExpressions;
44 }
45
46
47 bool CComplexVariablesAnsweringQuery::isDistinctRequired() {
48 return mDistinct;
49 }
50
51 CComplexVariablesAnsweringQuery* CComplexVariablesAnsweringQuery::setDistinctRequired(bool distinctRequired) {
52 mDistinct = distinctRequired;
53 return this;
54 }
55
56
57 QList<CExpressionVariable*>* CComplexVariablesAnsweringQuery::getDistinguishedVariableExpressions() {
58 return &mDisVariables;
59 }
60
61 bool CComplexVariablesAnsweringQuery::isBooleanEntailmentResultRequired() {
62 return mBooleanEntailmentResult;
63 }
64
65 CComplexVariablesAnsweringQuery* CComplexVariablesAnsweringQuery::setBooleanEntailmentResultRequired(bool booleanEntailmentResultRequired) {
66 mBooleanEntailmentResult = booleanEntailmentResultRequired;
67 return this;
68 }
69
70 cint64 CComplexVariablesAnsweringQuery::getResultLimit() {
71 return mResultLimit;
72 }
73
74 CComplexVariablesAnsweringQuery* CComplexVariablesAnsweringQuery::setResultLimit(cint64 resultLimit) {
75 mResultLimit = resultLimit;
76 return this;
77 }
78
79 cint64 CComplexVariablesAnsweringQuery::getResultOffset() {
80 return mResultOffset;
81 }
82
83 CComplexVariablesAnsweringQuery* CComplexVariablesAnsweringQuery::setResultOffset(cint64 resultOffset) {
84 mResultOffset = resultOffset;
85 return this;
86 }
87
88 cint64 CComplexVariablesAnsweringQuery::getResultLimitIncludingOffset() {
89 if (mResultLimit == -1) {
90 return mResultLimit;
91 }
92 return mResultOffset + mResultLimit;
93 }
94
95
96
97 }; // end namespace Query
98
99 }; // end namespace Reasoner
100
101 }; // end namespace Konclude