diff -r 17f10b56c079 -r 8fddc113095e server/src/app/Models/GeoResource.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/src/app/Models/GeoResource.php Sun Jun 05 00:28:45 2016 +0200 @@ -0,0 +1,51 @@ +refLoc = false; + $this->notes = null; + } + + public function getRefLoc() { + if($this->refLoc === false) { + $refLoc = $this->getResource(""); + $this->refLoc = is_null($refLoc)?null:$refLoc->getUri(); + } + return $this->refLoc; + } + + public function getNotes() { + if(is_null($this->notes)) { + $this->notes = $this->all(''); + } + return $this->notes; + } + + public function jsonSerialize() { + $notes = array_map( + function($note) { return Utils::processLiteralResourceOrString($note); }, + $this->getNotes() + ); + return [ + 'ref-loc' => $this->getRefLoc(), + 'notes' => $notes + ]; + } + +} \ No newline at end of file