com.hp.hpl.jena.reasoner.rulesys
Class RETERuleInfGraph

java.lang.Object
  extended by com.hp.hpl.jena.graph.impl.GraphBase
      extended by com.hp.hpl.jena.reasoner.BaseInfGraph
          extended by com.hp.hpl.jena.reasoner.rulesys.BasicForwardRuleInfGraph
              extended by com.hp.hpl.jena.reasoner.rulesys.RETERuleInfGraph
All Implemented Interfaces:
Graph, GraphAdd, com.hp.hpl.jena.graph.impl.GraphWithPerform, InfGraph, ForwardRuleInfGraphI, SilentAddI

public class RETERuleInfGraph
extends BasicForwardRuleInfGraph

RETE implementation of the forward rule infernce graph.

Version:
$Revision: 1.1 $ on $Date: 2009-06-29 08:55:38 $
Author:
Dave Reynolds

Nested Class Summary
 
Nested classes/interfaces inherited from class com.hp.hpl.jena.reasoner.BaseInfGraph
BaseInfGraph.InfCapabilities, BaseInfGraph.InfFindSafeCapabilities, BaseInfGraph.InfTransactionHandler
 
Field Summary
 
Fields inherited from class com.hp.hpl.jena.reasoner.rulesys.BasicForwardRuleInfGraph
filterFunctors
 
Fields inherited from class com.hp.hpl.jena.graph.impl.GraphBase
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT
 
Fields inherited from interface com.hp.hpl.jena.graph.Graph
emptyGraph
 
Constructor Summary
RETERuleInfGraph(Reasoner reasoner, Graph schema)
          Constructor.
RETERuleInfGraph(Reasoner reasoner, List<Rule> rules, Graph schema)
          Constructor.
RETERuleInfGraph(Reasoner reasoner, List<Rule> rules, Graph schema, Graph data)
          Constructor.
 
Method Summary
 void performAdd(Triple t)
          Add one triple to the data graph, run any rules triggered by the new data item, recursively adding any generated triples.
 void performDelete(Triple t)
          Removes the triple t (if possible) from the set belonging to this graph.
 
Methods inherited from class com.hp.hpl.jena.reasoner.rulesys.BasicForwardRuleInfGraph
addBRule, addDeduction, close, constructReifier, deleteBRule, find, findDataMatches, findWithContinuation, getCurrentDeductionsGraph, getDeductionsGraph, getDerivation, getNRulesFired, getSchemaGraph, graphBaseFind, graphBaseSize, logDerivation, prepare, rebind, rebind, setDerivationLogging, setFunctorFiltering, setRuleStore, setTraceOn, shouldLogDerivations, shouldTrace, silentAdd
 
Methods inherited from class com.hp.hpl.jena.reasoner.BaseInfGraph
cloneWithPremises, find, getBulkUpdateHandler, getCapabilities, getGlobalProperty, getPrefixMapping, getRawGraph, getReasoner, getTransactionHandler, getVersion, graphBaseFind, isEmpty, isPrepared, reset, testGlobalProperty, validate
 
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase
add, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, getReifier, getStatisticsHandler, isClosed, isIsomorphicWith, notifyAdd, notifyDelete, queryHandler, size, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.reasoner.InfGraph
find, getGlobalProperty, getRawGraph, getReasoner, reset, testGlobalProperty, validate
 
Methods inherited from interface com.hp.hpl.jena.graph.Graph
contains, contains, delete, dependsOn, find, find, getBulkUpdateHandler, getCapabilities, getEventManager, getPrefixMapping, getReifier, getStatisticsHandler, getTransactionHandler, isClosed, isEmpty, isIsomorphicWith, queryHandler, size
 
Methods inherited from interface com.hp.hpl.jena.graph.GraphAdd
add
 

Constructor Detail

RETERuleInfGraph

public RETERuleInfGraph(Reasoner reasoner,
                        Graph schema)
Constructor. Creates a new inference graph to which a (compiled) rule set and a data graph can be attached. This separation of binding is useful to allow any configuration parameters (such as logging) to be set before the data is added. Note that until the data is added using rebind then any operations like add, remove, find will result in errors.

Parameters:
reasoner - the parent reasoner
schema - the (optional) schema data which is being processed

RETERuleInfGraph

public RETERuleInfGraph(Reasoner reasoner,
                        List<Rule> rules,
                        Graph schema)
Constructor. Creates a new inference graph based on the given rule set. No data graph is attached at this stage. This is to allow any configuration parameters (such as logging) to be set before the data is added. Note that until the data is added using rebind then any operations like add, remove, find will result in errors.

Parameters:
reasoner - the parent reasoner
rules - the list of rules to use this time
schema - the (optional) schema or preload data which is being processed

RETERuleInfGraph

public RETERuleInfGraph(Reasoner reasoner,
                        List<Rule> rules,
                        Graph schema,
                        Graph data)
Constructor. Creates a new inference graph based on the given rule set then processes the initial data graph. No precomputed deductions are loaded.

Parameters:
reasoner - the parent reasoner
rules - the list of rules to use this time
schema - the (optional) schema or preload data which is being processed
data - the data graph to be processed
Method Detail

performAdd

public void performAdd(Triple t)
Add one triple to the data graph, run any rules triggered by the new data item, recursively adding any generated triples.

Specified by:
performAdd in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performAdd in class BasicForwardRuleInfGraph

performDelete

public void performDelete(Triple t)
Removes the triple t (if possible) from the set belonging to this graph.

Specified by:
performDelete in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
Overrides:
performDelete in class BasicForwardRuleInfGraph


Licenced under the Apache License, Version 2.0