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 ascending or descending way. The purpose of doing so
is to find out whether the employee progresses or not. If she earns in
ascending order like 150, 200, 280 and 300 Euro, it means progresses.
Thanks for understanding.
If you mean you have simply four copies of the property then they aren't
ordered. E.g.
:employee :employee_income 150, 200, 280, 300 .
is exactly the same set of RDF triples as:
:employee :employee_income 300, 200, 150, 280 .
and
:employee :employee_income 300 .
:employee :employee_income 200 .
:employee :employee_income 280 .
:employee :employee_income 150 .
triples aren't ordered.
You can certainly use SPARQL to query for values and to sort them.
If you want to test if the income increased in order then you need to
represent either the date of the income or the order in which the income
arrived in your data. Once you've decided how you will do that then
there will be ways in SPARQL or rules to do the test for progression.
Dave