Skip to content

Upgrade to OWL API 5 - #1295

Draft
jamesaoverton wants to merge 4 commits into
masterfrom
v2
Draft

jamesaoverton wants to merge 4 commits into
masterfrom
v2

Conversation

@jamesaoverton

@jamesaoverton jamesaoverton commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

The Protégé project is upgrading to OWL API 5.5.1 and we want ROBOT to stay in sync. protegeproject/protege#1351

Here is the OWL API migration guide.

The code is compiling and the unit tests are passing, with the exception of some now marked @Ignored (see below). The command line integration tests are not yet passing.

Done:

  • migrate from Guava Optional to java,utl.Optional
    • replace .or() with orElse()
    • replace .orNull() with .orElse(null)
    • sometimes use .orElseThrow(...)
  • convert EntitySearcher streams back into collections by adding .collect(Collectors.toList())
  • update HermiT to 1.4.5.519 -- but see this issue Update and verify bundled HermiT for Protégé 6 protegeproject/protege#1352
  • update JFact to 5.0.3
  • update owlexplanation to 5.0.1 and make minor API changes
  • rename *PrefixOWLOntologyFormat to *PrefixOWLDocumentFormat
  • replace various Set<_> with Stream<_>, and replace .size() with .count()
  • remove ReferencedEntitySetProvider and replace with ontology.getSignature(Imports.INCLUDED)
  • remove try/catch when certain exceptions can no longer be thrown, e.g. RioRenderer no longer throws IOException
  • rename OntologyHelper.getObjects(OWLAxiom) to getAxiomObjects(OWLAxiom), avoiding an ambiguity with getObjects(OWLOntology) -- this breaks our japicmp backwards compatibility checks, but I don't think it can be helped
  • replace OWLOntologyLoaderConfiguration with OntologyConfigurator
  • update owl-diff @balhoff -- many of our tests rely on diffs, and these are all disabled for now

To Do:

@jamesaoverton jamesaoverton changed the title Upgrade to OWLAPI 5 Upgrade to OWL API 5 Oct 7, 2026
*/
@Nonnull
@Override
public Stream<OWLOntology> ontologies() {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is required to implement HasGetOntologies.

Comment thread robot-core/src/main/java/org/obolibrary/robot/IOHelper.java Outdated
Comment thread robot-core/src/test/java/org/obolibrary/robot/CoreTest.java Outdated
balhoff pushed a commit to owlcollab/expression-materializing-reasoner that referenced this pull request Oct 20, 2026
Same OWL API version as ROBOT (ontodev/robot#1295). Depends on owlapi-api and owlapi-impl (OWLReasonerBase moved there in v5) instead of owlapi-distribution. Test reasoners moved to ELK 0.6.0 and HermiT 1.4.5.519, Java target to 11.

test1 now asserts against expected-superclasses-over.tsv, recorded with OWL API 4.2.5 before the upgrade; all 244 inferences match.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant