Debian Codegraph @

Source/Parser/CSPARQLQtXMLResultParser.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_PARSER_CSPARQLQtXMLResultParser_H
22 #define KONCLUDE_PARSER_CSPARQLQtXMLResultParser_H
23
24 // Libraries includes
25 #include <QDomDocument>
26 #include <QDomElement>
27 #include <QVector>
28
29 // Namespace includes
30 #include "CStringPrimitiveConverter.h"
31
32
33 // Other includes
34 #include "Reasoner/Query/CBooleanQueryResult.h"
35 #include "Reasoner/Query/CVariableBindingsAnswersListResult.h"
36 #include "Reasoner/Query/CVariableBindingResult.h"
37 #include "Reasoner/Query/CVariableBindingStringResult.h"
38 #include "Reasoner/Query/CVariableBindingsListAnswerResult.h"
39 #include "Reasoner/Query/CVariableBindingsAnswersSetResult.h"
40
41 // Logger includes
42 #include "Logger/CLogger.h"
43
44 using namespace Konclude::Logger;
45
46 using namespace std;
47
48
49 namespace Konclude {
50
51 using namespace Reasoner::Query;
52
53 namespace Parser {
54
55
56
57
58 /*!
59 *
60 * \class CSPARQLQtXMLResultParser
61 * \author Andreas Steigmiller
62 * \version 0.1
63 * \brief Parser for OWL/XML Files
64 *
65 */
66 class CSPARQLQtXMLResultParser {
67 // public methods
68 public:
69 //! Constructor
70 CSPARQLQtXMLResultParser();
71
72 //! Destructor
73 virtual ~CSPARQLQtXMLResultParser();
74
75 CQueryResult *parseQueryResult(QDomElement *node);
76
77 CVariableBindingsAnswersSetResult* parseVariableBindingsSet(QDomElement *node, QHash<QString, cint64>* variableNameIndexHash = nullptr, bool locallyRenameBlankNamesBindings = false);
78 CVariableBindingsAnswersListResult* parseVariableBindingsList(QDomElement *node, QHash<QString, cint64>* variableNameIndexHash = nullptr, bool locallyRenameBlankNamesBindings = false);
79
80 // protected methods
81 protected:
82 CVariableBindingsAnswersResult* parseVariableBindings(QDomElement *node, QHash<QString, cint64>* variableNameIndexHash = nullptr, bool locallyRenameBlankNamesBindings = false, bool parseAsSet = true);
83
84 // protected variables
85 protected:
86
87
88 // private methods
89 private:
90
91
92 // private variables
93 private:
94
95
96
97 };
98
99 }; // end namespace Parser
100
101 }; // end namespace Konclude
102
103 #endif // KONCLUDE_PARSER_CSPARQLQtXMLResultParser_H