On 25/07/16 19:33, javed khan wrote:
I have a Student class (Phd students) and Teacher class, having instances.
There are some students which are also Teacher (teaching to junior
classes).
?x rdf:type ont:Student   ?y rdf:type ont:Teacher -->  ?
This will give us Students and teachers instances.

I want Jena generic rule(Forward chaining) which filters those who are both
Teachers and Students. Is there any way to do so?

Yes. You are nearly there but you want the rule body to be more like:

(?x rdf:type ont:Student)  (?x rdf:type ont:Teacher) ->  ...

the rule consequent could assert a new type or some other property to indicate that ?x is in both classes.

Dave

Reply via email to