Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jena ConversionException while viewing owl:NamedIndividual as an OntClass

Tags:

owl

jena

ontology

I am getting the following Jena Named Individual Exception:

Cannot convert node http://www.w3.org/2002/07/owl#NamedIndividual 
to OntClass: it does not have rdf:type owl:Class or equivalent

I am unable to find some relevant answer to my problem. Is is due to OWL 2 incompatibility with OWL 1. What are the mitigation strategies available to me?

like image 849
Ali Ahmad Avatar asked Mar 23 '23 07:03

Ali Ahmad


1 Answers

Yes, Jena doesn't support OWL2 at the moment. However, you can just call setStrictMode(false) on your OntModel, and it will allow you to view that resource as a class by switching off strict checking.

like image 129
Ian Dickinson Avatar answered May 10 '23 05:05

Ian Dickinson