yeah, punning is a new feature of OWL 2, Jena does only support OWL 1 and some parts of OWL 2. Whether there is a workaround or room for a feature request, Dave Reynolds knows better for sure.

On 24.10.21 13:48, Martynas Jusevičius wrote:
Could this be the reason?
“ OWL DL includes all OWL language constructs with restrictions such as
type separation (a class can not also be an individual or property, a
property can not also be an individual or class).”

https://www.w3.org/TR/owl-guide/

On Sun, 24 Oct 2021 at 13.43, Steve Vestal <steve.ves...@adventiumlabs.com>
wrote:

I omitted a detail that seems to be important.

                          //OntModel m = ModelFactory.createOntologyModel();
                          OntModel m =
ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
                          String uri = "http://ex.org/A";;
                          OntClass cls = m.createClass(uri);
                          cls.createIndividual(uri);
                          System.out.println("Test model " + uri);
                          m.write(System.out, "Turtle");

If I run the version without an OntModelSpec, it works.  If I run the
version with OntModelSpec.OWL_DL_MEM, then I get a ConversionException.
I am running Jena 3.17.  The Javadoc says the default is a "weak
reasoner."  I may be able to work around this in this one app, but I'm
wondering what will happen when the model is later loaded with another
choice of reasoner such as OWL_DL_MEM or Openllet.

On 10/20/2021 5:30 AM, Lorenz Buehmann wrote:
OntModel m = ModelFactory.createOntologyModel();
String uri = "http://ex.org/A";;
OntClass cls = m.createClass(uri);
cls.createIndividual(uri);
m.write(System.out, "Turtle");

Reply via email to