From: <tho...@us...> - 2010-12-22 17:22:07
|
Revision: 4042 http://bigdata.svn.sourceforge.net/bigdata/?rev=4042&view=rev Author: thompsonbry Date: 2010-12-22 17:22:01 +0000 (Wed, 22 Dec 2010) Log Message: ----------- Added logic to remove the justification chains (when present) to BigdataSail.removeAllEntailments() Modified Paths: -------------- branches/JOURNAL_HA_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java Modified: branches/JOURNAL_HA_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java 2010-12-22 12:51:06 UTC (rev 4041) +++ branches/JOURNAL_HA_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java 2010-12-22 17:22:01 UTC (rev 4042) @@ -112,6 +112,7 @@ import org.openrdf.sail.SailConnectionListener; import org.openrdf.sail.SailException; +import com.bigdata.btree.IRangeQuery; import com.bigdata.journal.IIndexManager; import com.bigdata.journal.ITransactionService; import com.bigdata.journal.ITx; @@ -2848,10 +2849,11 @@ getInferenceEngine().computeClosure(null/* focusStore */); } - + /** - * Removes all "inferred" statements from the database (does NOT commit - * the database). + * Removes all "inferred" statements from the database and the proof + * chains (if any) associated with those inferences (does NOT commit the + * database). */ public synchronized void removeAllEntailments() throws SailException { @@ -2871,6 +2873,15 @@ database .getAccessPath(NULL, NULL, NULL, InferredSPOFilter.INSTANCE) .removeAll(); + + if (database.isJustify()) { + database + .getSPORelation() + .getJustificationIndex() + .rangeIterator(null/* fromKey */, null/* toKey */, + 0/* capacity */, + IRangeQuery.REMOVEALL/* flags */, null/* filterCtor */); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |