Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Get Annotations for OWLClass in OWLAPI

Tags:

java

owl

owl-api

I am using OWLAPI 4.0.1 as a global library from Maven in IntelliJ. I am seeing many examples on the Web for how to get annotations for a class (such as the one in this related question), but IntelliJ tells me there is no such getAnnotations() method. Other API code works fine, and I'm able to find classes and properties in an ontology. Has the OWLAPI changed, or am I missing something?

like image 749
Jim L. Avatar asked Dec 05 '25 10:12

Jim L.


1 Answers

Yes, this has changed in OWLAPI 4. Use EntitySearcher.getAnnotationObjects(cls.getIRI(), ontology) instead.

To search over the imports closure, pass the closure instead of the single ontology.

like image 103
Ignazio Avatar answered Dec 06 '25 22:12

Ignazio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!