Debian Codegraph @

Source/Reasoner/Ontology/CTBox.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_ONTOLOGY_CTBOX_H
22 #define KONCLUDE_REASONER_ONTOLOGY_CTBOX_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "OntologySettings.h"
29 #include "CConcept.h"
30 #include "CBoxContext.h"
31 #include "CConcreteOntologyContextBase.h"
32 #include "CConceptVector.h"
33 #include "CDataBox.h"
34 #include "CIRIName.h"
35 #include "CIndividual.h"
36 #include "CDatatypeVector.h"
37 #include "CConceptOfInterestActivationTriggeringData.h"
38
39
40 // Other includes
41 #include "Utilities/CSortedNegLinker.hpp"
42
43
44 // Logger includes
45 #include "Logger/CLogger.h"
46
47
48
49 namespace Konclude {
50
51 using namespace Utilities;
52
53 namespace Reasoner {
54
55 namespace Ontology {
56
57 /*!
58 *
59 * \class CTBox
60 * \author Andreas Steigmiller
61 * \version 0.1
62 * \brief TODO
63 *
64 */
65 class CTBox : public CDataBox {
66 // public methods
67 public:
68 //! Constructor
69 CTBox(CBoxContext* boxContext = nullptr);
70
71 //! Destructor
72 virtual ~CTBox();
73
74
75 CTBox *setConceptVector(CConceptVector* takeConceptVec);
76 CConceptVector* getConceptVector(bool create = true);
77
78 qint64 getConceptCount();
79
80
81 CTBox *referenceTBox(CTBox *tBox);
82 CTBox *getTBoxReferenceCopy(CBoxContext* boxContext = nullptr);
83
84 virtual CBoxContext *getBoxContext(bool create = true);
85
86 CConcept* getTopDataRangeConcept();
87
88 CConcept* getTopConcept();
89 CConcept* getBottomConcept();
90 CConcept* getIndividualTriggerConcept();
91
92 CTBox* setTopConcept(CConcept* topConcept);
93 CTBox* setBottomConcept(CConcept* bottomConcept);
94 CTBox* setIndividualTriggerConcept(CConcept* indTrigConcept);
95 CTBox* setTopDataRangeConcept(CConcept* topDataRangeConcept);
96
97 QString getTBoxString();
98
99 QString getConceptOperandString(CSortedNegLinker<CConcept *> *ops);
100
101 CBOXSET<CConcept*> *getGCIConceptSet();
102 CTBox *setGCIConceptSet(CBOXSET<CConcept*>* takeContainsSet);
103
104 CBOXSET<CConcept*> *getActiveClassConceptSet(bool create = true);
105 CTBox *setActiveClassConceptSet(CBOXSET<CConcept*>* takeActiveConceptSet);
106
107 CBOXHASH<CConcept*,CConcept*>* getTriggerImplicationHash(bool create = true);
108 CTBox* setTriggerImplicationHash(CBOXHASH<CConcept*,CConcept*>* takeTriggerImplHash);
109
110 CBOXHASH<CConcept*,CConcept*>* getEquivalentConceptCandidateHash(bool create = true);
111 CBOXHASH<CConcept*,CConcept*>* getCandidateEquivalentConceptHash(bool create = true);
112 CBOXSET<CConcept*>* getEquivalentConceptNonCandidateSet(bool create = true);
113
114 CBOXHASH<CRole*,CConcept*>* getRoleDomainTriggerConceptHash(bool create = true);
115
116 CBOXHASH<cint64,CConcept*>* getIndividualTriggerConceptHash(bool create = true);
117
118
119 CBOXSET<TConceptNegPair>* getConceptOfInterestSet(bool create = true);
120 CBOXSET<TConceptNegPair>* getTriggeredConceptOfInterestSet(bool create = true);
121 CBOXLIST<TConceptNegPair>* getConceptOfInterestList(bool create = true);
122 CBOXHASH<TConceptNegPair, CConceptOfInterestActivationTriggeringData>* getConceptOfInterestActivationTriggerDataHash(bool create = true);
123 CBOXHASH<CConcept*, TConceptNegPair>* getCandidateConceptOfInterestHash(bool create = true);
124 CBOXHASH<CConcept*, TConceptNegPair>* getTriggerConceptOfInterestHash(bool create = true);
125
126
127 cint64 getTopConceptIndex();
128 cint64 getBottomConceptIndex();
129 cint64 getIndividualTriggerConceptIndex();
130 cint64 getTopDataRangeConceptIndex();
131
132 CConcept* getUniversalConnectionNominalValueConcept();
133 CTBox* setUniversalConnectionNominalValueConcept(CConcept* valueCon);
134
135
136
137 CDatatypeVector* getDatatypeVector(bool create = true);
138 CTBox* setDatatypeVector(CDatatypeVector* datatypeVector);
139
140 CTBox* setMinimalNextConceptID(cint64 nextId);
141 cint64 getMinimalNextConceptID();
142 cint64 getNextConceptID();
143
144 // protected methods
145 protected:
146
147 // protected variables
148 protected:
149 CConceptVector* concepts;
150 CConcept* mUnivConnNomValueCon;
151
152 CBoxContext *mBoxContext;
153 CBoxContext *mDeleteBoxContext;
154 CMemoryAllocationManager* mMemMan;
155
156 CBOXSET<CConcept*> *gciConceptSet;
157 CBOXSET<CConcept*> *activeConceptSet;
158 CBOXHASH<CConcept*,CConcept*>* mTriggerImpHash;
159
160 CDatatypeVector* mDatatypeVector;
161
162 CBOXHASH<CConcept*,CConcept*>* mEquivConCandidateHash;
163 CBOXHASH<CConcept*,CConcept*>* mCandidateEquivConHash;
164 CBOXSET<CConcept*>* mEquivConNonCandidateSet;
165
166 CBOXHASH<CRole*,CConcept*>* mRoleDomainTriggerConceptHash;
167 CBOXHASH<cint64,CConcept*>* mIndividualTriggerConceptHash;
168
169
170 CBOXLIST<TConceptNegPair>* mConceptOfInterestList;
171 CBOXSET<TConceptNegPair>* mConceptOfInterestSet;
172 CBOXSET<TConceptNegPair>* mTriggeredConceptOfInterestSet;
173 CBOXHASH<TConceptNegPair, CConceptOfInterestActivationTriggeringData>* mConOfIntActivationTriggerHash;
174 CBOXHASH<CConcept*, TConceptNegPair>* mCandidateConOfIntHash;
175 CBOXHASH<CConcept*, TConceptNegPair>* mTriggerConOfIntHash;
176
177
178 cint64 mTopConceptIndex;
179 cint64 mBottomConceptIndex;
180 cint64 mIndividualTriggerConceptIndex;
181 cint64 mTopDataRangeConceptIndex;
182
183
184 cint64 mMinimalNextConceptID;
185
186
187 // private methods
188 private:
189
190 // private variables
191 private:
192
193 };
194
195 }; // end namespace Ontology
196
197 }; // end namespace Reasoner
198
199 }; // end namespace Konclude
200
201 #endif // KONCLUDE_REASONER_ONTOLOGY_CTBOX_H