On 22/02/12 18:56, Joshua TAYLOR wrote:
Your comment above that any filtering is the responsibility of the
InfModel (or the InfGraph, it seems) made me wonder why the reasoner
has a filterFunctors field*. Seeing how filterFunctors is used in the
the reasoner's bind method answered that, though, and got me looking
into the implementation of the various InfGraphs, some of which do
more filtering than just removing functors. For instance,
FBRuleInfGraph's findWithContinuation method includes
if (filterFunctors) {
// return result.filterDrop(Functor.acceptFilter);
return result.filterDrop( new Filter<Triple>() {
@Override public boolean accept( Triple o )
{ return FBRuleInfGraph.this.accept( o ); }} );
and the commented return line makes me wonder if removing the functors
from an InfModel's deductions model might still have some invalid RDF
around (e.g.., triples with literals as subjects, and hidden nodes
(I'm not sure where hidden nodes are used, but FBRuleInfGraph.accept
filters them out)). Is this something I'd need to worry about while
implementing a WrappedGraph using the recommended techniques?
Ah yes, should have remembered that.
Definitely you should remove the Triples with literals as subjects since
those aren't syntactically valid RDF Statements (fine for Graph/Triple
but not fine for Model/Statement).
For the hidden nodes you might not need to do this, depending on what
your goals are. Some of the rules use particular predicates for
representing useful intermediate information which don't necessarily
help consumers of the results. E.g. the XSD rules record the base xsd
type for any derived XSD type. The "hide" directive is used to request
those be filtered out.
Dave