No no no. Print the String of the rule to the command line and show this one to us. The current one isn't readable and can't be parsed for sure. And how should #MasterStudent be resolved?
And don't us such an old version of Jena! Version 3.2.0 is already available. > The rule error is > > Exception in thread "AWT-EventQueue-0" > com.hp.hpl.jena.reasoner.rulesys.Rule$ParserException: Triple with 1 nodes! > > > The rule is > > > [rule1:(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type > #MasterStudent) " > > + "(#MasterStudent http://www.w3.org/2000/01/rdf-schema#subClassOf > #Student )" > > > + " -> (?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type > #Student )]"; > > On Thu, Mar 9, 2017 at 11:46 AM, Lorenz B. < > buehm...@informatik.uni-leipzig.de> wrote: > >> That doesn't solve your original problem, please provide the error! >> >> RDFS reasoning is enough to cover that kind if inference, please read >> the documentation (as usual) [1] >> >> [1] https://jena.apache.org/documentation/inference/ >>> Thanks a lot Dave, Lorenz, so it means I dont have to write these rules >> and >>> it will be inferred automatically? How it will be executed,? I have >> default >>> model with no parameters and then the inferred model. >>> Should I pass the "OntModelSpec.OWL_MEM_MICRO_RULE_INF " to the default >>> model? >>> >>> On Thu, Mar 9, 2017 at 10:14 AM, Lorenz B. < >>> buehm...@informatik.uni-leipzig.de> wrote: >>> >>>> 1. That rule is unreadable again - at least for me. See how it is shown >>>> to the mailing list: http://jena.markmail.org/thread/akjkia6mysqhsq2i >>>> 2. Don't show the Java concatenated string but the rule as it's printed >>>> to the command line/console. Especially hereby one can see trivial >>>> syntax errors >>>> 3. As Dave said, it's totally unclear why you're always omitting obvious >>>> details - what kind of exception? >>>> 4. The rule doesn't make sense, since the second term of the premise >>>> doesn't contain any variable. It's not clear what you want to achieve >> here. >>>> (?x rdf:type :MasterStudent ) (:MasterStudent rdfs:subClassOf :Student ) >>>> -> (?x rdf:type :Student ) >>>> >>>> That rule would be covered by the rdf:type/rdfs:subClassOf rule in RDFS: >>>> >>>> (?x rdf:type ?C) (?C rdfs:subClassOf ?D) -> (?x rdf:type ?D) >>>> >>>> But in your rule the second term doesn't contribute to the reasoning >>>> process. The result would be the same with >>>> >>>> (?x rdf:type :MasterStudent ) -> (?x rdf:type :Student ) >>>> >>>> >>>> >>>> >>>> >>>>> On 08/03/17 13:29, kumar rohit wrote: >>>>>> Is there any problem in this rule. I am getting error here. >>>>> What error? >>>>> >>>>> It is much easier for us to help if you say explicitly what went wrong! >>>>> >>>>>> I used jena >>>>>> generic rule reasoner so is it sufficient also for executing rdfs sub >>>>>> class >>>>>> rules? >>>>>> >>>>>> *[rule1:(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type >>>>>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> >>>>>> http://www.semanticweb.org/t/ontologies#MasterStudent >>>>>> <http://www.semanticweb.org/t/ontologies#MasterStudent>) "* >>>>>> * + "( http://www.semanticweb.org/t/ontologies#MasterStudent >>>>>> <http://www.semanticweb.org/t/ontologies#MasterStudent>) >>>>>> http://www.w3.org/2000/01/rdf-schema#subClassOf >>>>>> <http://www.w3.org/2000/01/rdf-schema#subClassOf> >>>>>> http://www.semanticweb.org/t/ontologies#Student >>>>>> <http://www.semanticweb.org/t/ontologies#Student> )"* >>>>>> >>>>>> >>>>>> * + " -> (?x http://www.w3.org/1999/02/22- >>>> rdf-syntax-ns#type >>>>>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> >>>>>> http://www.semanticweb.org/t/ontologies#Student >>>>>> <http://www.semanticweb.org/t/ontologies#Student> )]"* >>>>> Almost impossible to read but at a glance it looks OK. >>>>> >>>>> 1. Please post messages as plain text. Your emailer has done horrid >>>>> things to the URIs. >>>>> >>>>> 2. The rule would be much easier to read if you use prefixes instead >>>>> of writing out the URIs longhand. >>>>> >>>>> 3. It's also possible to use the standard generic RDFS rules. You >>>>> don't have to write out your own special case rules for each >>>>> subClassOf relationship. >>>>> >>>>> Dave >>>>> >>>>> >>>> -- >>>> Lorenz Bühmann >>>> AKSW group, University of Leipzig >>>> Group: http://aksw.org - semantic web research center >>>> >>>> >>>> >> -- >> Lorenz Bühmann >> AKSW group, University of Leipzig >> Group: http://aksw.org - semantic web research center >> >> -- Lorenz Bühmann AKSW group, University of Leipzig Group: http://aksw.org - semantic web research center