Debian Codegraph @

Source/Reasoner/Preprocess/COntologyPreprocessingItem.cpp

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 #include "COntologyPreprocessingItem.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Preprocess {
29
30
31 COntologyPreprocessingItem::COntologyPreprocessingItem() {
32 }
33
34 COntologyPreprocessingItem* COntologyPreprocessingItem::initPreprocessingItem(CConcreteOntology* ontology, CConfigurationBase* config) {
35 mOntology = ontology;
36 mConfig = config;
37 mPreprocessingFinishedFlag = false;
38 return this;
39 }
40
41 COntologyPreprocessingItem* COntologyPreprocessingItem::addProcessingRequirement(COntologyProcessingRequirement* ontoRequirement) {
42 ontoRequirement->submitRequirementUpdate(COntologyProcessingStatus::PSCOMPLETELYYPROCESSED, COntologyProcessingStatus::PSFAILED | COntologyProcessingStatus::PSUNSUPPORTED);
43 return this;
44 }
45
46 bool COntologyPreprocessingItem::isPreprocessingFinished() {
47 return mPreprocessingFinishedFlag;
48 }
49
50 COntologyPreprocessingItem* COntologyPreprocessingItem::setPreprocessingFinished(bool finished) {
51 mPreprocessingFinishedFlag = finished;
52 return this;
53 }
54
55 COntologyPreprocessingItem* COntologyPreprocessingItem::doPreprocessingFinishedCallback(bool doCallbacks) {
56 if (doCallbacks) {
57 mCallbackExecuter.doCallback();
58 }
59 return this;
60 }
61
62 COntologyPreprocessingItem* COntologyPreprocessingItem::addPreprocessingFinishedCallback(CCallbackData* callback) {
63 mCallbackExecuter.addCallbackData(callback);
64 return this;
65 }
66
67 CConcreteOntology* COntologyPreprocessingItem::getOntology() {
68 return mOntology;
69 }
70
71
72 CConfigurationBase* COntologyPreprocessingItem::getConfiguration() {
73 return mConfig;
74 }
75
76 QSet<CPreprocessingTestingItem*>* COntologyPreprocessingItem::getPreprocessingTestingItemSet() {
77 return &mTestItemSet;
78 }
79
80
81 cint64 COntologyPreprocessingItem::getCurrentPreprocessingTestingCount() {
82 return mTestItemSet.count();
83 }
84
85
86 bool COntologyPreprocessingItem::hasCurrentPreprocessingTestingCount() {
87 return mTestItemSet.count() > 0;
88 }
89
90
91 }; // end namespace Preprocess
92
93 }; // end namespace Reasoner
94
95 }; // end namespace Konclude