Skip to content

Commit

Permalink
Fix forced use of oboInOwl namespace when translating OBO IDs.
Browse files Browse the repository at this point in the history
This commit rewrites part of the OWLAPIObo2Owl#oboIdToIRI_load() method
so that the oboInOwlDefault parameter is only used when translating
unprefixed IDs (where it instructs to create an IRI in the oboInOwl
namespace instead of the ontology's default namespace). When translating
a prefixed ID, the IRI to construct should always use the URL prefix
dictated by the prefix.

closes #1112
  • Loading branch information
gouttegd authored and ignazio1977 committed Jan 24, 2024
1 parent 8f3c5a6 commit 053e416
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1548,15 +1548,7 @@ public IRI loadOboToIRI(String id, boolean oboInOwlDefault) {
}
}
}
// TODO - treat_xrefs_as_equivalent
// special case rule for relation xrefs:
// 5.9.3. Special Rules for Relations
if (!id.contains(":")) {
String xid = translateShorthandIdToExpandedId(id);
if (!xid.equals(id)) {
return oboIdToIRI(xid);
}
}

String[] idParts = id.split(":", 2);
String uriPrefix;
String localId;
Expand Down

0 comments on commit 053e416

Please sign in to comment.