Thanks Dave. We are materializing inferences during ontology initialization to avoid using reasoner subsequently (as it impacts performance).
So in that case I need to traverse the chain myself, correct? On Wed, Oct 25, 2017 at 9:33 AM, Dave Reynolds <[email protected]> wrote: > On 24/10/17 23:51, Martynas Jusevičius wrote: > >> Hi, >> >> I thought I understood how OntClass.listSuperClasses() works, but maybe I >> don't. >> >> I have such a class structure in my ontology (superclass is at the top): >> >> 3. https://www.w3.org/ns/ldt/document-hierarchy/domain#Item >> 2. http://atomgraph.com/ns/platform/domain#Item >> 1. https://localhost/admin/ns#AgentItem >> >> Yet when I'm debugging, I can see the pair-wise relationships, but not the >> chain all the way up from 1 to 3: >> >> 1. getOntology().getOntModel().getOntClass(" >> https://localhost/admin/ns#AgentItem >> ").listSuperClasses(false).toList().toString() >> >> [https://localhost/admin/ns#ItemOfAgentContainer, >> http://atomgraph.com/ns/platform/domain#Item] >> >> 2. getOntology().getOntModel().getOntClass(" >> http://atomgraph.com/ns/platform/domain#Item >> ").listSuperClasses(false).toList().toString() >> >> [https://www.w3.org/ns/ldt/document-hierarchy/domain#Item] >> >> I can see that within the method hasPropertyValue( >> getProfile().SUB_CLASS_OF(), "SUB_CLASS_OF", cls ) returns false. >> >> Why is that so? Is my usage wrong? >> >> Additional info: >> getOntology().getOntModel().getSpecification().getProfile() == OWLProfile >> getOntology().getOntModel().getSpecification().getReasoner() == null >> >> > If I recall correctly the OntModel API is designed to retrieve whatever is > stated within the underlying model. The notion was that there was no point > in having the OntModel API replicate what reasoning does. > > So to see the subclass closure you need to have a sufficient reasoner > configured. > > > Dave >
