Debian Codegraph @

Source/Control/Interface/SPARQL/CSPARQLRecordInterpreter.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_CONTROL_INTERFACE_OWLLINK_CSPARQLRECORDINTERPRETER_H
22 #define KONCLUDE_CONTROL_INTERFACE_OWLLINK_CSPARQLRECORDINTERPRETER_H
23
24 // Libraries includes
25 #include <QString>
26 #include <QDomDocument>
27 #include <QHash>
28
29 // Namespace includes
30 #include "CSPARQLXMLAnswerSerializer.h"
31
32 // Other includes
33 #include "Control/Command/CCommandRecorder.h"
34 #include "Control/Command/CCommandDelegater.h"
35
36 #include "Control/Command/Records/CClosureProcessCommandRecord.h"
37
38 #include "Control/Command/Instructions/CKnowledgeBaseQueryCommand.h"
39
40 #include "Reasoner/Query/CVariableBindingsAnswersResult.h"
41 #include "Reasoner/Query/CQueryInconsitentOntologyError.h"
42
43 #include "Reasoner/Kernel/Process/CProcessingStatistics.h"
44
45 #include "Config/CConfiguration.h"
46 #include "Config/CConfigDataReader.h"
47
48
49 // Logger includes
50 #include "Logger/CLogger.h"
51
52 using namespace Konclude::Logger;
53
54
55 namespace Konclude {
56
57 using namespace Config;
58 using namespace Reasoner::Query;
59 using namespace Reasoner::Kernel::Process;
60
61 namespace Control {
62
63 using namespace Command;
64 using namespace Instructions;
65 using namespace Records;
66
67 namespace Interface {
68
69 namespace SPARQL {
70
71 /*!
72 *
73 * \class CSPARQLRecordInterpreter
74 * \author Andreas Steigmiller
75 * \version 0.1
76 * \brief TODO
77 *
78 */
79 class CSPARQLRecordInterpreter : public CCommandDelegater, public CCommandRecorder {
80 // public methods
81 public:
82 //! Constructor
83 CSPARQLRecordInterpreter(CCommandDelegater *commandDelegater, CConfiguration* config);
84
85 //! Destructor
86 virtual ~CSPARQLRecordInterpreter();
87
88 virtual CCommandDelegater *delegateCommand(CCommand *command);
89 virtual CCommandRecorder *recordData(CCommandRecordData *recData);
90
91
92 QByteArray getByteArray();
93
94
95 // protected methods
96 protected:
97 QString getErrorString(CCommandRecordData *recData, const QString &nodeString);
98 QString getErrorLevelString(double level);
99
100 // protected variables
101 protected:
102 QHash<CCommand *,qint64> commandSequenceHash;
103 CCommandDelegater *delegater;
104 qint64 nextSeqNumber;
105 qint64 recNextSeqNumber;
106
107 QMutex seqSyncMutex;
108
109
110 QString owllinkNS;
111 QString owlNS;
112
113 cint64 mAnonymousExtension;
114
115
116 CConfiguration* mConfig;
117 bool mConfExtendedErrorReporting;
118
119
120 CSPARQLXMLAnswerSerializer mSerializer;
121
122
123 // private methods
124 private:
125
126 // private variables
127 private:
128
129 };
130
131 }; // end namespace SPARQL
132
133 }; // end namespace Interface
134
135 }; // end namespace Control
136
137 }; // end namespace Konclude
138
139 #endif // KONCLUDE_CONTROL_INTERFACE_OWLLINK_CSPARQLRECORDINTERPRETER_H