Re: Super classes/Sub classes in Jena rules

2016-12-02 Thread tina sani
Thanks Lorenz I have fixed it. Yes its projects of last semester, but each have different domain. The complexity of the project increases each month as our adviser demands for more and more. On Fri, Dec 2, 2016 at 11:16 AM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > I don't

Re: Super classes/Sub classes in Jena rules

2016-12-02 Thread Lorenz B.
I don't understand why people think that "^" is the conjunction of rule atoms? The documentation [1] says "," has to be used as functor in Jena. Note, that this is just implementation dependent and other frameworks might use a different symbol. One question from my side: Somebody else was

Re: Super classes/Sub classes in Jena rules

2016-12-01 Thread tina sani
Hello Lorenz, Dave, I have used the above method and suddenly I get this exception: WARN [AWT-EventQueue-0] (Rule.java:947) - Rule references unimplemented functor: ^ Where it comes from? On Sun, Nov 27, 2016 at 2:59 PM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > > > > Hi Dave,

Re: Super classes/Sub classes in Jena rules

2016-11-27 Thread Lorenz B.
> Hi Dave, > > So in that case we dont need to add non-inference model to the generic > reasoner because after all, our whole data is in the model. Yes, it is simply nested: Raw model A is "contained" in the inferred RDFS model B. B is "contained" in your user-defined rule model C. Thus, A is

Re: Super classes/Sub classes in Jena rules

2016-11-26 Thread tina sani
Hi Dave, So in that case we dont need to add non-inference model to the generic reasoner because after all, our whole data is in the model. On Sat, Nov 26, 2016 at 11:55 AM, Dave Reynolds wrote: > On 25/11/16 13:54, tina sani wrote: > >> I have something like this

Re: Super classes/Sub classes in Jena rules

2016-11-26 Thread Dave Reynolds
On 25/11/16 13:54, tina sani wrote: I have something like this after my Jena forward chain rules and SPARQL query: Reasoner reasoner1 = new GenericRuleReasoner(Rule.parseRules(rule)); InfModel inf = ModelFactory.createInfModel(reasoner1, model); Reasoner reasoner2 =

Re: Super classes/Sub classes in Jena rules

2016-11-25 Thread tina sani
I have something like this after my Jena forward chain rules and SPARQL query: Reasoner reasoner1 = new GenericRuleReasoner(Rule.parseRules(rule)); InfModel inf = ModelFactory.createInfModel(reasoner1, model); Reasoner reasoner2 = ReasonerRegistry.getRDFSReasoner(); InfModel inf2 =

Re: Super classes/Sub classes in Jena rules

2016-11-25 Thread tina sani
So all I should so is to create rdfs model: InfModel inf2 = ModelFactory.createRDFSModel(); What would be the arguments of the ModelFactory.createRDFSModel(). I have two models here, one the simple non inference model and other the inference model : InfModel inf =

Re: Super classes/Sub classes in Jena rules

2016-11-25 Thread Lorenz B.
> Yes I use GenericRuleReasoner, so using the following rules along with my > own rules will solve the problem? > > ?x rdfs:subClassOf emp:ContractEmployee--> ?x rdfs:subClassOf emp:Employee > ?x rdfs:subClassOf emp:PermanantEmployee--> ?x rdfs:subClassOf emp:Employee That might be incomplete as

Re: Super classes/Sub classes in Jena rules

2016-11-25 Thread tina sani
Yes I use GenericRuleReasoner, so using the following rules along with my own rules will solve the problem? ?x rdfs:subClassOf emp:ContractEmployee--> ?x rdfs:subClassOf emp:Employee ?x rdfs:subClassOf emp:PermanantEmployee--> ?x rdfs:subClassOf emp:Employee On Thu, Nov 24, 2016 at 11:39 AM,

Re: Super classes/Sub classes in Jena rules

2016-11-24 Thread Lorenz B.
> If I pass OntModelSpec.OWL_MEM_MICRO_RULE_INF” to the OntModel, will it do > the RDFS reasoning? See [1] in general and in particular [2] which shows how to setup an RDFS reasoner InfModel inf = ModelFactory.createRDFSModel(rdfsExample); or Reasoner reasoner =

Re: Super classes/Sub classes in Jena rules

2016-11-23 Thread Lorenz B.
Dave meant that you need an additional layer of reasoning like RDFS or even less to get the inferences that you describe. This can be done by a) nesting two InfModels one that works on your specific rules and one that uses some kind of RDFS or b) adding the particular rules to your set of rules

Re: Super classes/Sub classes in Jena rules

2016-11-22 Thread tina sani
Ok sorry Dave, actually I did not completely understand your answer. "You could have an inference model with the appropriate configuration to deduce membership of employee" Yes I have the inference model: Reasoner reasoner = new GenericRuleReasoner(Rule.parseRules(rule)); InfModel infer

Re: Super classes/Sub classes in Jena rules

2016-11-22 Thread Dave Reynolds
On 22/11/16 14:56, tina sani wrote: Let me explain a bit. String rule = "[rule1:(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.semanticweb.org#Employee) " + "( ?x http://www.semanticweb.org#Salary ?salary )" + "greaterThan(?salary, 10,00) "

Re: Super classes/Sub classes in Jena rules

2016-11-22 Thread tina sani
Let me explain a bit. String rule = "[rule1:(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.semanticweb.org#Employee) " + "( ?x http://www.semanticweb.org#Salary ?salary )" + "greaterThan(?salary, 10,00) " + " -> (?x

Re: Super classes/Sub classes in Jena rules

2016-11-22 Thread Dave Reynolds
On 22/11/16 10:12, tina sani wrote: Inline image 1 The mail list doesn't support attachments so the image didn't come through. However, I'm guessing it included a class Employee with sub-classes ContractEmployee and PermanantEmployee. I have this ontology: Now if I want to use some rules

Super classes/Sub classes in Jena rules

2016-11-22 Thread tina sani
[image: Inline image 1] I have this ontology: Now if I want to use some rules like if x rdf:type Employee and ?x salary>Euro10,000. then ?x QualifiedEmployee. My question here is should I use ?x rdf:type Employee or ?x rdf:type ContractEmployee or PermanantEmployee ContractEmployee or