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/ >
