From 053e4165a541d00508f7696a4e2dcbec4298ce5b Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Wed, 24 Jan 2024 22:42:43 +0000 Subject: [PATCH] Fix forced use of oboInOwl namespace when translating OBO IDs. 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 --- .../java/org/obolibrary/obo2owl/OWLAPIObo2Owl.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/oboformat/src/main/java/org/obolibrary/obo2owl/OWLAPIObo2Owl.java b/oboformat/src/main/java/org/obolibrary/obo2owl/OWLAPIObo2Owl.java index 0c6063f408..186c9ce340 100644 --- a/oboformat/src/main/java/org/obolibrary/obo2owl/OWLAPIObo2Owl.java +++ b/oboformat/src/main/java/org/obolibrary/obo2owl/OWLAPIObo2Owl.java @@ -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;