server/src/app/Libraries/RdfModel/RdfModelResource.php
changeset 28 b0b56e0f8c7f
parent 4 f55970e41793
child 277 bd4bc1db4f40
equal deleted inserted replaced
27:a2342f26c9de 28:b0b56e0f8c7f
    32 
    32 
    33     public function getUri() {
    33     public function getUri() {
    34         return $this->uri;
    34         return $this->uri;
    35     }
    35     }
    36 
    36 
       
    37     public function getCurrentDelta() {
       
    38         return $this->getCurrentDelta;
       
    39     }
       
    40 
    37     public function startDelta() {
    41     public function startDelta() {
    38         $this->currentDelta = new RdfModelDelta($this->getGraph()->getUri());
    42         $this->currentDelta = new RdfModelDelta($this->getGraph()->getUri());
    39         array_push($this->deltaList, $this->currentDelta);
    43         array_push($this->deltaList, $this->currentDelta);
       
    44         return $this->currentDelta;
       
    45     }
       
    46 
       
    47     protected function setSimpleProperty($baseNode, $property, $oldValue, $newValue) {
       
    48         $delta = $this->startDelta();
       
    49         $baseNode->delete($property, $oldValue);
       
    50         $delta->getDeletedGraph()->add($baseNode, $property, $oldValue);
       
    51         $baseNode->add($property, $newValue);
       
    52         $delta->getAddedGraph()->add($baseNode, $property, $newValue);
    40     }
    53     }
    41 
    54 
    42 
    55 
    43 }
    56 }