Debian Codegraph @

Source/Control/Command/Instructions/CParseProcessSPARQLUpdateTextCommand.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 "CParseProcessSPARQLUpdateTextCommand.h"
22
23
24 namespace Konclude {
25
26 namespace Control {
27
28 namespace Command {
29
30 namespace Instructions {
31
32 CParseProcessSPARQLUpdateTextCommand::CParseProcessSPARQLUpdateTextCommand(const QString& updateText, CKnowledgeBaseRevisionCommandProvider *ontologyRevisionProviderCommand, CCommand *parentSuperCommand)
33 : CParseOntologyCommand(parentSuperCommand) {
34 mUpdateText = updateText;
35 mRevProvider = ontologyRevisionProviderCommand;
36 mUpdateTextSplitted = false;
37 addCommandPrecondition(new CCommandProcessedPrecondition(mRevProvider->getCommand()));
38 }
39
40
41 CParseProcessSPARQLUpdateTextCommand::CParseProcessSPARQLUpdateTextCommand(const QStringList& updateTextList, CKnowledgeBaseRevisionCommandProvider *ontologyRevisionProviderCommand, CCommand *parentSuperCommand)
42 : CParseOntologyCommand(parentSuperCommand) {
43 mUpdateTextList = updateTextList;
44 mRevProvider = ontologyRevisionProviderCommand;
45 mUpdateTextSplitted = true;
46 addCommandPrecondition(new CCommandProcessedPrecondition(mRevProvider->getCommand()));
47 }
48
49 CParseProcessSPARQLUpdateTextCommand::~CParseProcessSPARQLUpdateTextCommand() {
50 }
51
52 qint64 CParseProcessSPARQLUpdateTextCommand::getCommandTag() {
53 return PROCESSPARSESPARQLUPDATETEXTCOMMAND;
54 }
55
56
57 QString CParseProcessSPARQLUpdateTextCommand::getBriefCommandDescription() {
58 return QString("Process-Parse-SPARQL-Update Command");
59 }
60
61 QString CParseProcessSPARQLUpdateTextCommand::getSPARQLUpdateText() {
62 return mUpdateText;
63 }
64
65 QStringList CParseProcessSPARQLUpdateTextCommand::getSPARQLUpdateTextList() {
66 return mUpdateTextList;
67 }
68
69
70 bool CParseProcessSPARQLUpdateTextCommand::isUpdateTextSplitted() {
71 return mUpdateTextSplitted;
72 }
73
74
75 CCommand *CParseProcessSPARQLUpdateTextCommand::getCommand() {
76 return this;
77 }
78
79
80 COntologyRevision *CParseProcessSPARQLUpdateTextCommand::getOntologyRevision() {
81 return mRevProvider->getOntologyRevision();
82 }
83
84
85 }; // end namespace Instructions
86
87 }; // end namespace Command
88
89 }; // end namespace Control
90
91 }; // end namespace Konclude