Debian Codegraph @

Source/Control/Loader/CCLISPARQLBatchProcessingLoader.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 "CCLISPARQLBatchProcessingLoader.h"
22
23
24 namespace Konclude {
25
26 namespace Control {
27
28 namespace Loader {
29
30
31 CCLISPARQLBatchProcessingLoader::CCLISPARQLBatchProcessingLoader() {
32 }
33
34
35
36 CCLISPARQLBatchProcessingLoader::~CCLISPARQLBatchProcessingLoader() {
37 }
38
39
40 CLoader *CCLISPARQLBatchProcessingLoader::init(CLoaderFactory *loaderFactory, CConfiguration *config) {
41 CCLIBatchProcessingLoader::init(loaderFactory, config);
42
43 mSPARQLFileNameString = CConfigDataReader::readConfigString(config, "Konclude.SPARQL.RequestFile");
44 return this;
45 }
46
47
48 void CCLISPARQLBatchProcessingLoader::createTestingCommands() {
49 createRealizationTesingCommands();
50 }
51
52
53 void CCLISPARQLBatchProcessingLoader::createRealizationTesingCommands() {
54 logOutputMessage(QString("Starting SPARQL query processing for ontology '%1'.").arg(mRequestFileString));
55 QString testKB = QString("http://konclude.com/test/kb");
56 CCreateKnowledgeBaseCommand* createKBCommand = new CCreateKnowledgeBaseCommand(testKB);
57 QStringList ontoIRIList;
58 ontoIRIList.append(mRequestFileString);
59 //CLoadKnowledgeBaseOWLXMLOntologyCommand* loadKBCommand = new CLoadKnowledgeBaseOWLXMLOntologyCommand(testKB,ontoIRIList);
60 CLoadKnowledgeBaseOWLAutoOntologyCommand* loadKBCommand = new CLoadKnowledgeBaseOWLAutoOntologyCommand(testKB,ontoIRIList);
61 //CRealizeQueryCommand* realizeKBCommand = new CRealizeQueryCommand(testKB);
62 addProcessingCommand(createKBCommand);
63 addProcessingCommand(loadKBCommand);
64 //addProcessingCommand(realizeKBCommand);
65 if (!mResponseFileString.isEmpty()) {
66 //CWriteCustomQueryCommand* writeTypesCommand = new CWriteCustomQueryCommand(testKB,CWriteQuery::WRITEINDIVIDUALFLATTENEDTYPES,new CWriteQueryFileOWL2XMLSerializer(mResponseFileString));
67 //addProcessingCommand(writeTypesCommand);
68 }
69 processNextCommand();
70 }
71
72
73
74
75
76 }; // end namespace Loader
77
78 }; // end namespace Control
79
80 }; // end namespace Konclude