Skip to content

Commit aa3982d

Browse files
committed
Allow using CURIEs in some command line options.
Make it possible to use a CURIE-like syntax with the `--follow-in` and `--not-follow-in` options of the `odk:subset` command (as advertised in the documentation). That is, --follow-in UBERON: is treated as equivalent to: --follow-in http://purl.obolibrary.org/obo/UBERON_ Likewise for the `--base-iri` option in the `odk:check-align` command.
1 parent c6b60a8 commit aa3982d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/org/incenp/obofoundry/odk/CheckAlignmentCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void performOperation(CommandState state, CommandLine line) throws Except
9090
boolean failOnError = CommandLineHelper.getBooleanValue(line, "fail", true);
9191
if ( line.hasOption("base-iri") ) {
9292
for ( String iri : line.getOptionValues("base-iri") ) {
93-
basePrefixes.add(iri);
93+
basePrefixes.add(getIRI(iri, "base-iri").toString());
9494
}
9595
}
9696
factory = state.getOntology().getOWLOntologyManager().getOWLDataFactory();

src/main/java/org/incenp/obofoundry/odk/SubsetCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ public void performOperation(CommandState state, CommandLine line) throws Except
100100
}
101101
if ( line.hasOption("follow-in") ) {
102102
for ( String prefix : line.getOptionValues("follow-in") ) {
103-
extractor.includePrefix(prefix);
103+
extractor.includePrefix(getIRI(prefix, "follow-in").toString());
104104
}
105105
}
106106
if ( line.hasOption("not-follow-in") ) {
107107
for ( String prefix : line.getOptionValues("not-follow-in") ) {
108-
extractor.excludePrefix(prefix);
108+
extractor.excludePrefix(getIRI(prefix, "not-follow-in").toString());
109109
}
110110
}
111111

0 commit comments

Comments
 (0)