On 26/01/2017 20:58, Olatunde Ayanleye wrote:
Hello Dave,
Thanks for the prompt reply, but i have tried this approach but i only get the 
Super classes inferred.I can't get the subclass which i was expecting jena to 
infer based on data property restriction.

That will depend on how you have inference set up, whether your model includes the ontology declarations and whether your declarations are correct.

In particular you said you were running your own rule. To get OWL inference on top of those you will either need to include the OWL rules in your rule set (and set the reasoner config accordingly) or you will need to layer an OWL InfModel on top of your GenericReasoner InfModel.

Dave

Kind regards,Olatunde

    On Thursday, 26 January 2017, 20:32, Dave Reynolds 
<[email protected]> wrote:


 On 26/01/2017 15:20, tina sani wrote:
How can I get all the classes of which an individual is a type? After Jena
rules executed, my individual has multiple class like:
Employee001 is of type: Worker, Programmer, Manager.

So can I get all these three classes in Jena ? I have read somewhere that
getOntClass() only return one class at a time and that is on random basis.

See OntResource#listRDFTypes or, if you just have a Resource then
Resource#listProperties(RDF.type) or, as Charles says, use SPARQL.

Dave



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus







---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Reply via email to