| 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_CLASSIFIER_CONTOLOGYCLASSIFICATIONITEM_H |
| 22 |
#define KONCLUDE_REASONER_CLASSIFIER_CONTOLOGYCLASSIFICATIONITEM_H |
| 23 |
|
| 24 |
// Libraries includes |
| 25 |
#include <QPair> |
| 26 |
|
| 27 |
// Namespace includes |
| 28 |
#include "ClassifierSettings.h" |
| 29 |
#include "CClassifiedCallbackDataContext.h" |
| 30 |
#include "CClassifierStatistics.h" |
| 31 |
|
| 32 |
// Other includes |
| 33 |
#include "Reasoner/Classification/CClassificationCalculationStatisticsCollection.h" |
| 34 |
#include "Reasoner/Classification/CClassificationStatisticsCollectionStrings.h" |
| 35 |
|
| 36 |
#include "Reasoner/Ontology/CConcreteOntology.h" |
| 37 |
#include "Reasoner/Ontology/COntologyProcessingStep.h" |
| 38 |
#include "Reasoner/Ontology/COntologyProcessingSteps.h" |
| 39 |
#include "Reasoner/Ontology/COntologyProcessingStepData.h" |
| 40 |
|
| 41 |
#include "Reasoner/Consistiser/CIndividualDependenceTrackingCollector.h" |
| 42 |
|
| 43 |
#include "Reasoner/Kernel/Task/CCalculationConfigurationExtension.h" |
| 44 |
|
| 45 |
#include "Concurrent/Callback/CCallbackListExecuter.h" |
| 46 |
|
| 47 |
// Logger includes |
| 48 |
#include "Logger/CLogger.h" |
| 49 |
|
| 50 |
|
| 51 |
namespace Konclude { |
| 52 |
|
| 53 |
using namespace Concurrent::Callback; |
| 54 |
|
| 55 |
namespace Reasoner { |
| 56 |
|
| 57 |
using namespace Ontology; |
| 58 |
using namespace Classification; |
| 59 |
using namespace Consistiser; |
| 60 |
|
| 61 |
using namespace Kernel::Task; |
| 62 |
|
| 63 |
namespace Classifier { |
| 64 |
|
| 65 |
|
| 66 |
/*! |
| 67 |
* |
| 68 |
* \class COntologyClassificationItem |
| 69 |
* \author Andreas Steigmiller |
| 70 |
* \version 0.1 |
| 71 |
* \brief TODO |
| 72 |
* |
| 73 |
*/ |
| 74 |
class COntologyClassificationItem { |
| 75 |
// public methods |
| 76 |
public: |
| 77 |
//! Constructor |
| 78 |
COntologyClassificationItem(CConfigurationBase *configuration, CClassifierStatistics *nextClassificationStatistics = 0); |
| 79 |
|
| 80 |
//! Destructor |
| 81 |
virtual ~COntologyClassificationItem(); |
| 82 |
|
| 83 |
|
| 84 |
virtual CConcreteOntology *getOntology(); |
| 85 |
|
| 86 |
virtual CCalculationConfigurationExtension *getCalculationConfiguration(); |
| 87 |
|
| 88 |
|
| 89 |
virtual COntologyClassificationItem *incCurrentCalculatingCount(qint64 incCount = 1); |
| 90 |
virtual COntologyClassificationItem *decCurrentCalculatingCount(qint64 decCount = 1); |
| 91 |
virtual qint64 getCurrentCalculatingCount(); |
| 92 |
|
| 93 |
virtual COntologyClassificationItem *setHasRemainingTests(bool moreTests = false); |
| 94 |
virtual bool hasRemainingTests(); |
| 95 |
|
| 96 |
virtual COntologyClassificationItem *doClassifiedCallback(); |
| 97 |
virtual COntologyClassificationItem *addClassifiedCallback(CCallbackData *callback); |
| 98 |
|
| 99 |
virtual qint64 getCalcedSatisfiableCount(); |
| 100 |
virtual qint64 getCalcedSubsumptionCount(); |
| 101 |
|
| 102 |
virtual CClassifierStatistics *getClassifierStatistics(); |
| 103 |
|
| 104 |
CClassificationStatisticsCollectionStrings* getClassificationStatisticsCollectionStrings(); |
| 105 |
|
| 106 |
CClassificationCalculationStatisticsCollection* getCalculationStatisticsCollection(); |
| 107 |
COntologyClassificationItem* reuseCalculationStatisticsCollection(CClassificationCalculationStatisticsCollection* statColl); |
| 108 |
|
| 109 |
|
| 110 |
bool isCollectProcessStatisticsActivated(); |
| 111 |
|
| 112 |
QList<COntologyProcessingRequirement*> getOntologyProcessingRequirementList(); |
| 113 |
COntologyClassificationItem* addOntologyProcessingRequirements(const QList<COntologyProcessingRequirement*>& reqList); |
| 114 |
|
| 115 |
CIndividualDependenceTrackingCollector* getIndividualDependenceTrackingCollector(); |
| 116 |
COntologyClassificationItem* setIndividualDependenceTrackingCollector(CIndividualDependenceTrackingCollector* indiDepTrackColl); |
| 117 |
|
| 118 |
|
| 119 |
COntologyProcessingStepData* getClassificationProcessingStep(); |
| 120 |
QTime* getInitializationTime(); |
| 121 |
|
| 122 |
// protected methods |
| 123 |
protected: |
| 124 |
|
| 125 |
// protected variables |
| 126 |
protected: |
| 127 |
CConcreteOntology *onto; |
| 128 |
|
| 129 |
CClassificationStatisticsCollectionStrings* mClassificationStatCollStrings; |
| 130 |
QList<CClassificationCalculationStatisticsCollection*> mReuseStatCollList; |
| 131 |
|
| 132 |
|
| 133 |
CCallbackListExecuter classifiedCallbackList; |
| 134 |
|
| 135 |
qint64 currentCalculatingCount; |
| 136 |
|
| 137 |
bool remainingTests; |
| 138 |
|
| 139 |
CClassifierStatistics *statistics; |
| 140 |
CCalculationConfigurationExtension *config; |
| 141 |
|
| 142 |
bool mConfCollectProcessStatistics; |
| 143 |
|
| 144 |
QList<COntologyProcessingRequirement*> mRequirementList; |
| 145 |
COntologyProcessingStepData* mClassifyProcessingStepData; |
| 146 |
|
| 147 |
|
| 148 |
CIndividualDependenceTrackingCollector* mIndiDepTrackingCollector; |
| 149 |
|
| 150 |
QTime mInitTime; |
| 151 |
|
| 152 |
// private methods |
| 153 |
private: |
| 154 |
|
| 155 |
// private variables |
| 156 |
private: |
| 157 |
|
| 158 |
}; |
| 159 |
|
| 160 |
}; // end namespace Classifier |
| 161 |
|
| 162 |
}; // end namespace Reasoner |
| 163 |
|
| 164 |
}; // end namespace Konclude |
| 165 |
|
| 166 |
#endif // KONCLUDE_REASONER_CLASSIFIER_CONTOLOGYCLASSIFICATIONITEM_H |