Hello Dave, thank you for your comment but is the semantic (logic) in the rule above correct? Because it does not give me the required result and when I query ?student rdf:type std:GoodStudent, it does not give me any result.
Regards On Sun, Sep 18, 2016 at 1:11 AM, Dave Reynolds <dave.e.reyno...@gmail.com> wrote: > On 17/09/16 22:31, javed khan wrote: > >> The error goes away but the rules does not work i-e I can not find the rdf >> type of GoodUser/GoodStudent. >> Also after result display, it gives me some exception . >> >> Exception in thread "AWT-EventQueue-0" >> com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Triple with 4 >> nodes! >> At '[ rule1: ( ?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type >> http://www.semanticweb.org/t/ontologies/2016/7/myOWL#User ) ( >> http://www.semanticweb.org/t/ontologies/2016/7/myOWL#User >> http://www.semanticweb.org/t/ontologies/2016/7/myOWL#score ?score + ) ' >> > > Look closely at the line above. You can see that there's a spurious "+" > character in your string. > > Dave > > > >> On Sat, Sep 17, 2016 at 12:15 PM, javed khan <javedbtk...@gmail.com> >> wrote: >> >> String rule="[rule1:(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type >>> http://www.semanticweb.org#Student) " + >>> >>> "( http://www.semanticweb.org#Student >>> http://www.semanticweb.org#GPA ?gpa ) + greaterThan(?gpa, 3) >>> >>> " -> (?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type >>> http://www.semanticweb.org#GoodUser )]"; >>> >>> GPA is a data property here, but it gives me error. I think the error is >>> in greaterThan(?score, 10) >>> >>> What is the error ? >>> >>> >> >