Thanks Dave and Lorenz for your response.

What if we have entered the score for a student in Cryptography and
SoftwareEngineering and did not entered for Networking subject and stored
something like this in our owl file:

Student1

 Name: Bob
 CryptographyScore: 60
 SoftwareEngineeringScore: 80
 //NetworkingScore, not mentioned here

Then will the above rule fires?



On Wed, Jan 4, 2017 at 11:35 AM, Lorenz B. <
[email protected]> wrote:

> Inline comments:
> > I have three subjects marks for a student.
> >  Cryptography, Networking, Software Engineering with different marks for
> > each student.
> > I want to calculate in which subject a student got maximum marks using
> Jena
> > rule and will set that subject as HighScoreSubject of the student (
> > HighScoreSubject is data propety) whose values will be one of these three
> > subjects.
> >
> > Is this rule correct to get the required result ( I am asking this
> because
> > I am not getting the result required)
> Without seeing the data, it's always difficult to say if something is
> correct or not. Sample data makes things easier.
> And without knowing how you apply the rules (in a correct syntax) it's
> even harder. That means, it's always good to show the relevant code.
> >
> > ?x rdf:type std:Student + ?x std:CryptographyScore ?score1 + ?x
> > std:NetworkingScore ?score2 + ?x std:SEScore ?score3 +
> > greaterThan(?score1,?score2), greaterThan(?score1, ?score3) -->
> > ?x std:HighScoreSubject std:Cryptography
> >
> This rule covers only the case when the score for Cryptography is the
> highest. If your data doesn't contain a student that matches the rule,
> nothing will happen.
>
>
> Cheers,
> Lorenz
>
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>
>
>

Reply via email to