| 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_CONTOLOGYSTRUCTURESUMMARY_H |
| 22 |
#define KONCLUDE_REASONER_ONTOLOGY_CONTOLOGYSTRUCTURESUMMARY_H |
| 23 |
|
| 24 |
// Libraries includes |
| 25 |
|
| 26 |
|
| 27 |
// Namespace includes |
| 28 |
#include "OntologySettings.h" |
| 29 |
#include "COntologyContext.h" |
| 30 |
|
| 31 |
// Other includes |
| 32 |
|
| 33 |
|
| 34 |
// Logger includes |
| 35 |
#include "Logger/CLogger.h" |
| 36 |
|
| 37 |
|
| 38 |
namespace Konclude { |
| 39 |
|
| 40 |
namespace Reasoner { |
| 41 |
|
| 42 |
namespace Ontology { |
| 43 |
|
| 44 |
/*! |
| 45 |
* |
| 46 |
* \class COntologyStructureSummary |
| 47 |
* \author Andreas Steigmiller |
| 48 |
* \version 0.1 |
| 49 |
* \brief TODO |
| 50 |
* |
| 51 |
*/ |
| 52 |
class COntologyStructureSummary { |
| 53 |
// public methods |
| 54 |
public: |
| 55 |
//! Constructor |
| 56 |
COntologyStructureSummary(COntologyContext* ontologyContext = nullptr); |
| 57 |
|
| 58 |
//! Destructor |
| 59 |
virtual ~COntologyStructureSummary(); |
| 60 |
|
| 61 |
|
| 62 |
COntologyStructureSummary* referenceStructureSummary(COntologyStructureSummary* structureSummary); |
| 63 |
|
| 64 |
|
| 65 |
COntologyStructureSummary *clear(); |
| 66 |
|
| 67 |
|
| 68 |
bool hasOnlyDeterministicConceptClasses(); |
| 69 |
COntologyStructureSummary* setOnlyDeterministicConceptClasses(bool allClassesDeterministic); |
| 70 |
|
| 71 |
bool hasOnlyELConceptClasses(); |
| 72 |
COntologyStructureSummary* setOnlyELConceptClasses(bool allClassesEL); |
| 73 |
|
| 74 |
qint64 getClassCount(); |
| 75 |
qint64 getConceptCount(); |
| 76 |
qint64 getObjectPropertyCount(); |
| 77 |
qint64 getDataPropertyCount(); |
| 78 |
qint64 getGCICount(); |
| 79 |
|
| 80 |
qint64 getConceptIntersectionCount(); |
| 81 |
qint64 getConceptUnionCount(); |
| 82 |
qint64 getConceptNotCount(); |
| 83 |
qint64 getConceptSomeCount(); |
| 84 |
qint64 getConceptOnlyCount(); |
| 85 |
qint64 getConceptAtmostCount(); |
| 86 |
qint64 getConceptAtleastCount(); |
| 87 |
qint64 getConceptQualifiedAtleastCount(); |
| 88 |
qint64 getConceptQualifiedAtmostCount(); |
| 89 |
qint64 getConceptNotQualifiedAtleastCount(); |
| 90 |
qint64 getConceptNotQualifiedAtmostCount(); |
| 91 |
qint64 getConceptEquivalenceCount(); |
| 92 |
qint64 getConceptSubclassCount(); |
| 93 |
|
| 94 |
bool hasConceptIntersections(); |
| 95 |
bool hasConceptUnions(); |
| 96 |
bool hasConceptNots(); |
| 97 |
bool hasConceptSomes(); |
| 98 |
bool hasConceptOnlys(); |
| 99 |
bool hasConceptAtmosts(); |
| 100 |
bool hasConceptAtleasts(); |
| 101 |
bool hasConceptQualifiedAtleasts(); |
| 102 |
bool hasConceptQualifiedAtmosts(); |
| 103 |
bool hasConceptNotQualifiedAtleasts(); |
| 104 |
bool hasConceptNotQualifiedAtmosts(); |
| 105 |
bool hasConceptEquivalences(); |
| 106 |
bool hasConceptSubclasses(); |
| 107 |
|
| 108 |
qint64 getPrimitiveConceptCount(); |
| 109 |
qint64 getComplexConceptCount(); |
| 110 |
qint64 getAtomicClassCount(); |
| 111 |
qint64 getComplexClassCount(); |
| 112 |
|
| 113 |
|
| 114 |
COntologyStructureSummary *incClassCount(qint64 incCount = 1); |
| 115 |
COntologyStructureSummary *incConceptCount(qint64 incCount = 1); |
| 116 |
COntologyStructureSummary *incObjectPropertyCount(qint64 incCount = 1); |
| 117 |
COntologyStructureSummary *incDataPropertyCount(qint64 incCount = 1); |
| 118 |
COntologyStructureSummary *incGCICount(qint64 incCount = 1); |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
COntologyStructureSummary *incConceptIntersectionCount(qint64 incCount = 1); |
| 123 |
COntologyStructureSummary *incConceptUnionCount(qint64 incCount = 1); |
| 124 |
COntologyStructureSummary *incConceptNegCount(qint64 incCount = 1); |
| 125 |
COntologyStructureSummary *incConceptSomeCount(qint64 incCount = 1); |
| 126 |
COntologyStructureSummary *incConceptOnlyCount(qint64 incCount = 1); |
| 127 |
COntologyStructureSummary *incConceptAtmostCount(qint64 incCount = 1); |
| 128 |
COntologyStructureSummary *incConceptAtleastCount(qint64 incCount = 1); |
| 129 |
COntologyStructureSummary *incConceptQualifiedAtleastCount(qint64 incCount = 1); |
| 130 |
COntologyStructureSummary *incConceptQualifiedAtmostCount(qint64 incCount = 1); |
| 131 |
COntologyStructureSummary *incConceptNotQualifiedAtleastCount(qint64 incCount = 1); |
| 132 |
COntologyStructureSummary *incConceptNotQualifiedAtmostCount(qint64 incCount = 1); |
| 133 |
COntologyStructureSummary *incConceptEquivalenceCount(qint64 incCount = 1); |
| 134 |
COntologyStructureSummary *incConceptSubclassCount(qint64 incCount = 1); |
| 135 |
|
| 136 |
COntologyStructureSummary *incPrimitiveConceptCount(qint64 incCount = 1); |
| 137 |
COntologyStructureSummary *incComplexConceptCount(qint64 incCount = 1); |
| 138 |
COntologyStructureSummary *incAtomicClassCount(qint64 incCount = 1); |
| 139 |
COntologyStructureSummary *incComplexClassCount(qint64 incCount = 1); |
| 140 |
|
| 141 |
|
| 142 |
COntologyStructureSummary *incRoleInverseCount(qint64 incCount = 1); |
| 143 |
COntologyStructureSummary *incRoleEquivalenceCount(qint64 incCount = 1); |
| 144 |
COntologyStructureSummary *incRoleDisjointCount(qint64 incCount = 1); |
| 145 |
COntologyStructureSummary *incRoleRangeConceptCount(qint64 incCount = 1); |
| 146 |
COntologyStructureSummary *incRoleDomainConceptCount(qint64 incCount = 1); |
| 147 |
COntologyStructureSummary *incRoleAsymmetricCount(qint64 incCount = 1); |
| 148 |
COntologyStructureSummary *incRoleSymmetricCount(qint64 incCount = 1); |
| 149 |
COntologyStructureSummary *incRoleFunctionalCount(qint64 incCount = 1); |
| 150 |
COntologyStructureSummary *incRoleInverseFunctionalCount(qint64 incCount = 1); |
| 151 |
COntologyStructureSummary *incRoleTransetivCount(qint64 incCount = 1); |
| 152 |
COntologyStructureSummary *incRoleReflexivityCount(qint64 incCount = 1); |
| 153 |
COntologyStructureSummary *incRoleIrreflexivityCount(qint64 incCount = 1); |
| 154 |
|
| 155 |
COntologyStructureSummary *incConceptFunctionalAtmostCount(qint64 incCount = 1); |
| 156 |
COntologyStructureSummary *incConceptValueCount(qint64 incCount = 1); |
| 157 |
COntologyStructureSummary *incConceptNominalIndividualCount(qint64 incCount = 1); |
| 158 |
COntologyStructureSummary *incConceptSelfCount(qint64 incCount = 1); |
| 159 |
COntologyStructureSummary *incConceptAutomateChooseCount(qint64 incCount = 1); |
| 160 |
COntologyStructureSummary *incConceptAutomateStateCount(qint64 incCount = 1); |
| 161 |
COntologyStructureSummary *incConceptAutomateTransitiveCount(qint64 incCount = 1); |
| 162 |
|
| 163 |
|
| 164 |
qint64 getRoleInverseCount(); |
| 165 |
qint64 getRoleEquivalenceCount(); |
| 166 |
qint64 getRoleDisjointCount(); |
| 167 |
qint64 getRoleRangeConceptCount(); |
| 168 |
qint64 getRoleDomainConceptCount(); |
| 169 |
qint64 getRoleAsymmetricCount(); |
| 170 |
qint64 getRoleSymmetricCount(); |
| 171 |
qint64 getRoleFunctionalCount(); |
| 172 |
qint64 getRoleInverseFunctionalCount(); |
| 173 |
qint64 getRoleTransetivCount(); |
| 174 |
qint64 getRoleReflexivityCount(); |
| 175 |
qint64 getRoleIrreflexivityCount(); |
| 176 |
|
| 177 |
qint64 getConceptFunctionalAtmostCount(); |
| 178 |
qint64 getConceptValueCount(); |
| 179 |
qint64 getConceptIndividualCount(); |
| 180 |
qint64 getConceptSelfCount(); |
| 181 |
qint64 getConceptAutomateChooseCount(); |
| 182 |
qint64 getConceptAutomateStateCount(); |
| 183 |
qint64 getConceptAutomateTransitiveCount(); |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
bool hasRoleInverses(); |
| 188 |
bool hasRoleEquivalences(); |
| 189 |
bool hasRoleDisjoints(); |
| 190 |
bool hasRoleRangeConcepts(); |
| 191 |
bool hasRoleDomainConcepts(); |
| 192 |
bool hasRoleAsymmetrics(); |
| 193 |
bool hasRoleSymmetrics(); |
| 194 |
bool hasRoleFunctionals(); |
| 195 |
bool hasRoleInverseFunctionals(); |
| 196 |
bool hasRoleTransetivs(); |
| 197 |
bool hasRoleReflexivitys(); |
| 198 |
bool hasRoleIrreflexivitys(); |
| 199 |
|
| 200 |
bool hasConceptFunctionalAtmosts(); |
| 201 |
bool hasConceptValues(); |
| 202 |
bool hasConceptNominalIndividual(); |
| 203 |
bool hasConceptSelfs(); |
| 204 |
bool hasConceptAutomateChooses(); |
| 205 |
bool hasConceptAutomateStates(); |
| 206 |
bool hasConceptAutomateTransitives(); |
| 207 |
|
| 208 |
|
| 209 |
COntologyStructureSummary *setNegationDisjunctionsOccurrence(bool occured = true); |
| 210 |
COntologyStructureSummary *setExistensialOccurrence(bool occured = true); |
| 211 |
COntologyStructureSummary *setCardinalityOccurrence(bool occured = true); |
| 212 |
COntologyStructureSummary *setQualifiedCardinalityOccurrence(bool occured = true); |
| 213 |
COntologyStructureSummary *setFunctionalityOccurrence(bool occured = true); |
| 214 |
COntologyStructureSummary *setTransitivityOccurrence(bool occured = true); |
| 215 |
COntologyStructureSummary *setRoleHierarchyOccurrence(bool occured = true); |
| 216 |
COntologyStructureSummary *setComplexSubRoleOccurrence(bool occured = true); |
| 217 |
COntologyStructureSummary *setUniversalRoleOccurrence(bool occured = true); |
| 218 |
COntologyStructureSummary *setInverseOccurrence(bool occured = true); |
| 219 |
COntologyStructureSummary *setNominalIndividualOccurrence(bool occured = true); |
| 220 |
COntologyStructureSummary *setNominalOccurrence(bool occured = true); |
| 221 |
COntologyStructureSummary *setGroundingOccurrence(bool occured = true); |
| 222 |
COntologyStructureSummary *setDatatypeOccurrence(bool occured = true); |
| 223 |
|
| 224 |
|
| 225 |
bool hasNegationDisjunctionsOccurrence(); |
| 226 |
bool hasCardinalityOccurrence(); |
| 227 |
bool hasExistensialOccurrence(); |
| 228 |
bool hasQualifiedCardinalityOccurrence(); |
| 229 |
bool hasFunctionalityOccurrence(); |
| 230 |
bool hasTransitivityOccurrence(); |
| 231 |
bool hasRoleHierarchyOccurrence(); |
| 232 |
bool hasComplexSubRoleOccurrence(); |
| 233 |
bool hasUniversalRoleOccurrence(); |
| 234 |
bool hasInverseOccurrence(); |
| 235 |
bool hasNominalIndividualOccurrence(); |
| 236 |
bool hasNominalOccurrence(); |
| 237 |
bool hasGroundingOccurrence(); |
| 238 |
bool hasDatatypeOccurrence(); |
| 239 |
|
| 240 |
|
| 241 |
QString getExpressivenessString(); |
| 242 |
|
| 243 |
|
| 244 |
// protected methods |
| 245 |
protected: |
| 246 |
COntologyStructureSummary *calculateExpressiveness(); |
| 247 |
|
| 248 |
// protected variables |
| 249 |
protected: |
| 250 |
|
| 251 |
bool mAllClassesDeterministic; |
| 252 |
bool mAllClassesEL; |
| 253 |
|
| 254 |
qint64 mConClassCount; |
| 255 |
qint64 mConCount; |
| 256 |
qint64 mRoleObPropCount; |
| 257 |
qint64 mDataPropCount; |
| 258 |
qint64 mConGCICount; |
| 259 |
|
| 260 |
qint64 mConIntersectionCount; |
| 261 |
qint64 mConUnionCount; |
| 262 |
qint64 mConNegCount; |
| 263 |
qint64 mConSomeCount; |
| 264 |
qint64 mConOnlyCount; |
| 265 |
qint64 mConAtmostCount; |
| 266 |
qint64 mConAtleastCount; |
| 267 |
qint64 mConQualAtleastCount; |
| 268 |
qint64 mConQualAtmostCount; |
| 269 |
qint64 mConNonqualAtleastCount; |
| 270 |
qint64 mConNonqualAtmostCount; |
| 271 |
qint64 mConSubclassCount; |
| 272 |
qint64 mConEquivalenceCount; |
| 273 |
|
| 274 |
|
| 275 |
qint64 mConPrimCount; |
| 276 |
qint64 mConCompCount; |
| 277 |
qint64 mPrimClassCount; |
| 278 |
qint64 mCompClassCount; |
| 279 |
|
| 280 |
|
| 281 |
qint64 mConFuncAtmostCount; |
| 282 |
qint64 mConValueCount; |
| 283 |
qint64 mConNominalIndividualCount; |
| 284 |
qint64 mConSelfCount; |
| 285 |
qint64 mConAutChooceCount; |
| 286 |
qint64 mConAutStateCount; |
| 287 |
qint64 mConAutTransCount; |
| 288 |
|
| 289 |
qint64 mRoleInvCount; |
| 290 |
qint64 mRoleEqCount; |
| 291 |
qint64 mRoleDisjCount; |
| 292 |
qint64 mRoleRangeConCount; |
| 293 |
qint64 mRoleDomainConCount; |
| 294 |
qint64 mRoleAsymmetricCount; |
| 295 |
qint64 mRoleSymmetricCount; |
| 296 |
qint64 mRoleFuncCount; |
| 297 |
qint64 mRoleInvFuncCount; |
| 298 |
qint64 mRoleTransCount; |
| 299 |
qint64 mRoleRefCount; |
| 300 |
qint64 mRoleIrrefCount; |
| 301 |
|
| 302 |
qint64 mIndiCount; |
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
bool mNegDisOccurrence; |
| 307 |
bool mExistOccurrence; |
| 308 |
bool mCardOccurrence; |
| 309 |
bool mQualCardOccurrence; |
| 310 |
bool mFunctionalityOccurrence; |
| 311 |
bool mTransitivityOccurrence; |
| 312 |
bool mRoleHierarchyOccurrence; |
| 313 |
bool mComplexSubRoleOccurrence; |
| 314 |
bool mUniversalRoleOccurrence; |
| 315 |
bool mInverseOccurrence; |
| 316 |
bool mNominalIndividualOccurrence; |
| 317 |
bool mNominalOccurrence; |
| 318 |
bool mGroundingOccurrence; |
| 319 |
bool mDatatypeOccurrence; |
| 320 |
|
| 321 |
|
| 322 |
QString expressString; |
| 323 |
bool mExpressStringCalc; |
| 324 |
|
| 325 |
// private methods |
| 326 |
private: |
| 327 |
|
| 328 |
// private variables |
| 329 |
private: |
| 330 |
|
| 331 |
}; |
| 332 |
|
| 333 |
}; // end namespace Ontology |
| 334 |
|
| 335 |
}; // end namespace Reasoner |
| 336 |
|
| 337 |
}; // end namespace Konclude |
| 338 |
|
| 339 |
#endif // KONCLUDE_REASONER_ONTOLOGY_CONTOLOGYSTRUCTURESUMMARY_H |