Debian Codegraph @

Source/Parser/COntologyMultiAutoParsingLoader.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_PARSER_CONTOLOGYMULTIAUTOPARSINGLOADER_H
22 #define KONCLUDE_PARSER_CONTOLOGYMULTIAUTOPARSINGLOADER_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "COntologyParser.h"
29 #include "CRDFRedlandRaptorParser.h"
30 #include "CRDFRedlandRaptorSimpleConcurrentParser.h"
31 #include "COWL2QtXMLOntologyStableStreamParser.h"
32 #include "COWL2QtXMLOntologyStreamParser.h"
33
34 // Other includes
35 #include "Parser/FunctionalJAVACC/COWL2FunctionalJAVACCOntologyStreamParser.h"
36
37
38 #include "Config/CConfigDataReader.h"
39
40 #include "Control/Command/CCommandRecordRouter.h"
41 #include "Control/Command/Records/CUnspecifiedMessageErrorRecord.h"
42
43 #include "Reasoner/Generator/CConcreteOntologyUpdateCollectorBuilder.h"
44 #include "Reasoner/Generator/CConcreteOntologyRedlandTriplesDataExpressionMapper.h"
45
46 #include "Reasoner/Revision/COntologyConfigurationExtension.h"
47
48 #include "Reasoner/Ontology/CConcreteOntology.h"
49
50 // Logger includes
51 #include "Logger/CLogger.h"
52 #include "Logger/CLogIdentifier.h"
53
54 using namespace Konclude::Logger;
55
56 namespace Konclude {
57
58 using namespace Config;
59 using namespace Control::Command;
60 using namespace Reasoner::Generator;
61 using namespace Reasoner::Revision;
62 using namespace Reasoner::Ontology;
63
64 namespace Parser {
65
66 using namespace FunctionalJAVACC;
67
68
69
70 /*!
71 *
72 * \class COntologyMultiAutoParsingLoader
73 * \author Andreas Steigmiller
74 * \version 0.1
75 * \brief TODO
76 *
77 */
78 class COntologyMultiAutoParsingLoader : public COntologyParser, public CLogIdentifier {
79 // public methods
80 public:
81 //! Constructor
82 COntologyMultiAutoParsingLoader(CConcreteOntology *ont = nullptr, COntologyConfigurationExtension *ontConfig = nullptr);
83
84 //! Destructor
85 virtual ~COntologyMultiAutoParsingLoader();
86
87
88 virtual bool parseOntologyFile(const QString& filename);
89 virtual bool parseOntologyFile(QIODevice* device);
90
91 bool parseOntology(QIODevice* device, const QString& ontoIRI, const QString& resolvedIRI, CConcreteOntology *ont, COntologyConfigurationExtension *ontConfig, QList<QString>& importOntologiesList, QStringList& parserErrorList, CCommandRecordRouter& commandRecordRouter);
92 bool parseOntology(QIODevice* device, const QString& ontoIRI, const QString& resolvedIRI, CConcreteOntology *ont, CConcreteOntologyUpdateCollectorBuilder* builder, COntologyConfigurationExtension *ontConfig, QList<QString>& importOntologiesList, QStringList& parserErrorList, CCommandRecordRouter& commandRecordRouter);
93
94
95 QStringList getParserOrderFromFileName(const QString& fileName);
96
97
98 // protected methods
99 protected:
100
101 #ifdef KONCLUDE_REDLAND_INTEGRATION
102 bool parseOntologyWithRaptor(QIODevice* device, CConcreteOntologyUpdateCollectorBuilder *builder, const QString& format, const QString& formatName, const QString& resolvedIRI, QString& parsingTryLogString, QStringList& parserErrorList, CConfiguration* configuration, CCommandRecordRouter& commandRecordRouter);
103 #endif // !KONCLUDE_REDLAND_INTEGRATION
104
105
106 // protected variables
107 protected:
108
109 CConcreteOntology* mOnt;
110 COntologyConfigurationExtension* mOntConfig;
111
112 // private methods
113 private:
114
115 // private variables
116 private:
117
118 };
119
120 }; // end namespace Parser
121
122 }; // end namespace Konclude
123
124 #endif // KONCLUDE_PARSER_CONTOLOGYMULTIAUTOPARSINGLOADER_H