public class TransitiveEngine extends Object
Modifier and Type | Field and Description |
---|---|
static Node |
directSubClassOf
The direct (minimal) version of the subClassOf property
|
static Node |
directSubPropertyOf
The direct (minimal) version of the subPropertyOf property
|
static Node |
subClassOf
The normal subClassOf property
|
static Node |
subPropertyOf
The normal subPropertyOf property
|
Constructor and Description |
---|
TransitiveEngine(TransitiveEngine tengine)
Constructor.
|
TransitiveEngine(TransitiveGraphCache subClassCache,
TransitiveGraphCache subPropertyCache)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Triple t)
Add one triple to caches if it is relevant.
|
static boolean |
cacheSubClassUtility(Finder graph,
TransitiveGraphCache spCache,
TransitiveGraphCache scCache)
Caches all subClass declarations, including those that
are defined via subProperties of subClassOf.
|
static boolean |
cacheSubPropUtility(Finder graph,
TransitiveGraphCache spCache)
Caches all subPropertyOf declarations, including any meta level
ones (subPropertyOf subPropertyOf).
|
boolean |
checkOccurance(Node prop,
Graph graph)
Test if there are any usages of prop within the given graph.
|
boolean |
delete(Triple t)
Removes the triple t (if relevant) from the caches.
|
Finder |
getFinder(TriplePattern pattern,
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.
|
Finder |
insert(Finder baseData,
FGraph newData)
Prepare the engine by inserting any new data not already included
in the existing caches.
|
void |
setCaching(boolean cacheSP,
boolean cacheSC)
Set the closure caching flags.
|
public static Node directSubPropertyOf
public static Node directSubClassOf
public static Node subPropertyOf
public static Node subClassOf
public TransitiveEngine(TransitiveGraphCache subClassCache, TransitiveGraphCache subPropertyCache)
subClassCache
- pre-initialized subclass TGCsubPropertyCache
- pre-initialized subproperty TGCpublic TransitiveEngine(TransitiveEngine tengine)
tengine
- an instance of TransitiveEngine to be clonedpublic Finder insert(Finder baseData, FGraph newData)
baseData
- the base dataset on which the initial caches were based, could be nullnewData
- a dataset to be added to the engine, not known to be already
included in the caches from construction timepublic TransitiveGraphCache getSubClassCache()
public TransitiveGraphCache getSubPropertyCache()
public void setCaching(boolean cacheSP, boolean cacheSC)
cacheSP
- true if caching of subPropertyOf closure is wantedcacheSC
- true if caching of subClassOf closure is wantedpublic Finder getFinder(TriplePattern pattern, Finder continuation)
public boolean add(Triple t)
public boolean delete(Triple t)
public boolean checkOccurance(Node prop, Graph graph)
prop
- the property to be checked forgraph
- the graph to be checkpublic static boolean cacheSubClassUtility(Finder graph, TransitiveGraphCache spCache, TransitiveGraphCache scCache)
graph
- a graph whose declarations are to be cachedspCache
- the existing state of the subPropertyOf cachescCache
- the existing state of the subClassOf cache, will be updatedpublic static boolean cacheSubPropUtility(Finder graph, TransitiveGraphCache spCache)
graph
- a graph whose declarations are to be cachedspCache
- the existing state of the subPropertyOf cache, will be updatedLicenced under the Apache License, Version 2.0