You say:
>   prefix ex:  <http://example.org/>
>
>   select ?individual where {
>     ?individual a ex:person .
>   }

But isnt it:

>   prefix ex:  <http://example.org/>
>
>   select ?individual where {
>     ?individual a ex:adult .
>   }

Gr Michel

-----Original Message-----
From: ameni ameni [mailto:[email protected]] 
Sent: woensdag 23 april 2014 4:32
To: [email protected]; [email protected]
Subject: Re: SPARQL and SWRL rules

Please is there more explanation for this purpose?
Thanks one more time


2014-04-22 15:59 GMT+02:00 Joshua TAYLOR <[email protected]>:

> On Mon, Apr 21, 2014 at 9:23 PM, ameni ameni 
> <[email protected]> wrote:
> > I create an ontology using Protégé 3.4.8 and also i create some SWRL
> rules.
> > Now i'am using Jena API to manipulate the ontology and i use the 
> > reasoner Pellet in order to support this rules.
> > For example, one of my a rule said :
> > person(x) and hasAge (x,y) and Age(y) and greaterThan (y,16) and
> > lessThan(60)
> > --> Adult(x)
> >
> > Now i need to construct a SPARQL query that can return the set of 
> > users
> who
> > are adult.
> >
> > What I'am asking for is how  can i define SPARQL queries based  on 
> > SWRL Rules?
>
> If you've already got the InfModel or OntModel that has the reasoner 
> attached, then the reasoner is responsible for running the rules at an 
> appropriate time.  You'd just be writing the SPARQL query:
>
>   prefix ex:  <http://example.org/>
>
>   select ?individual where {
>     ?individual a ex:person .
>   }
>
> and running it against that model as you would with any other model.
>
> //JT
>
>
> --
> Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
>



Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet 
de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u 
verzocht dat aan de afzender te melden en het bericht te verwijderen. TNO 
aanvaardt geen aansprakelijkheid voor de inhoud van deze e-mail, de wijze 
waarop u deze gebruikt en voor schade, van welke aard ook, die verband houdt 
met risico's verbonden aan het elektronisch verzenden van berichten.

 

This message may contain information that is not intended for you. If you are 
not the addressee or if this message was sent to you by mistake, you are 
requested to inform the sender and delete the message. TNO accepts no liability 
for the content of this e-mail, for the manner in which you use it and for 
damage of any kind resulting from the risks inherent to the electronic 
transmission of messages.

Reply via email to