Join GitHub today
BFO fails to load in API version 4.0.X #405
I'm not sure exactly why this is happening, but in the OWL API 4.0.1 and 4.0.2 The BFO (Basic Formal Ontology) fails to load, and so do any ontologies which depend on it. The error produced is:
Removing the offending annotations repeatedly reveals that there are four lines in BFO which bring about this error:
BFO was known to load properly in API version 3.4.10, but seems to have broken in the 4.0 series.
The error arises because of duplicated annotation axioms in the ontology - this confuses the code enough that it's trying to add the second annotation to the first axiom parsed. However, there's really no need to fail in this case: the duplicated axiom is identical to the existing axiom, so it can be dropped silently.
The exception was introduced at some point after 3.4.10, but there is no detail on exactly what was being achieved by adding it. The exact commit that made the change seems to have been lost in history when I refactored the parsers packages.
There are no tests failing because of the change, so I'm adding a fragment of BFO that reproduces the error to our test suite.