Debian Codegraph @

Source/Control/Command/Instructions/CConstructWriteFunctionalIndividualTypesQueryCommand.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 "CConstructWriteFunctionalIndividualTypesQueryCommand.h"
22
23
24 namespace Konclude {
25
26 namespace Control {
27
28 namespace Command {
29
30 namespace Instructions {
31
32 CConstructWriteFunctionalIndividualTypesQueryCommand::CConstructWriteFunctionalIndividualTypesQueryCommand(CKnowledgeBaseRevisionCommandProvider *ontologyRevisionProviderCommand, const QString& outputFileString, const QString& individualName, CCommand *parentSuperCommand)
33 : CPreconditionCommand(parentSuperCommand) {
34
35 mOutputFileName = outputFileString;
36 mIndividualName = individualName;
37 revProvider = ontologyRevisionProviderCommand;
38 query = 0;
39 addCommandPrecondition(new CCommandProcessedPrecondition(revProvider->getCommand()));
40 }
41
42
43 CConstructWriteFunctionalIndividualTypesQueryCommand::~CConstructWriteFunctionalIndividualTypesQueryCommand() {
44 delete query;
45 }
46
47 qint64 CConstructWriteFunctionalIndividualTypesQueryCommand::getCommandTag() {
48 return CONSTRUCTWRITEFUNCTIONALINDIVIDUALTYPESQUERYCOMMAND;
49 }
50
51
52 QString CConstructWriteFunctionalIndividualTypesQueryCommand::getBriefCommandDescription() {
53 return QString("Construct-WriteFunctionalIndividualTypes-Query Command");
54 }
55
56
57 CQuery *CConstructWriteFunctionalIndividualTypesQueryCommand::getQuery() {
58 return query;
59 }
60
61 CCommand *CConstructWriteFunctionalIndividualTypesQueryCommand::getCommand() {
62 return this;
63 }
64
65
66 CConstructWriteFunctionalIndividualTypesQueryCommand *CConstructWriteFunctionalIndividualTypesQueryCommand::setQuery(CQuery *knowledgeBaseQuery) {
67 query = knowledgeBaseQuery;
68 return this;
69 }
70
71 COntologyRevision *CConstructWriteFunctionalIndividualTypesQueryCommand::getOntologyRevision() {
72 COntologyRevision *rev = 0;
73 if (revProvider) {
74 rev = revProvider->getOntologyRevision();
75 }
76 return rev;
77 }
78
79 QString CConstructWriteFunctionalIndividualTypesQueryCommand::getOutputFileName() {
80 return mOutputFileName;
81 }
82
83 QString CConstructWriteFunctionalIndividualTypesQueryCommand::getIndividualName() {
84 return mIndividualName;
85 }
86
87 }; // end namespace Instructions
88
89 }; // end namespace Command
90
91 }; // end namespace Control
92
93 }; // end namespace Konclude