Ah, so is the rule that an OntClass object, unlike a Resource, only exists within the context of a specific OntModel? Seems a reasonable general rule to follow for all the OntModel classes. Thanks.
On 4/29/2020 1:37 AM, Lorenz Buehmann wrote: > Can't you just use the URI?Like > > OntModel m = ... > OntClass owlThing = m.createClass(OWL.Thing.getURI()); > > or > > OntClass owlThing = (OntClass) m.createOntResource( OntClass.class, > null, OWL.Thing.getURI()); > > On 29.04.20 01:30, Steve Vestal wrote: >> OWL.Thing is a Resource. The OWL standard says "Declaration( Class( >> owl:Thing ) ) " is a declaration of this built-in entity, but a class >> cast (OntClass) OWL.Thing fails. The following also fails. >> >> Resource owlThing = OWL.Thing; >> OntClass classThing = owlThing.as(OntClass.class); >> >> Is there a way to get OWL.Thing as an OntClass? >>
