On 03/12/16 16:05, javed khan wrote:
My question is what are the possible ways to implement the Jena rules?
Is it necessary that we should always execute the SPARQL query to implement
the rules? If not, what are the alternatives?
What if we just write rules in our Java code and do nothing other than:
Reasoner myreasoner = new GenericRuleReasoner(Rule.parseRules(rule));
InfModel infmodel = ModelFactory.createInfModel(myreasoner, model);
Sorry, don't follow the question.
Jena rules are the syntax for the built in Jena generic rules engine
which can be run as you show above.
You don't "implement the rules" by executing sparql queries you just run
the rules engine. You could compute the same results through using a
sequence of SPARQL queries and updates or through java code but that's
not the same thing as implementing the rules unless you have some sort
of jena-rules to "sequence of sparql updates" converter.
If you are talking about getting results out after running the rules
then your choices are SPARQL or the RDF API.
Dave