diff -r 009efee954f7 -r 17f10b56c079 server/src/app/Models/WebResource.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/src/app/Models/WebResource.php Thu Jun 02 18:24:19 2016 +0200 @@ -0,0 +1,52 @@ +format = -1; + $this->doClearMemoizationCache(); + } + + public function getFormat() { + if($this->format === -1) { + $format = $this->getLiteral(""); + $this->format = is_null($format)?null:$format->getValue(); + } + return $this->format; + } + + public function getUrl() { + return $this->getUri(); + } + + abstract protected function jsonSerializeExtra(); + + public function jsonSerialize() { + return array_merge( + [ + 'url' => $this->getUrl(), + 'format' => $this->getFormat() + ], + $this->jsonSerializeExtra() + ); + } + +} \ No newline at end of file