This solve my problem, if works fine:

greaterThan(?S, 5000), lessThan(?S, 10000)

On Fri, Jan 13, 2017 at 12:29 AM, Lorenz Buehmann <
[email protected]> wrote:

> And what is the problem now? Sorry, but I don't get the point. Sometimes
> trying things out is much faster then asking maybe waiting hours for an
> answer. Adding the rule atom
>
> greaterThan (?S, 10000)
>
> is not an option for you?
>
>
>
> On 12.01.2017 22:25, tina sani wrote:
> > Thank you Dick but I also want the salary to be less than 10000. Because
> in
> > another rule I have condition if salary is greater than 10000, then
> > employee is type of NS:ChiefExective.
> > So in that case, Manager instance will also be assigned to
> ChiefExecutive.
> >
> > It means lowe and upper bound should be declared in rules.
> >
> > On Thu, Jan 12, 2017 at 10:48 PM, Dick Murray <[email protected]>
> wrote:
> >
> >> An example rule which you can test and then expand on is;
> >>
> >> [Manager: (?E rdf:type NS:Employee), (?E NS:netSalary ?S), greaterThan
> (?S,
> >> 5000) -> (?X rdf:type NS:Manager)]
> >>
> >> Also see https://jena.apache.org/documentation/inference/
> >>
> >>
> >> On 12 Jan 2017 19:15, "tina sani" <[email protected]> wrote:
> >>
> >> Well, I am not sure about greaterThan and lessThan keywords. Will this
> rule
> >> execute if it encounters salary b/w 5000 and 10,000?
> >>
> >> On Thu, Jan 12, 2017 at 8:53 PM, Joint <[email protected]> wrote:
> >>
> >>>
> >>> Have you tried it? What happened?
> >>> "Of course this will not execute because I skip proper syntax"
> >>> So you know the syntax isn't correct but still ask if it is correct..
> >>> Dick
> >>>
> >>> -------- Original message --------
> >>> From: tina sani <[email protected]>
> >>> Date: 12/01/2017  14:47  (GMT+00:00)
> >>> To: [email protected]
> >>> Subject: Semantic Of Jena rule
> >>>
> >>> The syntax and semantic of this rule is correct?
> >>>
> >>> ?emp rdf:type URI:Employee + ?emp URI:NetSalary ?salary+
> >>> greaterThan(?salary, 5000), lessThan(?salary, 10000)-> ?emp rdf:type
> >>> URI:Manager
> >>>
> >>> Of course this will not execute because I skip proper syntax, but I
> >> wonder
> >>> this rule will work or not if some employee have salary between 5000
> and
> >>> 10000.
> >>> I am confuse in greaterThan and lessThan part of the rule, if it will
> >> work
> >>> or not?
> >>>
>
>

Reply via email to