Skip to content

Package: Command

Command

nameinstructionbranchcomplexitylinemethod
Command(String, int, OptionParser, String)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
static {...}
M: 0 C: 140
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 9
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (C) 2022 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jopa.owl2java.cli;
16:
17: import joptsimple.OptionParser;
18:
19: public enum Command {
20: help(CommandParserProvider.getCommandHelp(), String.join(System.lineSeparator(),
21: "Help command gives hints on how to use other commands. Try 'OWL2Java help <command>' for"
22: + " more specific info.",
23: "", "Syntax: OWL2Java help <command>", "")),
24:
25: list(CommandParserProvider.getCommandList(), String
26: .join(System.lineSeparator(), "Lists all available IC contexts.", "",
27: "Syntax: OWL2Java list <ontology_iri> [ <options> ].", "")),
28:
29: transform(CommandParserProvider.getCommandTransform(), String
30: .join(System.lineSeparator(),
31: "Transforms all ICs into annotated Java classes.", "",
32: "Syntax: OWL2Java transform <ontology_iri> [ <options> ].", "")),
33:
34: vocabulary(CommandParserProvider.getCommandVocabulary(), String
35: .join(System.lineSeparator(), "Generates vocabulary based on the ICs.", "",
36: "Syntax: OWL2Java vocabulary <ontology_iri> [ <options> ].", "")),
37:
38: version(CommandParserProvider.getCommandVersion(), "Prints the version of the OWL2Java tool.");
39:
40: public final OptionParser parser;
41: public final String helpText;
42:
43: Command(OptionParser parser, String help) {
44: this.parser = parser;
45: this.helpText = help;
46: }
47: }