Hi all,

We are using Apache Jena in our project and noticed that the 
GenericRuleReasoner InfGraph is lazy. Namely, after a SPARQL INSERT query on 
the dataset, the matching rules do not get applied immediately. Only after 
performing a SPARQL SELECT query on the dataset, the matching rules will be 
applied.

We would like to disable this lazy behavior, because it conflicts with our use 
case, but we are not sure how to do it properly (and less brute force). 
Currently, we attach a GraphListener to that graph in which we force a 
prepare() each time one of GraphListener's update methods is called, but this 
has some side effects (among others the reapplying of rules that were already 
applied) that we would like to prevent. I assume there is a less brute force 
manner to kick the reasoner into action (similar to what a SPARQL SELECT query 
achieves), but I'm not sure what this is. If I look at the source code of Jena 
I see several candidates, like the BaseInfGraph.rebind() and 
BaseInfGraph.reset() method, are those better options?

Does anyone has an idea how to achieve non-laziness of the InfGraph some other 
way?

Thanks in advance!

Barry



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