--- a/server/src/app/Libraries/RdfModel/RdfModelResource.php Fri Jan 15 15:27:56 2016 +0100
+++ b/server/src/app/Libraries/RdfModel/RdfModelResource.php Fri Jan 15 15:35:00 2016 +0100
@@ -34,9 +34,22 @@
return $this->uri;
}
+ public function getCurrentDelta() {
+ return $this->getCurrentDelta;
+ }
+
public function startDelta() {
$this->currentDelta = new RdfModelDelta($this->getGraph()->getUri());
array_push($this->deltaList, $this->currentDelta);
+ return $this->currentDelta;
+ }
+
+ protected function setSimpleProperty($baseNode, $property, $oldValue, $newValue) {
+ $delta = $this->startDelta();
+ $baseNode->delete($property, $oldValue);
+ $delta->getDeletedGraph()->add($baseNode, $property, $oldValue);
+ $baseNode->add($property, $newValue);
+ $delta->getAddedGraph()->add($baseNode, $property, $newValue);
}