Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.reasoner.rulesys
Interface RuleContext

    public interface RuleContext

Interface used to convey context information from a rule engine to the stack of procedural builtins. This gives access to the triggering rule, the variable bindings and the set of currently known triples.

Version:
  $Revision: 1.12 $ on $Date: 2008/01/02 12:07:47 $
Author:
  Dave Reynolds

Method Summary
`void` | `add(Triple t)` Assert a new triple in the deduction graph, triggering any consequent processing as appropriate.
`boolean` | `contains(Node s, Node p, Node o)` Return true if the triple pattern is already in either the graph or the stack.
`boolean` | `contains(Triple t)` Return true if the triple is already in either the graph or the stack.
`ClosableIterator` | `find(Node s, Node p, Node o)` In some formulations the context includes deductions that are not yet visible to the underlying graph but need to be checked for.
`BindingEnvironment` | `getEnv()` Returns the current variable binding environment for the current rule.
`InfGraph` | `getGraph()` Returns the parent inference graph.
`Rule` | `getRule()` Returns the rule.
`void` | `remove(Triple t)` Remove a triple from the deduction graph (and the original graph if relevant).
`void` | `setRule(Rule rule)` Sets the rule.
`void` | `silentAdd(Triple t)` Assert a new triple in the deduction graph, bypassing any processing machinery.

Method Detail

### getEnv

    BindingEnvironment getEnv()

  Returns the current variable binding environment for the current rule.

  Returns:
    BindingEnvironment

### getGraph

    InfGraph getGraph()

  Returns the parent inference graph.

  Returns:
    InfGraph

### getRule

    Rule getRule()

  Returns the rule.

  Returns:
    Rule

### setRule

    void setRule(Rule rule)

  Sets the rule.

  Parameters:
    `rule` - The rule to set

### contains

    boolean contains(Triple t)

  Return true if the triple is already in either the graph or the stack. I.e. it has already been deduced.

### contains

    boolean contains(Node s,
                     Node p,
                     Node o)

  Return true if the triple pattern is already in either the graph or the stack. I.e. it has already been deduced.

### find

    ClosableIterator find(Node s,
                          Node p,
                          Node o)

  In some formulations the context includes deductions that are not yet visible to the underlying graph but need to be checked for.

### silentAdd

    void silentAdd(Triple t)

  Assert a new triple in the deduction graph, bypassing any processing machinery.

### add

    void add(Triple t)

  Assert a new triple in the deduction graph, triggering any consequent processing as appropriate.

### remove

    void remove(Triple t)

  Remove a triple from the deduction graph (and the original graph if relevant).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP