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