merging r10037 to the trunk

This commit is contained in:
tworrall 2012-09-06 19:40:47 +00:00
parent 4fde9b8166
commit 71d5fb7f76

View file

@ -117,6 +117,7 @@ public class ReorderController extends VitroAjaxController {
Resource individualResource = ResourceFactory.createResource(individualUri); Resource individualResource = ResourceFactory.createResource(individualUri);
//Deletions are all old statements with rank predicate //Deletions are all old statements with rank predicate
retractions.add(writeModel.listStatements(individualResource, rankPredicateProperty, (RDFNode) null)); retractions.add(writeModel.listStatements(individualResource, rankPredicateProperty, (RDFNode) null));
log.debug("retractions = " + retractions);
//New statement is new literal with the data property from //New statement is new literal with the data property from
Literal dataLiteral = null; Literal dataLiteral = null;
if(datapropURI != null && datapropURI.length() > 0) { if(datapropURI != null && datapropURI.length() > 0) {
@ -126,6 +127,7 @@ public class ReorderController extends VitroAjaxController {
} }
additions.add(individualResource, rankPredicateProperty, dataLiteral); additions.add(individualResource, rankPredicateProperty, dataLiteral);
log.debug("additions = " + additions);
counter++; counter++;
} }
@ -134,8 +136,8 @@ public class ReorderController extends VitroAjaxController {
lock = writeModel.getLock(); lock = writeModel.getLock();
lock.enterCriticalSection(Lock.WRITE); lock.enterCriticalSection(Lock.WRITE);
writeModel.getBaseModel().notifyEvent(new EditEvent(null,true)); writeModel.getBaseModel().notifyEvent(new EditEvent(null,true));
writeModel.add( additions );
writeModel.remove( retractions ); writeModel.remove( retractions );
writeModel.add( additions );
}catch(Throwable t){ }catch(Throwable t){
log.error("error adding edit change n3required model to in memory model \n"+ t.getMessage() ); log.error("error adding edit change n3required model to in memory model \n"+ t.getMessage() );
}finally{ }finally{