server/src/app/Models/TranscriptResource.php
changeset 521 b3c738a20af8
parent 168 17f10b56c079
--- 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("<http://purl.org/dc/terms/license>");
+            $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
+}