Lorenz, I am not very expert in Jena and thinking about it from few hours.
If we do something like this after the Jena rule,

 If (salary>10k)
employee.setOntClass(Programmer class)
else
employee.setOntClass(Manager class);

I dont know what this code will work, will work or not, but it is my
thinking in very abstract way.



On Sat, Jan 21, 2017 at 3:03 PM, Lorenz B. <
buehm...@informatik.uni-leipzig.de> wrote:

> Of course you have to handle it in your application code. And that's
> your task to solve this problem
> Again, rules infer new facts based on the existing facts. Nothing more,
> nothing less. No deletion or replacement of facts.
>
> > Lorenz, question arises then how to cope with it?
> >
> > On Fri, Jan 20, 2017 at 8:39 PM, Lorenz Buehmann <
> > buehm...@informatik.uni-leipzig.de> wrote:
> >
> >> Rules do not replace values - that's the nature of Jena rules and also
> >> other rule languages like SWRL - called monotonicity.
> >>
> >> More is not to say.
> >>
> >>
> >> On 20.01.2017 17:29, tina sani wrote:
> >>> I am asking why the Jena rules some times lead to duplicate values. By
> >>> duplicate values, I mean it does not over write the old values when
> >> certain
> >>> new values comes in.
> >>> I have a rule which says if an employee salary exceeds 10k usd, the
> >> emplyee
> >>> should be assigned to a Manager class else to Programmer class.
> >>>
> >>> In the early stages of the system, my rules assign her to Programmer
> when
> >>> salary is less than 10k and works fine.
> >>> When later the same employee salary exceeds the threshold, it assign it
> >> to
> >>> Manager class, again fine. But the problem is that it did not replace
> the
> >>> old value and I can see both the values in my file:
> >>> *Jim Type Programmer*
> >>> *Jim  Type  Manager*
> >>>
> >>> *Now should it be avoided and if yes how? From week, I am working on it
> >> but
> >>> so far failed.*
> >>>
> >>
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>
>

Reply via email to