Re: Jena rules

2016-09-24 Thread Dave Reynolds
On 23/09/16 13:05, javed khan wrote: The first rule here works and save the individual as GoodStudent when marks is greater than 2 but not assign individual to WorstStudent when marks are less than 2? Where I am doing mistake here ? It's hard to tell without a clean copy of your rules. Your

Re: Jena rules

2016-09-24 Thread Andy Seaborne
Send a plain text email. Are you sending HTML? It seems to be auto-converted to plain text so send plain text to start with. We see https://lists.apache.org/thread.html/d4eaf76467ff74ffaf7c58300f994959245db56593a6d837d407d8d2@%3Cusers.jena.apache.org%3E On 24/09/16 09:37, javed khan wrote:

Re: computing multiple values of single data property

2016-09-24 Thread Dave Reynolds
On 23/09/16 23:17, tina sani wrote: For instance, I have a data property employee_income which have four values for each employee. Employee1 have income Euro 200, Euro 300, Euro 150, and Euro 280 . Is there any way using Jena rules or other way, in which we compute/compare these values in some

Re: computing multiple values of single data property

2016-09-24 Thread tina sani
My data arrives and saved randomly to my owl file: These four values are the income of employee's four weeks so in week1, he earns 200, week2 300 week3 150 and week4 280. I need some sorting in which I can describe if the Employee progresses each week according to his salary. If he earns like

Re: computing multiple values of single data property

2016-09-24 Thread tina sani
Well I do not know how to do what you have comment ( re-model your data first, such that you have a timestamp or whatever. Then you could use SPARQL CONSTRUCT). But I wish it could possible because it is an integral part of my project. Regards On Sat, Sep 24, 2016 at 4:30 AM, Lorenz B. <

Re: computing multiple values of single data property

2016-09-24 Thread Lorenz B.
Hello Tina, as Dave said, there is no sorting for rules. You need to re-model your data first, such that you have a timestamp or whatever. Then you could use SPARQL CONSTRUCT Kind regards, Lorenz > My data arrives and saved randomly to my owl file: These four values are > the income of

Re: Jena rules

2016-09-24 Thread javed khan
Hello Dave, I am sorry but I think this is the problem of emailer because I just copied and pasted it. I have used it single time and also in my Netbeans IDE I used WorstStudent for second rules, not GoodStudent. The first rule you knows as you have answered it in previous emails and my second

Re: Jena rules

2016-09-24 Thread Lorenz B.
Without seeing the data, what can we do? > The first rule here works and save the individual as GoodStudent when marks > is greater than 2 but not assign individual to WorstStudent when marks are > less than 2? Where I am doing mistake here ? > > > > String rule = "[rule1:(?x

Re: Overwrite data of ontology

2016-09-24 Thread kumar rohit
I used this: customer.setPropertyValue(property, pricevariable); property here is property name:Item price and pricevariable is int value but it gives me error of : *int can not be converted to RDF Node* On Sat, Sep 24, 2016 at 8:29 AM, Dave Reynolds wrote: > On

Re: Overwrite data of ontology

2016-09-24 Thread kumar rohit
Thanks Soroka and Dave, but how I can do it dynamically? I used this Property property=model.getProperty(name space+ "Item price"); and then customer_1.addLiteral(property, Text Field value); Now how to remove previously entered values? Any built-in methods? On Sat, Sep 24, 2016 at 6:48 AM, A.

Re: computing multiple values of single data property

2016-09-24 Thread Dave Reynolds
On 24/09/16 13:27, tina sani wrote: Well I do not know how to do what you have comment ( re-model your data first, such that you have a timestamp or whatever. Then you could use SPARQL CONSTRUCT). One way is to think about being paid a wage as an event, so you have something like:

Re: Overwrite data of ontology

2016-09-24 Thread Dave Reynolds
On 24/09/16 14:33, kumar rohit wrote: I want to save item price entered by users in file. Samsung Galaxy hasPrice ?value. User enter some value and it is stored in the file. After some time, another price for same Samsung Galaxy is entered and it is stored. But the problem is that the old price

Re: Slow SPARQL query

2016-09-24 Thread Andy Seaborne
On 23/09/16 09:35, Mikael Pesonen wrote: Hi, I have another query that is behaving illogically to me. I am searching for terms in SKOS vocabulary and also need to retrieve topmost level concept for each search result. This query returns entire skos:broader hierarchy for search results and

Overwrite data of ontology

2016-09-24 Thread kumar rohit
I want to save item price entered by users in file. Samsung Galaxy hasPrice ?value. User enter some value and it is stored in the file. After some time, another price for same Samsung Galaxy is entered and it is stored. But the problem is that the old price is also there. How can I overwrite the

Re: Overwrite data of ontology

2016-09-24 Thread Dave Reynolds
On 24/09/16 15:37, kumar rohit wrote: Thanks Soroka and Dave, but how I can do it dynamically? I used this Property property=model.getProperty(name space+ "Item price"); and then customer_1.addLiteral(property, Text Field value); Now how to remove previously entered values? Any built-in

Re: Overwrite data of ontology

2016-09-24 Thread A. Soroka
Remove the old triple and add a new one with the new value. --- A. Soroka The University of Virginia Library > On Sep 24, 2016, at 9:33 AM, kumar rohit wrote: > > I want to save item price entered by users in file. Samsung Galaxy hasPrice > ?value. > User enter some

Jena rules

2016-09-24 Thread javed khan
This is the code where the first rules works and the second does not. String rule = "[rule1:(?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.semanticweb.org/#Student) " + "( ?x http://www.semanticweb.org#GPA ?marks )" + "greaterThan(?marks, 2) "