Skip to content

Upgrade to OWL API 5 - #1295

Draft
jamesaoverton wants to merge 5 commits into
masterfrom
v2
Draft

jamesaoverton wants to merge 5 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.

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.
balhoff pushed a commit to geneontology/obographs that referenced this pull request Nov 4, 2026
* Upgrade to OWL API 5.5.1

Bump owlapi-distribution from 4.5.16 to 5.5.1 (same version as
ontodev/robot#1295). FromOwl now sorts InverseObjectProperties operands
and renders annotation values without OWLLiteral.toString(), since both
changed behaviour in OWL API 5. Regenerate examples/ for the OWL API 5
OBO parser fixes and axiom sort order.

Add junit-jupiter-engine so surefire actually runs the JUnit 5 tests,
and declare Immutables as an annotation processor path so clean builds
work on JDK 23+.

* Address review of OWL API 5.5.1 upgrade

Bump Jackson from 2.12.7 to 2.16.1 to match owlapi-distribution, and
let OgYamlReader read YAML over SnakeYAML's new 3 MB default limit.
FromOwl now renders axiom annotation values through
getAnnotationValueString() too, so anonymous individual values no
longer throw. Nodes with several labels or definitions keep the
alphanumerically first one instead of whatever OWL API sorts last
(#107); examples/hp regenerated.

Add tests for inverse operand order, literal synonym types, anonymous
individual annotations and the label/definition rule. Switch to the
junit-jupiter aggregator (5.11.4) with surefire 3.5.2, move the
Immutables version into a property, and build CI on JDK 17, 21 and 25.

* Update version from 0.3.2 -> 0.4.0

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.

2 participants