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 <[email protected]> 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"); >
