Allow multiple --axiom options
@@ -259,9 +259,12 @@ public class CommandLineHelper {
* @return set of OWLAxiom types
*/
public static Set<Class<? extends OWLAxiom>> getAxiomValues(CommandLine line) {
- // TODO: Should this support multiple --axioms options?
Set<Class<? extends OWLAxiom>> axiomTypes = new HashSet<>();
- String axiom = getDefaultValue(line, "axioms", "all");
+ List<String> axiomTypeStrings = getOptionValues(line, "axioms");
+ if (axiomTypeStrings.isEmpty()) {
+ axiomTypeStrings.add("all");
+ }
+ for (String axiom : axiomTypeStrings) {
if (axiom.equalsIgnoreCase("all")) {
axiomTypes.add(OWLAxiom.class);
} else if (axiom.equalsIgnoreCase("logical")) {
@@ -283,12 +286,13 @@ public class CommandLineHelper {
axiomTypes.add(OWLDisjointObjectPropertiesAxiom.class);
axiomTypes.add(OWLDisjointDataPropertiesAxiom.class);
axiomTypes.add(OWLDisjointUnionAxiom.class);
- } else if (axiom.equalsIgnoreCase("class-assertion")) {
+ } else if (axiom.equalsIgnoreCase("type")) {
axiomTypes.add(OWLClassAssertionAxiom.class);
- // TODO: Any others?
+ // TODO: Make a-box, t-box, r-box
} else {
throw new IllegalArgumentException(String.format(axiomTypeError, axiom));
}
+ }
return axiomTypes;
}
