| java.lang.Object com.hp.hpl.jena.reasoner.transitiveReasoner.TransitiveEngine
TransitiveEngine | public class TransitiveEngine (Code) | | Uses two transitive graph caches to store a subclass and a subproperty
lattice and use them within a larger inference graph.
author: Dave Reynolds version: $Revision: 1.12 $ on $Date: 2008/01/02 12:07:50 $ |
Method Summary | |
public synchronized boolean | add(Triple t) Add one triple to caches if it is relevant. | public static boolean | cacheSubClassUtility(Finder graph, TransitiveGraphCache spCache, TransitiveGraphCache scCache) Caches all subClass declarations, including those that
are defined via subProperties of subClassOf. | public static boolean | cacheSubPropUtility(Finder graph, TransitiveGraphCache spCache) Caches all subPropertyOf declarations, including any meta level
ones (subPropertyOf subPropertyOf). | public boolean | checkOccurance(Node prop, Graph graph) Test if there are any usages of prop within the given graph. | public static boolean | checkOccuranceUtility(Node prop, Graph graph, TransitiveGraphCache spCache) Test if there are any usages of prop within the given graph. | public synchronized boolean | delete(Triple t) Removes the triple t (if relevant) from the caches. | public Finder | getFinder(TriplePattern pattern, Finder continuation) Return a Finder instance appropriate for the given query. | public TransitiveGraphCache | getSubClassCache() Return the cache of the subclass lattice. | public TransitiveGraphCache | getSubPropertyCache() Return the cache of the subclass lattice. | public Finder | insert(Finder baseData, FGraph newData) Prepare the engine by inserting any new data not already included
in the existing caches. | public void | setCaching(boolean cacheSP, boolean cacheSC) Set the closure caching flags. |
data | protected Finder data(Code) | | The base data set from which the caches can be rebuilt
|
directSubClassOf | public static Node directSubClassOf(Code) | | The direct (minimal) version of the subClassOf property
|
directSubPropertyOf | public static Node directSubPropertyOf(Code) | | The direct (minimal) version of the subPropertyOf property
|
isPrepared | protected boolean isPrepared(Code) | | True if the internal data structures have been initialized
|
subClassAliases | protected static HashSet subClassAliases(Code) | | The set of predicates which are aliases for subClassOf
|
subClassOf | public static Node subClassOf(Code) | | The normal subClassOf property
|
subPropertyAliases | protected static HashSet subPropertyAliases(Code) | | The set of predicates which are aliases for subPropertyOf
|
subPropertyOf | public static Node subPropertyOf(Code) | | The normal subPropertyOf property
|
TransitiveEngine | public TransitiveEngine(TransitiveGraphCache subClassCache, TransitiveGraphCache subPropertyCache)(Code) | | Constructor.
Parameters: subClassCache - pre-initialized subclass TGC Parameters: subPropertyCache - pre-initialized subproperty TGC |
TransitiveEngine | public TransitiveEngine(TransitiveEngine tengine)(Code) | | Constructor.
Parameters: tengine - an instance of TransitiveEngine to be cloned |
add | public synchronized boolean add(Triple t)(Code) | | Add one triple to caches if it is relevant.
true if the triple affected the caches |
cacheSubClassUtility | public static boolean cacheSubClassUtility(Finder graph, TransitiveGraphCache spCache, TransitiveGraphCache scCache)(Code) | | Caches all subClass declarations, including those that
are defined via subProperties of subClassOf. Public to allow other reasoners
to use it but not of interest to end users.
Parameters: graph - a graph whose declarations are to be cached Parameters: spCache - the existing state of the subPropertyOf cache Parameters: scCache - the existing state of the subClassOf cache, will be updated true if there were new metalevel declarations discovered. |
cacheSubPropUtility | public static boolean cacheSubPropUtility(Finder graph, TransitiveGraphCache spCache)(Code) | | Caches all subPropertyOf declarations, including any meta level
ones (subPropertyOf subPropertyOf). Public to allow other reasoners
to use it but not of interest to end users.
Parameters: graph - a graph whose declarations are to be cached Parameters: spCache - the existing state of the subPropertyOf cache, will be updated true if there were new metalevel declarations discovered. |
checkOccurance | public boolean checkOccurance(Node prop, Graph graph)(Code) | | Test if there are any usages of prop within the given graph.
This includes indirect usages incurred by subProperties of prop.
Parameters: prop - the property to be checked for Parameters: graph - the graph to be check true if there is a triple using prop or one of its sub properties |
checkOccuranceUtility | public static boolean checkOccuranceUtility(Node prop, Graph graph, TransitiveGraphCache spCache)(Code) | | Test if there are any usages of prop within the given graph.
This includes indirect usages incurred by subProperties of prop.
Public to allow other reasoners
to use it but not of interest to end users.
Parameters: prop - the property to be checked for Parameters: graph - the graph to be check Parameters: spCache - the subPropertyOf cache to use true if there is a triple using prop or one of its sub properties |
delete | public synchronized boolean delete(Triple t)(Code) | | Removes the triple t (if relevant) from the caches.
true if the triple affected the caches |
insert | public Finder insert(Finder baseData, FGraph newData)(Code) | | Prepare the engine by inserting any new data not already included
in the existing caches.
Parameters: baseData - the base dataset on which the initial caches were based, could be null Parameters: newData - a dataset to be added to the engine, not known to be alreadyincluded in the caches from construction time a concatenation of the inserted data and the original data |
setCaching | public void setCaching(boolean cacheSP, boolean cacheSC)(Code) | | Set the closure caching flags.
Parameters: cacheSP - true if caching of subPropertyOf closure is wanted Parameters: cacheSC - true if caching of subClassOf closure is wanted |
|
|