Skip to content

Commit

Permalink
- Fix defining entity
Browse files Browse the repository at this point in the history
  • Loading branch information
haideriqbal committed Aug 29, 2024
1 parent 5acda2b commit 498ff2c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dataload/linker/src/main/java/LinkerPass1.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ public static LinkerPass1Result run(String inputJsonFilename) throws IOException
String curieValue = curieObject.get("value").getAsString();
if(!curieValue.contains(":")) {
var definingOntologyId = entry.getValue().definingOntologyIds.iterator().next();
curieValue = entry.getValue().ontologyIdToDefinitions.get(definingOntologyId).curie.getAsJsonObject().get("value").getAsString();
curieObject.addProperty("value", curieValue);
result.iriToDefinitions.put(entry.getKey(), definitions);
EntityDefinition definingEntity = entry.getValue().ontologyIdToDefinitions.get(definingOntologyId);
if (definingEntity != null && definingEntity.curie != null) {
curieValue = definingEntity.curie.getAsJsonObject().get("value").getAsString();
curieObject.addProperty("value", curieValue);
result.iriToDefinitions.put(entry.getKey(), definitions);
}
}
}
}
Expand Down

0 comments on commit 498ff2c

Please sign in to comment.