Debian Codegraph @

Source/Reasoner/Query/CVariableBindingResult.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_QUERY_CVARIABLEBINDINGRESULT_H
22 #define KONCLUDE_REASONER_QUERY_CVARIABLEBINDINGRESULT_H
23
24 // Libraries includes
25 #include "CQueryResult.h"
26
27 // Namespace includes
28
29 // Other includes
30 #include "Reasoner/Ontology/CDataLiteral.h"
31 #include "Reasoner/Ontology/CIndividual.h"
32 #include "Reasoner/Ontology/CIndividualReference.h"
33 #include "Reasoner/Ontology/CIndividualNameResolver.h"
34
35
36 // Logger includes
37 #include "Logger/CLogger.h"
38
39
40
41 namespace Konclude {
42
43 namespace Reasoner {
44
45 using namespace Ontology;
46
47 namespace Query {
48
49 /*!
50 *
51 * \class CVariableBindingResult
52 * \author Andreas Steigmiller
53 * \version 0.1
54 * \brief TODO
55 *
56 */
57 class CVariableBindingResult : public CQueryResult {
58 // public methods
59 public:
60 //! Constructor
61 CVariableBindingResult();
62
63 //! Destructor
64 virtual ~CVariableBindingResult();
65
66 virtual CVariableBindingResult* initVariableBinding(const CIndividualReference& indiRef, CIndividualNameResolver* indiNameResolver) = 0;
67 virtual CVariableBindingResult* initVariableBinding(const CIndividualReference& indiRef, const QString& resolvedIndiName) = 0;
68 virtual CVariableBindingResult* initVariableBinding(CIndividual* individual) = 0;
69 virtual CVariableBindingResult* initVariableBinding(CDataLiteral* dataLiteral) = 0;
70 virtual CVariableBindingResult* initVariableBinding(CConcept* concept) = 0;
71 virtual CVariableBindingResult* initVariableBinding(CRole* role) = 0;
72
73
74 enum VariableBindingType {
75 VBTNAMEDINDIVIDUAL, VBTANONYMOUSINDIVIDUAL, VBTLITERAL, VBTCLASS, VBTPROPERTY
76 };
77
78 virtual VariableBindingType getVariableBindingType() = 0;
79
80 bool isClassBindingType();
81 bool isPropertyBindingType();
82 bool isNamedIndividualBindingType();
83 bool isAnonymousIndividualBindingType();
84 bool isLiteralBindingType();
85
86 virtual const QString& getBindingString() = 0;
87 virtual QString getClassBindingString() = 0;
88 virtual QString getPropertyBindingString() = 0;
89 virtual QString getNamedIndividualBindingString() = 0;
90 virtual QString getLiteralDatatypeBindingString() = 0;
91 virtual QString getLiteralDatavalueBindingString() = 0;
92 virtual QPair<QString, QString> getLiteralDatatypeDatavalueBindingStringPair();
93
94 virtual CVariableBindingResult* createCopy() = 0;
95
96 // protected methods
97 protected:
98
99 // protected variables
100 protected:
101
102 // private methods
103 private:
104
105 // private variables
106 private:
107
108 };
109
110 }; // end namespace Query
111
112 }; // end namespace Reasoner
113
114 }; // end namespace Konclude
115
116 #endif // KONCLUDE_REASONER_QUERY_CVARIABLEBINDINGRESULT_H