On 06/12/2021 07:57, Simon Gray wrote:
I would like to display inferred triples differently in my UI, but I’m unsure
how to programmatically ascertain which triple is from inference and which is
raw data. The only way I can think of that might work would be to make a
secondary look-up in the raw data graph and compare the difference of the
result sets, but I thought maybe there is a utility method or some kind of
attached metadata I could use on the individual triple instead.
Sorry no, there's no triples-with-inference-metadata API in jena.
There is the derivations API but that's just for drilling down into
single deductions and is way more expensive than a simple test against
the base model.
With forward inference the deductions are stored separately from the
base triples (getDeductionsGraph()) but that doesn't really help you.
Dave