Checking for semantic Inconsistencies with Sesame

I know that Sesame has some support for semantic inferencing, but I wonder whether Sesame also supports the detection of semantic inconsistencies.

Regarding inferencing, in order to check whether a given RDF graph g infers a triple t, I have used a 'RepositoryConnection' over the graph and checked whether it contains the triple in the form of a 'Statement'. In order to receive non-trivial inferences (i.e., not explicitly asserted statements), the repository connection was build from some reasoning-enabled Sesame repository (OWLIM). So my inference checking function was basically looking like this:

boolean checkInference(RepositoryConnection g, Statement t) {
   return g.hasStatement(t, /*withInferred=*/true);

The flag "withInferred" has been set to "true" to include non-trivial inferences in the result.

This works actually quite similar to Jena, which allows one to do inference checking by asking for statements contained in an "InfModel". In addition, Jena's InfModel interface contains a method "validate()", which can be implemented to support semantic inconsistency detection. This is, for example, supported by Jena's built-in rule-based OWL reasoners, for instance to find a conflict if the same resource is asserted to be an instance of two disjoint classes.

My question is: Is there any similar standard method in Sesame to report/check inconsistencies? When I was using BigOWLIM 3.4 a couple of months ago, it was able to detect some inconsistencies, but it printed ad-hoc inconsistency information to the log output (to stderr, or such)... just to mention an example of what I am /not/ looking for. :-)

Sesame itself has no built-in support for consistency checking, this is left up to individual backend developers, such as Ontotext with OWLIM. As for OWLIM consistency checking, as far as I'm aware the current version indeed just logs detected inconsistencies to standard output, but if I'm not mistaken there is an (undocumented) way to register a different outputstream to log these messages to, which you can then use a listener on.

For more info on how that works, your best bet is to contact the OWLIM developers via the mailinglist. There are also plans to add a better listener mechanism for this kind of thing, but to be honest I don't know the status of that.

This reply is probably not particularly helpful, sorry, but that's the state of things currently.