The statement with the old value is removed from the model and a new statement with the new value added and returned.
435436437438439440441442443444445
(sumImpliedScore * userScore); //update the calc_score in the model logger.debug("Update the calc_score for model:" + modelpath + " /Score:" + calcscore); stmtScore.changeObject(calcscore); //remove the model File f = new File(modelpath); f.delete();
514515516517518519520521522523524
RP.categoryScore).getObject().toString()) .doubleValue(); //increment the direct score for the current statement directscore = directscore + userScore; stmt.changeObject(directscore); //adjust the calc_score according to the user feedback calcscore = calcscore + userScore; Statement stmt2 = node.getProperty(RP.calcScore); stmt2.changeObject( calcscore);
519520521522523524525526527528529
stmt.changeObject(directscore); //adjust the calc_score according to the user feedback calcscore = calcscore + userScore; Statement stmt2 = node.getProperty(RP.calcScore); stmt2.changeObject( calcscore); //remove the model File f = new File(modelpath); f.delete();
592593594595596597598599600601602
//get the document id String documentid = node.getProperty(RP.documentID) .getObject().toString(); //change the value of the current statement stmt.changeObject(newCategScore); //remove the model File f = new File(modelpath); f.delete();
10281029103010311032103310341035103610371038
final Triple t = new Triple(holder.getBaseItem().asNode(), listRest() .asNode(), retval.asNode()); final Triple t2 = new Triple(holder.getBaseItem().asNode(), listRest() .asNode(), tail.asNode()); checkUpdate(t, t2); rest.changeObject(tail); return SecuredRDFListImpl.getInstance(getModel(), retval.as(RDFList.class)); } @Override
313314315316317318319320321322323
final Statement stmt = iter.next(); final Triple t = stmt.asTriple(); final Triple t2 = new Triple(t.getSubject(), t.getPredicate(), o.asNode()); checkUpdate(t, t2); stmt.changeObject(o); return holder.getSecuredItem(); } else { add( o );