diff -r d6adc4047ede -r b3c738a20af8 server/src/app/Models/TranscriptResource.php --- a/server/src/app/Models/TranscriptResource.php Wed Feb 22 14:44:28 2017 +0100 +++ b/server/src/app/Models/TranscriptResource.php Wed Feb 22 17:58:25 2017 +0100 @@ -13,10 +13,12 @@ class TranscriptResource extends WebResource { private $conformsTo = -1; + private $rights = false; protected function doClearMemoizationCache() { $this->conformsTo = -1; + $this->rights = false; } public function getConformsTo() { @@ -28,11 +30,20 @@ return $this->conformsTo; } + public function getRights() { + if($this->rights === false) { + $rightsRes = $this->getResource(""); + $this->rights = is_null($rightsRes)?null:$rightsRes->getUri(); + } + return $this->rights; + } + protected function jsonSerializeExtra() { return [ - 'conforms-to' => $this->getConformsTo() + 'conforms-to' => $this->getConformsTo(), + 'rights' => $this->getRights() ]; } -} \ No newline at end of file +}