On 19/07/13 09:15, deepa nagaraj wrote:
Hi everyone, my requirement is below: We have automobile rdf file, need to generate the triple by using this. please find the attachment of rdf file. when i query it with owl:sameAs property i'm unable to retrieve the whole hierarchy. for ex: Sedans is same as both car as well as vehicle (should get GMCrossovers, GMSportConvertible etc by using inference ).
This is a very strange ontology. I think you mean all of these relations to be owl:subClassOf.
ex:Sedan is a sub class of ex:Car, it should not be "same as".
but i'm getting only car .
Perhaps you are not using inference. Since you haven't shown (a complete, minimal, example of) your code it is hard to tell.
Assuming you are using the OntAPI then make sure you are using OntModelSpec.OWL_MEM_MINI_RULE_INF or OntModelSpec.OWL_MEM_RULE_INF
If you fix your ontology and so look at sub class hierarchies then you won't need this. You can use the OntAPI to traverse the hierarchy.
If you do need inference I would normally recommend OWL_MEM_MICRO_RULE_INF rather than the full rule set unless you truly want sameAs reasoning.
Dave
