As far as I know it is not possible to use sparql inference("?link") with 4store.
But somebody told me that it is possible to modify queries slightly if it is not possible to integrate inference.
How is it possible to avoid using inference by modifying the queries?
asked 23 Jun '12, 09:12
Indeed, most consequences of simple (RDFS) inference you can also get by doing an expanded query. For example, to get all instances of a class, in store that supports (RDFS) inferencing, you would do this:
However, if your store does not support inferencing, the above query will only give you all the instances that are directly an instance of
But you can get the same result by expanding your query and using a property path:
This will return all inherited instances as well. So this is an example of an expanded query replacing inference.
However, there are several things that may not be as easy or straightforward to query (though within RDFS inference, I don't think there is anything that really can't be replaced by a query at all). Of course, the more complex your starting query becomes, the more inconvenient it becomes to expand it manually to include 'inferred' results.
answered 24 Jun '12, 08:11
Jeen Broekstra ♦
What sort of inference are you looking for?
Jeen shows subclass
and there is
You can expand the data during loading and then query rewrite isn't needed - at the expense of database size and assumign you are also controlling the data.
answered 25 Jun '12, 17:12