Debian Codegraph @

Source/Control/Command/Instructions/CParseOWL2XMLOntologyCommand.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 "CParseOWL2XMLOntologyCommand.h"
22
23
24 namespace Konclude {
25
26 namespace Control {
27
28 namespace Command {
29
30 namespace Instructions {
31
32 CParseOWL2XMLOntologyCommand::CParseOWL2XMLOntologyCommand(const QDomElement &ontologyNode, CKnowledgeBaseRevisionCommandProvider *ontologyRevisionProviderCommand, CCommand *parentSuperCommand)
33 : CParseOntologyCommand(parentSuperCommand) {
34
35 node = ontologyNode;
36 revProvider = ontologyRevisionProviderCommand;
37 addCommandPrecondition(new CCommandProcessedPrecondition(revProvider->getCommand()));
38 }
39
40
41 CParseOWL2XMLOntologyCommand::CParseOWL2XMLOntologyCommand(CReadXMLCommandProvider* xmlCommandProvider, CKnowledgeBaseRevisionCommandProvider *ontologyRevisionProviderCommand, CCommand *parentSuperCommand)
42 : CParseOntologyCommand(parentSuperCommand) {
43
44 mXmlCommandProvider = xmlCommandProvider;
45 revProvider = ontologyRevisionProviderCommand;
46 //addCommandPrecondition(new CCommandProcessedPrecondition(revProvider->getCommand()));
47 addCommandPrecondition(new CCommandProcessedPrecondition(xmlCommandProvider->getCommand()));
48 }
49
50 CParseOWL2XMLOntologyCommand::~CParseOWL2XMLOntologyCommand() {
51 }
52
53 qint64 CParseOWL2XMLOntologyCommand::getCommandTag() {
54 return PARSEOWL2XMLONTOLOGYCOMMAND;
55 }
56
57
58 QString CParseOWL2XMLOntologyCommand::getBriefCommandDescription() {
59 return QString("Parse-OWL2-XML-Ontology Command");
60 }
61
62 QDomElement CParseOWL2XMLOntologyCommand::getOntologyNode() {
63 if (node.isNull() && mXmlCommandProvider) {
64 node = mXmlCommandProvider->getReadXMLNode();
65 }
66 return node;
67 }
68
69
70 COntologyRevision *CParseOWL2XMLOntologyCommand::getOntologyRevision() {
71 return revProvider->getOntologyRevision();
72 }
73
74 CCommand *CParseOWL2XMLOntologyCommand::getCommand() {
75 return this;
76 }
77
78
79
80
81 }; // end namespace Instructions
82
83 }; // end namespace Command
84
85 }; // end namespace Control
86
87 }; // end namespace Konclude