Skip to content

Fix: wrong ontology IRI due to OWL API bug #1080 - #220

Closed
Artemis-IA wants to merge 1 commit into
VisualDataWeb:masterfrom
Artemis-IA:fix-owlapi-1080
Closed

Fix: wrong ontology IRI due to OWL API bug #1080#220
Artemis-IA wants to merge 1 commit into
VisualDataWeb:masterfrom
Artemis-IA:fix-owlapi-1080

Conversation

@Artemis-IA

Copy link
Copy Markdown

Summary

  • Update Dockerfile to build OWL2VOWL from a fork that uses a patched OWL API 5.1.1
  • Fixes owlcs/owlapi#1080: wrong ontology IRI displayed when an ontology has owl:imports + self-referencing annotations

Problem

When WebVOWL loads an ontology that has both owl:imports declarations and a self-referencing annotation (e.g. rdfs:isDefinedBy → <ontology-iri>), the ontology IRI shown in the WebVOWL UI is incorrect — it displays an imported ontology's IRI (e.g. http://www.w3.org/ns/prov-o) instead of the actual ontology IRI.

This is caused by a bug in OWL API's RDF/XML parser (not in WebVOWL or OWL2VOWL). Self-referencing annotations are valid and standard semantic web practice.

Fix

This PR changes the Dockerfile to build OWL2VOWL from Artemis-IA/OWL2VOWL (branch fix-owlapi-1080), which upgrades the OWL API dependency to a patched version of 5.1.1 built via JitPack.

The OWL API fix was originally committed by @vChavezB (commit b1768cdf) on the version5 branch, but no Maven release has been published.

Related PRs

Test plan

  • Docker image builds successfully with the patched OWL2VOWL
  • Functional test: WebVOWL correctly displays https://w3id.org/earthsemantics/OSO instead of http://www.w3.org/ns/prov-o
  • 192 classes, 280 properties — same as before (no regression)
  • Unit tests for the OWL API fix: 6/6 pass with fix, 2 fail without fix

Once upstream is fixed

When both owlcs/owlapi publishes a release AND VisualDataWeb/OWL2VOWL merges the dependency upgrade, this Dockerfile should be reverted to use VisualDataWeb/OWL2VOWL:master.

Update Dockerfile to build OWL2VOWL from Artemis-IA/OWL2VOWL
(branch fix-owlapi-1080) which uses a patched OWL API 5.1.1
that fixes owlcs/owlapi#1080.

Bug #1080: when an ontology declares owl:imports and has a
self-referencing annotation (e.g. rdfs:isDefinedBy → ontology IRI),
OWL API incorrectly assigns an imported ontology's IRI as the main
ontology IRI, causing WebVOWL to display the wrong ontology IRI.

See:
- owlcs/owlapi#1080
- VisualDataWeb/OWL2VOWL#75
- owlcs/owlapi#1178
@Artemis-IA

Copy link
Copy Markdown
Author

Closing this PR. We need to run more comprehensive tests across all OSO ontology versions before submitting. Will reopen once validation is complete.

@Artemis-IA Artemis-IA closed this Sep 2, 2026
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.

circular property ( like rdfs:isDefinedBy or dcterms:isVersionOf ) in .ttl causes owl:imports to overwrite OntologyIRI

1 participant