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.transitiveReasoner
Class TransitiveInfGraph

    java.lang.Object
      com.hp.hpl.jena.graph.impl.GraphBase
          com.hp.hpl.jena.reasoner.BaseInfGraph
              com.hp.hpl.jena.reasoner.transitiveReasoner.TransitiveInfGraph

All Implemented Interfaces:
  Graph, GraphAdd, com.hp.hpl.jena.graph.impl.GraphWithPerform, InfGraph

    public class TransitiveInfGraph

extends BaseInfGraph

Implementation of InfGraph used by the TransitiveReasoner. This is returned by the TransitiveReasoner when a data graph (together with an optional schema) has been bound.

The cached property and class graphs are calculated by the reasoner when the schema is bound. If the data graph does not include schema information then the caches generated at schema binding stage are reused here. Otherwise the caches are regenerated.

Version:
  $Revision: 1.25 $ on $Date: 2008/01/02 12:07:50 $
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 interface com.hp.hpl.jena.graph.Graph
`emptyGraph`

Constructor Summary
`TransitiveInfGraph(Graph data, TransitiveReasoner reasoner)` Constructor.

Method Summary
`ExtendedIterator` | `find(TriplePattern pattern)` Basic pattern lookup interface.
`ExtendedIterator` | `findWithContinuation(TriplePattern pattern, Finder continuation)` Extended find interface used in situations where the implementator may or may not be able to answer the complete query.
`Capabilities` | `getCapabilities()` Answer the InfCapabilities of this InfGraph.
`Graph` | `getSchemaGraph()` Return the schema graph, if any, bound into this inference graph.
`ExtendedIterator` | `graphBaseFind(Node subject, Node property, Node object)` Returns an iterator over Triples.
`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.
`void` | `prepare()` Perform any initial processing and caching.

Methods inherited from class com.hp.hpl.jena.reasoner.BaseInfGraph
`cloneWithPremises, close, constructReifier, find, getBulkUpdateHandler, getDeductionsGraph, getDerivation, getGlobalProperty, getPrefixMapping, getRawGraph, getReasoner, getTransactionHandler, getVersion, graphBaseFind, graphBaseSize, isEmpty, isPrepared, rebind, rebind, reset, setDerivationLogging, 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.graph.Graph
`contains, contains, delete, dependsOn, find, find, getEventManager, getReifier, getStatisticsHandler, isClosed, isIsomorphicWith, queryHandler, size`

Methods inherited from interface com.hp.hpl.jena.graph.GraphAdd
`add`

Constructor Detail

### TransitiveInfGraph

    public TransitiveInfGraph(Graph data,
                              TransitiveReasoner reasoner)

  Constructor. Called by the TransitiveReasoner when it is bound to a data graph.

  Parameters:
    `reasoner` - the parent instance of the transitive reasoner, including any precomputed class and property caches
    `data` - the data graph being bound in.

Method Detail

### prepare

    public void prepare()

  Perform any initial processing and caching. This call is optional. Most engines either have negligable set up work or will perform an implicit "prepare" if necessary. The call is provided for those occasions where substantial preparation work is possible (e.g. running a forward chaining rule system) and where an application might wish greater control over when this prepration is done.

  Specified by:
    `prepare` in interface `InfGraph`
  Overrides:
    `prepare` in class `BaseInfGraph`

### getSchemaGraph

    public Graph getSchemaGraph()

  Return the schema graph, if any, bound into this inference graph.

  Specified by:
    `getSchemaGraph` in class `BaseInfGraph`

### findWithContinuation

    public ExtendedIterator findWithContinuation(TriplePattern pattern,
                                                 Finder continuation)

  Extended find interface used in situations where the implementator may or may not be able to answer the complete query. It will attempt to answer the pattern but if its answers are not known to be complete then it will also pass the request on to the nested Finder to append more results.

  Specified by:
    `findWithContinuation` in class `BaseInfGraph`
  Parameters:
    `pattern` - a TriplePattern to be matched against the data
    `continuation` - either a Finder or a normal Graph which will be asked for additional match results if the implementor may not have completely satisfied the query.

### graphBaseFind

    public ExtendedIterator graphBaseFind(Node subject,
                                          Node property,
                                          Node object)

  Returns an iterator over Triples.

  Overrides:
    `graphBaseFind` in class `BaseInfGraph`

### find

    public ExtendedIterator find(TriplePattern pattern)

  Basic pattern lookup interface.

  Overrides:
    `find` in class `BaseInfGraph`
  Parameters:
    `pattern` - a TriplePattern to be matched against the data
  Returns:
    a ExtendedIterator over all Triples in the data set that match the pattern

### 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 `BaseInfGraph`

### 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 `BaseInfGraph`

### getCapabilities

    public Capabilities getCapabilities()

  Answer the InfCapabilities of this InfGraph.

  Specified by:
    `getCapabilities` in interface `Graph`
  Overrides:
    `getCapabilities` in class `BaseInfGraph`

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