Skip to content

Commit

Permalink
if IRI cannot be shorted to CURIE, then return unmodified IRI
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Jan 13, 2017
1 parent 4f71b70 commit de98aab
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import org.semanticweb.owlapi.reasoner.OWLReasoner;
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory;

import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.googlecode.javaewah.EWAHCompressedBitmap;
import com.hp.hpl.jena.query.Query;
Expand Down Expand Up @@ -174,7 +175,13 @@ private String getShortForm(IRI iri) {
if (curieUtil.getCurieMap().isEmpty()) {
return iri.toString();
} else {
return curieUtil.getCurie(iri.toString()).get();
Optional<String> curie = curieUtil.getCurie(iri.toString());
if (curie.isPresent()) {
return curie.get();
}
else {
return iri.toString();
}
}
}

Expand Down

0 comments on commit de98aab

Please sign in to comment.