Debian Codegraph @

Source/Control/Loader/CReasonerEvaluationOntologyExtractionLoader.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_CONTROL_LOADER_CREASONEREVALUATIONONTOLOGYEXTRACTIONLOADER_H
22 #define KONCLUDE_CONTROL_LOADER_CREASONEREVALUATIONONTOLOGYEXTRACTIONLOADER_H
23
24 // Libraries includes
25 #include <QString>
26 #include <QRegExp>
27 #include <QDomElement>
28 #include <QDir>
29
30 // Namespace includes
31 #include "LoaderSettings.h"
32 #include "CLoader.h"
33 #include "CLoaderFactory.h"
34
35 // Other includes
36 #include "Config/CConfigDataReader.h"
37
38 #include "Test/Evaluation/CReasonerEvaluationFiltering.h"
39
40 // Logger includes
41 #include "Logger/CLogger.h"
42 #include "Logger/CLogIdentifier.h"
43
44
45 #include <stdio.h>
46 #include <iostream>
47
48
49 namespace Konclude {
50
51 using namespace Logger;
52 using namespace Config;
53 using namespace Test;
54 using namespace Evaluation;
55
56 namespace Control {
57
58 namespace Loader {
59
60
61
62 /*!
63 *
64 * \class CReasonerEvaluationOntologyExtractionLoader
65 * \author Andreas Steigmiller
66 * \version 0.1
67 * \brief TODO
68 *
69 */
70 class CReasonerEvaluationOntologyExtractionLoader : public CLoader {
71 // public methods
72 public:
73 //! Constructor
74 CReasonerEvaluationOntologyExtractionLoader();
75
76 //! Destructor
77 virtual ~CReasonerEvaluationOntologyExtractionLoader();
78
79
80 virtual CLoader *init(CLoaderFactory *loaderFactory = 0, CConfiguration *config = 0);
81 virtual CLoader *load();
82 virtual CLoader *exit();
83
84
85
86 // protected methods
87 protected:
88 CLoader* extractOntologiesForDirectory(const QString& dirString, const QString& subDirPathString);
89
90 CLoader* extractOntologiesForTestcase(const QString& testFileNameString, const QString& testFilePathString, const QString& subDirPathString);
91
92
93 bool satisfiesExtractionCondition(const QString& testFileNameString, const QString& testFilePathString, const QString& subDirPathString, const QStringList& statisticList);
94
95
96 bool loadFilterConditions(const QString& fileNameString);
97
98
99 CLoader* addExtractedOntologyStatistics(const QString& testFileNameString, const QString& testFilePathString, const QString& subDirPathString, const QStringList& statisticList);
100 CLoader* copyExtractedOntology(const QString& testFileNameString, const QString& testFilePathString, const QString& subDirPathString);
101
102
103 CLoader* saveExtractedOntologyStatistics(const QString& fileNameString);
104
105 // protected variables
106 protected:
107 QString mInputDir;
108 QString mOutputDir;
109
110
111 QString mExtractedOntStatOutputFileString;
112
113
114 QString mOntologyStatisticsDir;
115 QString mFilterFile;
116
117
118 CReasonerEvaluationFiltering* mFiltering;
119
120 bool mCopyExtractedOntologyToOutput;
121 bool mCollectExtractedOntologyStatistics;
122
123 QList< QHash<QString,QString>* > mExtractedOntStatHashList;
124 QSet<QString> mExtractedStatsSet;
125 QList<QString> mExtractedStatsList;
126
127
128 CConfiguration *loaderConfig;
129
130
131 // private methods
132 private:
133
134 // private variables
135 private:
136
137 };
138
139 }; // end namespace Loader
140
141 }; // end namespace Control
142
143 }; // end namespace Konclude
144
145 #endif // KONCLUDE_CONTROL_LOADER_CREASONEREVALUATIONONTOLOGYEXTRACTIONLOADER_H