Debian Codegraph @

Source/Reasoner/Classifier/CNodeTopDownTraversalClassificationItem.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_CLASSIFIER_CNODETOPDOWNTRAVERSALCLASSIFICATIONITEM_H
22 #define KONCLUDE_REASONER_CLASSIFIER_CNODETOPDOWNTRAVERSALCLASSIFICATIONITEM_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "ClassifierSettings.h"
29 #include "CClassifierStatistics.h"
30 #include "CNodeBlockedClassificationItem.h"
31
32 // Other includes
33 #include "Reasoner/Ontology/CConcreteOntology.h"
34
35 #include "Reasoner/Taxonomy/CTaxonomy.h"
36
37 // Logger includes
38 #include "Logger/CLogger.h"
39
40
41 namespace Konclude {
42
43 namespace Reasoner {
44
45 using namespace Ontology;
46 using namespace Taxonomy;
47
48 namespace Classifier {
49
50
51 /*!
52 *
53 * \class CNodeTopDownTraversalClassificationItem
54 * \author Andreas Steigmiller
55 * \version 0.1
56 * \brief TODO
57 *
58 */
59 class CNodeTopDownTraversalClassificationItem : public CNodeBlockedClassificationItem {
60 // public methods
61 public:
62 //! Constructor
63 CNodeTopDownTraversalClassificationItem(CHierarchyNode *node, CHierarchyNode *topNode, QList<CNodeTopDownTraversalClassificationItem *> *lockedReleaseProcessingList);
64
65 //! Destructor
66 virtual ~CNodeTopDownTraversalClassificationItem();
67
68
69 CNodeBlockedClassificationItem *releaseBlockedResumeProcessing();
70 CNodeBlockedClassificationItem *releaseTestingBlockedResumeProcessing(CConcept *subsumerConcept, CConcept *subsumedConcept, bool testingResult);
71
72
73 CHierarchyNode *getTraversalNode();
74
75 QList<CHierarchyNode *> *getTestingNodeList();
76 CNodeTopDownTraversalClassificationItem *appendTestingNodeList(QList<CHierarchyNode *> &nodeList);
77 CNodeTopDownTraversalClassificationItem *appendTestingNode(CHierarchyNode *node);
78
79 QList<CHierarchyNode *> *getParentNodeList();
80 CNodeTopDownTraversalClassificationItem *appendParentNodeList(QList<CHierarchyNode *> &nodeList);
81 CNodeTopDownTraversalClassificationItem *appendParentNode(CHierarchyNode *parentNode);
82
83 QList<CHierarchyNode *> *getBranchLockedNodeList();
84 CNodeTopDownTraversalClassificationItem *appendBranchLockedNodeList(QList<CHierarchyNode *> &nodeList);
85 CNodeTopDownTraversalClassificationItem *appendBranchLockedNode(CHierarchyNode *branchNode);
86
87 bool hasNextTestingNode();
88 CHierarchyNode *takeNextTestingNode();
89 CHierarchyNode *getTestingNode();
90 CNodeTopDownTraversalClassificationItem *clearTestingNode();
91 bool getTestingResult();
92 CHierarchyNode *getEquivalentTestingNode();
93 CNodeTopDownTraversalClassificationItem *setEquivalentTestingNode(CHierarchyNode *equivalentTestingNode);
94
95 bool hasDirectBranchLockedNode();
96 CHierarchyNode *getDirectBranchLockedNode();
97 CNodeTopDownTraversalClassificationItem *setDirectBranchLockedNode(CHierarchyNode *parentLockedNode);
98
99 QList<CHierarchyNode *> *getNewBranchNodeList();
100 CNodeTopDownTraversalClassificationItem *appendNewBranchNodeList(QList<CHierarchyNode *> &nodeList);
101 CNodeTopDownTraversalClassificationItem *appendNewBranchNode(CHierarchyNode *branchNode);
102
103 CNodeTopDownTraversalClassificationItem* setAlreadyTraversedDirectBlockedSuccessorNode(bool alredyTraversed);
104 bool hasAlreadyTraversedDirectBlockedSuccessorNode();
105
106 // protected methods
107 protected:
108
109 // protected variables
110 protected:
111 CHierarchyNode *traversalNode;
112 CHierarchyNode *parLockNode;
113 CHierarchyNode *testNode;
114 CHierarchyNode *eqTestNode;
115
116 QList<CHierarchyNode *> testingNodeList;
117 QList<CHierarchyNode *> branchLockedNodeList;
118 QList<CHierarchyNode *> newBranchNodeList;
119 QList<CHierarchyNode *> parentNodeList;
120
121 QSet<CHierarchyNode *> branchLockedNodeSet;
122
123
124
125 QList<CNodeTopDownTraversalClassificationItem *> *lockedReleaseProcList;
126
127
128 bool subSumTestingResult;
129 bool alredyTraversedDirectBlockedSuccessorNode;
130
131
132 // private methods
133 private:
134
135 // private variables
136 private:
137
138 };
139
140 }; // end namespace Classifier
141
142 }; // end namespace Reasoner
143
144 }; // end namespace Konclude
145
146 #endif // KONCLUDE_REASONER_CLASSIFIER_CNODETOPDOWNTRAVERSALCLASSIFICATIONITEM_H