|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rdf.rules.TMUtility
public class TMUtility
A utility class for performing rule re-writes for RDF truth maintenance using a "focusStore" in addition to the primary database. The focusStore is typically used in one of two ways: (1) incremental loading of new data into the database; and (2) collecting entailments of statements that are being removed during truth maintenance.
Note: When loading a new data set into the database, the "focusStore" should contain the statements that were read from the data source, e.g., some RDF/XML file and the "buffer" should be configured to write on the "database".
SPORelation Predicates. The code tests on the
SPOPredicate class, so it will break when generalizing to other
relations. At some point, we should add a predicate "name" attribute,
which is really the relation base name (without its container) and then
test on the predicate name rather than its Class. The test in this
class could then be written as pred.isInstance(relationBaseName) and
the predicate interface could be constrained to only allow the
predicate view to include relations sharing the same base name.| Field Summary | |
|---|---|
static TMUtility |
DEBUG
Alternative instance constructs programs with sequential steps for easier debugging. |
static TMUtility |
INSTANCE
Default instance constructs programs with parallel steps. |
| Constructor Summary | |
|---|---|
TMUtility(boolean parallel)
|
|
| Method Summary | |
|---|---|
Program |
mapForTruthMaintenance(IStep step,
String focusStore)
|
Program |
mapProgramForTruthMaintenance(IProgram program,
String focusStore)
Map a IProgram for truth maintenance. |
Program |
mapRuleForTruthMaintenance(IRule rule,
String focusStore)
Truth maintenance for RDF needs to compute the entailments as if the statements in a temporary triple store (known as the focusStore) were already part of the database (for insert) or as if they had already been removed (for delete). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final transient TMUtility INSTANCE
public static final transient TMUtility DEBUG
| Constructor Detail |
|---|
public TMUtility(boolean parallel)
parallel - When true, the new IRules will be
added to a program that executes its steps in parallel.| Method Detail |
|---|
public Program mapRuleForTruthMaintenance(IRule rule,
String focusStore)
rule - The original rule. The IPredicates in this
Rule should identify the IRelation for the
database for which truth maintenance will be performed.focusStore - The temporary database containing the statements to be added
to (or removed from) the database during truth maintenance.
IProgram constructed as specified above. When they are
executed, all of the resulting rules should write on the same
buffer. This has the same effect as a UNION over the entailments
of the individual rules.
public Program mapProgramForTruthMaintenance(IProgram program,
String focusStore)
IProgram for truth maintenance.
program - The program.focusStore - The focus store.
public Program mapForTruthMaintenance(IStep step,
String focusStore)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||