NIHVIVO-3843 - updated dependent resource delete to loop through unique set of change statements instead of through duplicates as was possible before (and which leading to error stated in the JIRA issue) - and updated EditConfigurationVTwo to set default value of useDependentResourceDelete to false, since technically we really shouldn't be employing the DependentResourceDeleteJena code anymore (setting that flag to false will skip over that code entirely).

This commit is contained in:
hjkhjk54 2012-06-28 21:25:07 +00:00
parent e2438d404d
commit f03f853dc3
2 changed files with 6 additions and 2 deletions

View file

@ -60,7 +60,10 @@ public class DependentResourceDeleteJena {
List<Statement> removedStmts = getRemovedStmts( assertions, retractions);
/* Get ride of any statements that seem to be a change */
List<Statement>changedStmts = getChangedStmts( assertions, retractions);
HashSet<Statement> changedStatementsSet = new HashSet<Statement>();
changedStatementsSet.addAll(getChangedStmts( assertions, retractions));
List<Statement>changedStmts = new LinkedList<Statement>();
changedStmts.addAll(changedStatementsSet);
ListIterator <Statement>removed = removedStmts.listIterator();
while( removed.hasNext()){
Statement removedStmt = removed.next();

View file

@ -162,8 +162,9 @@ public class EditConfigurationVTwo {
/**
* If true, then any dependent resources that are unlinked should be
* removed using DependentResourceDelete.
*Setting to false for now as we should no longer be utilizing dependent resource deletion.
*/
private boolean useDependentResourceDelete = true;
private boolean useDependentResourceDelete = false;
/** Model id from write model. */
private String writeModelId;