Debian Codegraph @

Source/Reasoner/Generator/CConcreteOntologyUpdateCollectorBuilder.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_GENERATOR_CCONCRETEONTOLOGYUPDATECOLLECTORBUILDER_H
22 #define KONCLUDE_REASONER_GENERATOR_CCONCRETEONTOLOGYUPDATECOLLECTORBUILDER_H
23
24
25 // Libraries includes
26 #include <QListIterator>
27 #include <QHash>
28 #include <QString>
29 #include <QObject>
30
31 // Namespace includes
32 #include "CConcreteOntologyBuildDataUpdater.h"
33 #include "CExpressionSplitter.h"
34 #include "CExpressionHasher.h"
35
36
37 // Other includes
38 #include "Reasoner/Ontology/CConcreteOntology.h"
39 #include "Reasoner/Ontology/CConcept.h"
40 #include "Reasoner/Ontology/CTBox.h"
41 #include "Reasoner/Ontology/CABox.h"
42 #include "Reasoner/Ontology/CRBox.h"
43 #include "Reasoner/Ontology/CAbbreviatedIRIName.h"
44 #include "Reasoner/Ontology/CIRIName.h"
45
46
47 #include "Utilities/CTrible.hpp"
48 #include "Utilities/CNegLinker.hpp"
49 #include "Utilities/CHashableIntConvertedNTuble.hpp"
50 #include "Utilities/CMemoryManager.hpp"
51 #include "Utilities/CDynamicExpandingMemoryManager.hpp"
52 #include "Utilities/Memory/CObjectAllocator.h"
53
54 #include "Parser/COntologyBuilder.h"
55
56 // Logger includes
57 #include "Logger/CLogger.h"
58
59
60
61
62
63 namespace Konclude {
64
65 using namespace Utilities;
66 using namespace Utilities::Memory;
67 using namespace Parser;
68
69 namespace Reasoner {
70
71 using namespace Ontology;
72
73 namespace Generator {
74
75 /*!
76 *
77 * \class CConcreteOntologyUpdateCollectorBuilder
78 * \author Andreas Steigmiller
79 * \version 0.1
80 * \brief TODO
81 *
82 */
83 class CConcreteOntologyUpdateCollectorBuilder : public CConcreteOntologyBuildDataUpdater {
84 // public methods
85 public:
86 CConcreteOntologyUpdateCollectorBuilder(CConcreteOntology* updateConcreteOntology);
87 virtual ~CConcreteOntologyUpdateCollectorBuilder();
88
89 virtual bool initializeBuilding();
90 virtual bool completeBuilding();
91
92 virtual bool tellOntologyAxiom(CAxiomExpression* axiom);
93 virtual bool retractOntologyAxiom(CAxiomExpression* axiom);
94
95 virtual bool addOntologyImport(const QStringRef& name);
96 virtual bool addOntologyImport(const QString& name);
97
98
99 QList<QString> takeAddedImportOntologyList();
100
101
102 virtual bool resetAxiomUpdates();
103
104 QSet<CAxiomExpression*>* getAddedAxiomSet();
105
106
107 // protected functions
108 protected:
109
110 // protected variables
111 protected:
112
113 // contains also previous ontology data
114 CONTOLOGYAXIOMSET<CAxiomExpression*>* mTellAxiomSet;
115 CONTOLOGYAXIOMSET<CAxiomExpression*>* mRetractAxiomSet;
116
117 CONTOLOGYAXIOMLIST< QPair<CAxiomExpression*,bool> >* mChangeAxiomList;
118
119 // contains only updated data
120 CONTOLOGYAXIOMSET<CAxiomExpression*>* mTellUpdatedAxiomSet;
121 CONTOLOGYAXIOMSET<CAxiomExpression*>* mRetractUpdatedAxiomSet;
122
123 CONTOLOGYAXIOMLIST< QPair<CAxiomExpression*,bool> >* mChangeUpdatedAxiomList;
124
125
126
127
128 QSet<CAxiomExpression*> mLocTellUpdatedAxiomSet;
129 QSet<CAxiomExpression*> mLocRetractUpdatedAxiomSet;
130
131 QList<QString> mLocAddedImportOntologies;
132
133 };
134
135 }; // end namespace Generator
136
137 }; // end namespace Reasoner
138
139 }; // end namespace Konclude
140
141 #endif // end KONCLUDE_REASONER_GENERATOR_CCONCRETEONTOLOGYUPDATECOLLECTORBUILDER_H