Skip to content

Commit

Permalink
Fix null URI in OntologyTerm.getChildren
Browse files Browse the repository at this point in the history
It's mentioned in jena that the URI can be null of the term is a bnode.

This is causing the following issue: PavlidisLab/Gemma#247
  • Loading branch information
arteymix committed Dec 8, 2021
1 parent ff6abf8 commit 9d79a3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ubic/basecode/ontology/model/OntologyTermImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,9 @@ private void getChildren( boolean direct, Collection<OntologyTerm> work ) {
ExtendedIterator<OntClass> iterator = ontResource.listSubClasses( true );
while ( iterator.hasNext() ) {
OntClass c = iterator.next();
// URI can be null if the ont is a bnode (no idea what it is, but we have to handle this)
// some reasoners will infer owl#Nothing as a subclass of everything
if ( c.getURI().equals( NOTHING ) ) continue;
if ( c.getURI() == null || c.getURI().equals( NOTHING ) ) continue;

if ( USE_PROPER_PART_RESTRICTIONS && c.isRestriction() ) {

Expand Down

0 comments on commit 9d79a3e

Please sign in to comment.