Dave Reynolds will be able to say more, but my understanding is that inferred 
triples are _not_ added to the model in the sense in which we might use 
Model::add to add a Statement. They are simply presented by the implementation 
as the model is scanned, "injected" by the inference machinery, so to speak.

As for your use case, perhaps you could use a rule to do this? Again, I don't 
know a lot about this end of Jena, but perhaps you could write a custom 
built-in function for the rules system [1] .

ajs6f

[1] https://jena.apache.org/documentation/inference/index.html#builtins

> On Jan 7, 2019, at 10:32 AM, Nouwt, B. (Barry) <[email protected]> 
> wrote:
> 
> Hi everyone, 
>  
> We would like Apache Jena to raise an event whenever a particular triple is 
> inferred by the GenericRuleReasoner.
>  
> We tried to achieve this by registering our implementation of the 
> ModelChangedListener interface to an InfModel, but our implementation does 
> not get triggered when inferred statements are added by the reasoner.
>  
> Is there any (other) way to raise an event whenever an inferred statement is 
> added to an InfModel?
>  
> Regards, Barry
>  
>  
>  
> B. (Barry) Nouwt
> Medior Innovator Semantic Technology
> Connected Business
> T +31 (0)88 866 56 91
> M +31 (0)64 977 53 56
> E [email protected]
> Location
> 
>  
> 
> 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