|
|||||||||
| Home >> All >> com >> hp >> hpl >> jena >> reasoner >> [ transitiveReasoner overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.hp.hpl.jena.reasoner.transitiveReasoner
Class TransitiveEngine

java.lang.Objectcom.hp.hpl.jena.reasoner.transitiveReasoner.TransitiveEngine
- public class TransitiveEngine
- extends java.lang.Object
Uses two transitive graph caches to store a subclass and a subproperty lattice and use them within a larger inference graph.
- Version:
- $Revision: 1.8 $ on $Date: 2005/02/21 12:18:19 $
| Field Summary | |
protected com.hp.hpl.jena.reasoner.Finder |
data
The base data set from which the caches can be rebuilt |
static com.hp.hpl.jena.graph.Node |
directSubClassOf
The direct (minimal) version of the subClassOf property |
static com.hp.hpl.jena.graph.Node |
directSubPropertyOf
The direct (minimal) version of the subPropertyOf property |
protected boolean |
isPrepared
True if the internal data structures have been initialized |
private static int |
NOT_RELEVANT
Classification flag: not relevant to this engine |
private static int |
REBUILD_SUBCLASS
Classification flag: subProperty of subClass |
private static int |
REBUILD_SUBPROPERTY
Classification flag: subProperty of subProperty |
private static int |
SUBCLASS
Classification flag: simple or indirect subClass |
protected static java.util.HashSet |
subClassAliases
The set of predicates which are aliases for subClassOf |
protected TransitiveGraphCache |
subClassCache
The precomputed cache of the subClass graph |
static com.hp.hpl.jena.graph.Node |
subClassOf
The normal subClassOf property |
private static int |
SUBPROPERTY
Classification flag: simple subProperty |
protected static java.util.HashSet |
subPropertyAliases
The set of predicates which are aliases for subPropertyOf |
protected TransitiveGraphCache |
subPropertyCache
The precomputed cache of the subProperty graph |
static com.hp.hpl.jena.graph.Node |
subPropertyOf
The normal subPropertyOf property |
private static int |
UPDATE_MASK
Mask for the lattice update cases |
| Constructor Summary | |
TransitiveEngine(TransitiveEngine tengine)
Constructor. |
|
TransitiveEngine(TransitiveGraphCache subClassCache,
TransitiveGraphCache subPropertyCache)
Constructor. |
|
| Method Summary | |
boolean |
add(com.hp.hpl.jena.graph.Triple t)
Add one triple to caches if it is relevant. |
static boolean |
cacheSubClassUtility(com.hp.hpl.jena.reasoner.Finder graph,
TransitiveGraphCache spCache,
TransitiveGraphCache scCache)
Caches all subClass declarations, including those that are defined via subProperties of subClassOf. |
static boolean |
cacheSubPropUtility(com.hp.hpl.jena.reasoner.Finder graph,
TransitiveGraphCache spCache)
Caches all subPropertyOf declarations, including any meta level ones (subPropertyOf subPropertyOf). |
boolean |
checkOccurance(com.hp.hpl.jena.graph.Node prop,
com.hp.hpl.jena.graph.Graph graph)
Test if there are any usages of prop within the given graph. |
static boolean |
checkOccuranceUtility(com.hp.hpl.jena.graph.Node prop,
com.hp.hpl.jena.graph.Graph graph,
TransitiveGraphCache spCache)
Test if there are any usages of prop within the given graph. |
boolean |
delete(com.hp.hpl.jena.graph.Triple t)
Removes the triple t (if relevant) from the caches. |
com.hp.hpl.jena.reasoner.Finder |
getFinder(com.hp.hpl.jena.reasoner.TriplePattern pattern,
com.hp.hpl.jena.reasoner.Finder continuation)
Return a Finder instance appropriate for the given query. |
TransitiveGraphCache |
getSubClassCache()
Return the cache of the subclass lattice. |
TransitiveGraphCache |
getSubPropertyCache()
Return the cache of the subclass lattice. |
com.hp.hpl.jena.reasoner.Finder |
insert(com.hp.hpl.jena.reasoner.Finder baseData,
com.hp.hpl.jena.reasoner.FGraph newData)
Prepare the engine by inserting any new data not already included in the existing caches. |
private void |
prepare()
Build alias tables for subclass and subproperty. |
void |
setCaching(boolean cacheSP,
boolean cacheSC)
Set the closure caching flags. |
private int |
triage(com.hp.hpl.jena.graph.Triple t)
Classify an incoming triple to detect whether it is relevant to this engine. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
subClassCache
protected TransitiveGraphCache subClassCache
- The precomputed cache of the subClass graph
subPropertyCache
protected TransitiveGraphCache subPropertyCache
- The precomputed cache of the subProperty graph
data
protected com.hp.hpl.jena.reasoner.Finder data
- The base data set from which the caches can be rebuilt
isPrepared
protected boolean isPrepared
- True if the internal data structures have been initialized
subClassAliases
protected static java.util.HashSet subClassAliases
- The set of predicates which are aliases for subClassOf
subPropertyAliases
protected static java.util.HashSet subPropertyAliases
- The set of predicates which are aliases for subPropertyOf
NOT_RELEVANT
private static final int NOT_RELEVANT
- Classification flag: not relevant to this engine
- See Also:
- Constant Field Values
SUBCLASS
private static final int SUBCLASS
- Classification flag: simple or indirect subClass
- See Also:
- Constant Field Values
SUBPROPERTY
private static final int SUBPROPERTY
- Classification flag: simple subProperty
- See Also:
- Constant Field Values
UPDATE_MASK
private static final int UPDATE_MASK
- Mask for the lattice update cases
- See Also:
- Constant Field Values
REBUILD_SUBCLASS
private static final int REBUILD_SUBCLASS
- Classification flag: subProperty of subClass
- See Also:
- Constant Field Values
REBUILD_SUBPROPERTY
private static final int REBUILD_SUBPROPERTY
- Classification flag: subProperty of subProperty
- See Also:
- Constant Field Values
directSubPropertyOf
public static com.hp.hpl.jena.graph.Node directSubPropertyOf
- The direct (minimal) version of the subPropertyOf property
directSubClassOf
public static com.hp.hpl.jena.graph.Node directSubClassOf
- The direct (minimal) version of the subClassOf property
subPropertyOf
public static com.hp.hpl.jena.graph.Node subPropertyOf
- The normal subPropertyOf property
subClassOf
public static com.hp.hpl.jena.graph.Node subClassOf
- The normal subClassOf property
| Constructor Detail |
TransitiveEngine
public TransitiveEngine(TransitiveGraphCache subClassCache, TransitiveGraphCache subPropertyCache)
- Constructor.
TransitiveEngine
public TransitiveEngine(TransitiveEngine tengine)
- Constructor.
| Method Detail |
insert
public com.hp.hpl.jena.reasoner.Finder insert(com.hp.hpl.jena.reasoner.Finder baseData, com.hp.hpl.jena.reasoner.FGraph newData)
- Prepare the engine by inserting any new data not already included
in the existing caches.
getSubClassCache
public TransitiveGraphCache getSubClassCache()
- Return the cache of the subclass lattice.
getSubPropertyCache
public TransitiveGraphCache getSubPropertyCache()
- Return the cache of the subclass lattice.
setCaching
public void setCaching(boolean cacheSP,
boolean cacheSC)
- Set the closure caching flags.
prepare
private void prepare()
- Build alias tables for subclass and subproperty.
triage
private int triage(com.hp.hpl.jena.graph.Triple t)
- Classify an incoming triple to detect whether it is relevant to this engine.
getFinder
public com.hp.hpl.jena.reasoner.Finder getFinder(com.hp.hpl.jena.reasoner.TriplePattern pattern, com.hp.hpl.jena.reasoner.Finder continuation)
- Return a Finder instance appropriate for the given query.
add
public boolean add(com.hp.hpl.jena.graph.Triple t)
- Add one triple to caches if it is relevant.
delete
public boolean delete(com.hp.hpl.jena.graph.Triple t)
- Removes the triple t (if relevant) from the caches.
checkOccurance
public boolean checkOccurance(com.hp.hpl.jena.graph.Node prop, com.hp.hpl.jena.graph.Graph graph)
- Test if there are any usages of prop within the given graph.
This includes indirect usages incurred by subProperties of prop.
cacheSubClassUtility
public static boolean cacheSubClassUtility(com.hp.hpl.jena.reasoner.Finder graph, TransitiveGraphCache spCache, TransitiveGraphCache scCache)
- 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.
checkOccuranceUtility
public static boolean checkOccuranceUtility(com.hp.hpl.jena.graph.Node prop, com.hp.hpl.jena.graph.Graph graph, TransitiveGraphCache spCache)
- 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.
cacheSubPropUtility
public static boolean cacheSubPropUtility(com.hp.hpl.jena.reasoner.Finder graph, TransitiveGraphCache spCache)
- 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.
|
|||||||||
| Home >> All >> com >> hp >> hpl >> jena >> reasoner >> [ transitiveReasoner overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.hp.hpl.jena.reasoner.transitiveReasoner.TransitiveEngine