On 28/07/16 19:36, javed khan wrote:
I have instances from GraduateCourses and UnderGradCourses classes:

GraduateCourses                             UnderGradCourses

Computer Vision                               Databases
Network Security                               Network Security
Neural Networks                                Assembly Language
Semantic Web                                  Semantic Web

?x  rdf:type  std:GradCourses                ?y  rdf:type
 std:UnderGradCourses

Now ?x  and  ?y  contains courses with "Semantic Web and Network security"
common in both.

Can we do some arithmetic or comparison inside Jena rules which will
query/answer us the courses which are common in both?


(?x rdf:type std:GradCourses) (?x rdf:type std:UnderGradCourses)
   -> (?x rdf:type std:BothGradAndUnderGradCourses)

or whatever you want to call the intersection class.

This sort of intersection checking is possible in rules, in OWL or in SPARQL queries. Just depends what you want to do.

Dave

Reply via email to