com.hp.hpl.jena.reasoner.rdfsReasoner1
Class PatternRouter

java.lang.Object
  extended bycom.hp.hpl.jena.reasoner.rdfsReasoner1.PatternRouter

public class PatternRouter
extends java.lang.Object

A utility for mapping a TriplePattern to a sequence of operations that could satisfy it. Sources register individual patterns that they can satisfy. Then requesters use the Finder interface to satisfy a query.

Types of sources that can be registered include TransitiveGraphCaches (which are assumed complete for the predicates they cache), triple stores (via a Finder interface) and simple rewrite rules.

This implementation only supports TGCs and rules. It only indexes on pattern predicates and does a linear search down the rest.

Version:
$Revision: 1.1 $ on $Date: 2003/06/23 15:54:23 $
Author:
Dave Reynolds

Constructor Summary
PatternRouter()
          Constructor
 
Method Summary
 ExtendedIterator find(TriplePattern pattern, Finder tripleCache, Finder data, InfGraph infGraph)
          Process a query according to the known routing information.
 ExtendedIterator find(TriplePattern pattern, Finder tripleCache, Finder data, InfGraph infGraph, java.util.HashSet firedRules)
          Process a query according to the known routing information.
 void register(BRWRule rule)
          Register a backward rewrite rule
 void register(TransitiveGraphCache cache)
          Register a transitive closure cache and a means of satisfying the direct and closed versions of the cached predicate.
 void register(TriplePattern pattern, java.lang.Object satisfier)
          Register an object against a specific search pattern
 java.lang.String toString()
          Printable version of the whole reasoner state.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatternRouter

public PatternRouter()
Constructor

Method Detail

register

public void register(TransitiveGraphCache cache)
Register a transitive closure cache and a means of satisfying the direct and closed versions of the cached predicate.

Parameters:
cache - the TransitiveGraphCache

register

public void register(BRWRule rule)
Register a backward rewrite rule


register

public void register(TriplePattern pattern,
                     java.lang.Object satisfier)
Register an object against a specific search pattern


find

public ExtendedIterator find(TriplePattern pattern,
                             Finder tripleCache,
                             Finder data,
                             InfGraph infGraph)
Process a query according to the known routing information. The set of required parameters is redundant but enables different routing tactics to be tried in the future.

Parameters:
pattern - the query to be processed
tripleCache - a cascade of any generic caches which can supply additional answers
data - the raw data graph being processed
infGraph - link to originating inference graph, may be re-invoked after a pattern rewrite

find

public ExtendedIterator find(TriplePattern pattern,
                             Finder tripleCache,
                             Finder data,
                             InfGraph infGraph,
                             java.util.HashSet firedRules)
Process a query according to the known routing information. The set of required parameters is redundant but enables different routing tactics to be tried in the future.

Parameters:
pattern - the query to be processed
tripleCache - a cascade of any generic caches which can supply additional answers
data - the raw data graph being processed
infGraph - link to originating inference graph, may be re-invoked after a pattern rewrite
firedRules - set of rules which have already been fired and should now be blocked

toString

public java.lang.String toString()
Printable version of the whole reasoner state. Used during debugging



Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.