Debian Codegraph @

Source/Control/Loader/CCommandLineTranlatorHelpLoader.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 "CCommandLineTranlatorHelpLoader.h"
22
23
24 namespace Konclude {
25
26 namespace Control {
27
28 namespace Loader {
29
30
31 CCommandLineTranlatorHelpLoader::CCommandLineTranlatorHelpLoader() {
32 }
33
34
35
36 CCommandLineTranlatorHelpLoader::~CCommandLineTranlatorHelpLoader() {
37 }
38
39
40 CLoader *CCommandLineTranlatorHelpLoader::init(CLoaderFactory *loaderFactory, CConfiguration *config) {
41
42 return this;
43 }
44
45
46
47
48 CLoader *CCommandLineTranlatorHelpLoader::load() {
49
50 CLogger::getInstance()->waitSynchronization();
51 LOG(INFO, "::Konclude::Loader::OWLlinkTranslationHelpLoader", logTr(
52 "Usage: 'Konclude' <command> [parameters]\n"
53 "\n"
54 "Available commands:\n"
55 "\towllinkfile : Processes an OWLlink request file, which has to be specified with the parameter -i.\n"
56 "\towllinkserver : Listening on the specified port (default 8080) for OWLlink requests sent over HTTP.\n"
57 "\tclassification : Classifies the ontology that is specified with the parameter -i.\n"
58 "\tconsistency : Checks the consistency of the ontology that is specified with the parameter -i.\n"
59 "\tsatisfiability : Checks the satisfiability of the class that is specified with -x for the ontology specified with -i.\n"
60 "\trealization : Realizes the ontology that is specified with -i (or only a certain individual that is specified with -x).\n"
61 "\tsparqlfile : Processes a SPARQL request file, which has to be specified with the parameter -s, results are written to the file specified by -o.\n"
62 "\t\t\t(an ontology can be given with -i or via a SPARQL Update LOAD command in the SPARQL file)\n"
63 "\tsparqlserver : Listening on the specified port (default 8080) for SPARQL requests sent via HTTP POST.\n"
64 "\n"
65 "Configurable parameter:\n"
66 "\t-w X : Configures the number of processing threads. X has to be an integer greater than 0 or 'AUTO' for\n"
67 "\t\t\tscaling the number of processing threads to the number of computer cores.\n"
68 "\t-c FILEPATH : Path and file name of the config file.\n"
69 "\t-i FILEPATH : Path and file name of the ontology input file / OWLlink request file.\n"
70 "\t-o FILEPATH : Path and file name of the output / (SPARQL) result / (OWLlink) response file.\n"
71 "\t-s FILEPATH : Path and file name of the SPARQL request/query file.\n"
72 "\t-x IRI : IRI of the input entity.\n"
73 "\t-p PORT: Specifies PORT as the listening port for the OWLlink/SPARQL server.\n"
74 "\t-a : Periodically prints the progress of the current activities.\n"
75 "\t-v : Shows loading and processing times in more detail.\n"
76 "\t-h : Shows this help (overwrites all other arguments/parameters).\n"
77 "\n"
78 "Examples:\n"
79 "\tKonclude owllinkfile -i Tests/test-request.xml -o test-response.xml\n"
80 "\tKonclude owllinkfile -c Configs/default-config.xml -i Tests/test-request.xml -o test-response.xml\n"
81 "\tKonclude owllinkserver -w 2 -c Configs/default-config.xml -p 8080\n"
82 "\tKonclude satisfiability -i Tests/galen.owl.xml -x http://ex.test/galen#ExternalIliacVein\n"
83 "\tKonclude classification -w AUTO -i Tests/roberts-family-full-D.owl.xml -o Tests/roberts-family-full-D-class.owl.xml\n"
84 "\tKonclude realization -w AUTO -i Tests/roberts-family-full-D.owl.xml -o Tests/roberts-family-full-D-real.owl.xml\n"
85 "\tKonclude sparqlfile -s Tests/lubm-univ-bench-sparql-load-and-query-test.sparql -o Tests/query-answers.xml\n"
86 "\tKonclude sparqlfile -s Tests/roberts-family-full-sparql-existential-variables-query-test.sparql -i Tests/roberts-family-full-D.owl.xml\n"
87 "\tKonclude sparqlserver -p 8080 -c Configs/querying-config.xml\n"
88 "\n"
89 ),this);
90
91 CLogger::getInstance()->waitSynchronization();
92 QCoreApplication::exit();
93
94 return this;
95 }
96
97 CLoader *CCommandLineTranlatorHelpLoader::exit() {
98 return this;
99 }
100
101
102
103 }; // end namespace Loader
104
105 }; // end namespace Control
106
107 }; // end namespace Konclude