I see, thanks for the swift reply. Would you agree that a decent approach could be making a secondary query into a graph of the raw data, comparing the result sets using set difference/intersection? The main issue I see with this approach is that the execution time effectively becomes N*M which could be a problem for particularly heavy queries.
> Den 6. dec. 2021 kl. 09.08 skrev Dave Reynolds <[email protected]>: > > 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 > >
