Debian Codegraph @

Source/Reasoner/Generator/CExpressionSplitter.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_GENERATOR_CEXPRESSIONSPLITTER_H
22 #define KONCLUDE_REASONER_GENERATOR_CEXPRESSIONSPLITTER_H
23
24
25 // Libraries includes
26 #include <QList>
27
28
29 // Namespace includes
30
31
32 // Other includes
33 #include "Utilities/CNegLinker.hpp"
34
35 #include "Parser/Expressions/CClassTermExpression.h"
36 #include "Parser/Expressions/CObjectPropertyTermExpression.h"
37 #include "Parser/Expressions/CIndividualTermExpression.h"
38 #include "Parser/Expressions/CDataPropertyTermExpression.h"
39 #include "Parser/Expressions/CDataRangeTermExpression.h"
40 #include "Parser/Expressions/CDataLiteralTermExpression.h"
41 #include "Parser/Expressions/CDatatypeExpression.h"
42 #include "Parser/Expressions/CDataFacetRestrictionExpression.h"
43
44 // Logger includes
45 #include "Logger/CLogger.h"
46
47
48
49
50
51 namespace Konclude {
52
53 using namespace Utilities;
54 using namespace Parser::Expression;
55
56 namespace Reasoner {
57
58 namespace Generator {
59
60 /*!
61 *
62 * \class CExpressionSplitter
63 * \author Andreas Steigmiller
64 * \version 0.1
65 * \brief TODO
66 *
67 */
68 class CExpressionSplitter {
69 // public methods
70 public:
71 //! Constructor
72 CExpressionSplitter(const CEXPRESSIONLIST<CBuildExpression*>& expressions);
73 CExpressionSplitter(CBuildExpression* expression1 = nullptr, CBuildExpression* expression2 = nullptr, CBuildExpression* expression3 = nullptr);
74
75
76 bool testForExpressionComposition(cint64 requiredClassExpressions, cint64 requiredObjectPropertyExpressions = 0, cint64 requiredIndividualExpressions = 0, cint64 dataRangeExpressions = 0, cint64 dataPropertyExpressions = 0, cint64 dataLiteralExpressions = 0, cint64 datatypeExpressions = 0, cint64 dataFacetRestrictionExpressions = 0, cint64 dataFacetExpressions = 0);
77
78 bool testForClassExpressions(cint64 requiredClassExpressions);
79 bool testForObjectPropertyExpressions(cint64 requiredObjectPropertyExpressions);
80 bool testForIndividualExpressions(cint64 requiredIndividualExpressions);
81 bool testForDataPropertyExpressions(cint64 dataPropertyExpressions);
82 bool testForDataRangeExpressions(cint64 dataRangeExpressions);
83 bool testForDataLiteralTermExpressions(cint64 literalExpressions);
84 bool testForDatatypeExpressions(cint64 datatypeExpressions);
85 bool testForDataFacetRestrictionExpressions(cint64 dataFacetRestrictionExpressions);
86 bool testForDataFacetExpressions(cint64 dataFacetExpressions);
87
88 CEXPRESSIONLIST<CClassTermExpression*>* getClassTermExpressionList();
89 CEXPRESSIONLIST<CObjectPropertyTermExpression*>* getObjectPropertyTermExpressionList();
90 CEXPRESSIONLIST<CDataPropertyTermExpression*>* getDataPropertyTermExpressionList();
91 CEXPRESSIONLIST<CDataRangeTermExpression*>* getDataRangeTermExpressionList();
92 CEXPRESSIONLIST<CIndividualTermExpression*>* getIndividualTermExpressionList();
93 CEXPRESSIONLIST<CDataLiteralTermExpression*>* getDataLiteralTermExpressionList();
94 CEXPRESSIONLIST<CDatatypeExpression*>* getDatatypeExpressionList();
95 CEXPRESSIONLIST<CDataFacetRestrictionExpression*>* getDataFacetRestrictionList();
96 CEXPRESSIONLIST<CDataFacetExpression*>* getDataFacetList();
97
98 CClassTermExpression* getFirstClassTermExpression();
99 CClassTermExpression* getFirstOptionalClassTermExpression();
100 CClassTermExpression* getSecondClassTermExpression();
101
102 CObjectPropertyTermExpression* getFirstObjectPropertyTermExpression();
103 CObjectPropertyTermExpression* getSecondObjectPropertyTermExpression();
104
105 CDataPropertyTermExpression* getFirstDataPropertyTermExpression();
106 CDataPropertyTermExpression* getSecondDataPropertyTermExpression();
107
108
109 CDataRangeTermExpression* getFirstDataRangeTermExpression();
110 CDataRangeTermExpression* getFirstOptionalDataRangeTermExpression();
111 CDataRangeTermExpression* getSecondDataRangeTermExpression();
112
113
114 CDataLiteralTermExpression* getFirstDataLiteralTermExpression();
115 CDataLiteralTermExpression* getSecondDataLiteralTermExpression();
116
117 CDatatypeExpression* getFirstDatatypeExpression();
118 CDatatypeExpression* getSecondDatatypeExpression();
119
120 CDataFacetRestrictionExpression* getFirstDataFacetRestrictionExpression();
121 CDataFacetRestrictionExpression* getSecondDataFacetRestrictionExpression();
122
123 CDataFacetExpression* getFirstDataFacetExpression();
124 CDataFacetExpression* getSecondDataFacetExpression();
125
126 CIndividualTermExpression* getFirstIndividualTermExpression();
127 CIndividualTermExpression* getSecondIndividualTermExpression();
128
129
130 // protected methods
131 protected:
132 bool splitExpressions(const CEXPRESSIONLIST<CBuildExpression*>& expressions);
133 bool addSplittedExpression(CBuildExpression* expression);
134
135 // protected variables
136 protected:
137 CEXPRESSIONLIST<CClassTermExpression*> mClassList;
138 CEXPRESSIONLIST<CObjectPropertyTermExpression*> mObjectPropertyList;
139 CEXPRESSIONLIST<CIndividualTermExpression*> mIndiList;
140 CEXPRESSIONLIST<CDataPropertyTermExpression*> mDataPropertyList;
141 CEXPRESSIONLIST<CDataRangeTermExpression*> mDataRangeList;
142 CEXPRESSIONLIST<CDataLiteralTermExpression*> mDataLiteralTermList;
143 CEXPRESSIONLIST<CDatatypeExpression*> mDatatypeList;
144 CEXPRESSIONLIST<CDataFacetRestrictionExpression*> mDataFacetRestrictionList;
145 CEXPRESSIONLIST<CDataFacetExpression*> mDataFacetList;
146
147 // private methods
148 private:
149
150 // private variables
151 private:
152
153 };
154
155 }; // end namespace Generator
156
157 }; // end namespace Reasoner
158
159 }; // end namespace Konclude
160
161 #endif // end KONCLUDE_REASONER_GENERATOR_CEXPRESSIONSPLITTER_H