equal
deleted
inserted
replaced
11 /** |
11 /** |
12 */ |
12 */ |
13 class TranscriptResource extends WebResource { |
13 class TranscriptResource extends WebResource { |
14 |
14 |
15 private $conformsTo = -1; |
15 private $conformsTo = -1; |
|
16 private $rights = false; |
16 |
17 |
17 |
18 |
18 protected function doClearMemoizationCache() { |
19 protected function doClearMemoizationCache() { |
19 $this->conformsTo = -1; |
20 $this->conformsTo = -1; |
|
21 $this->rights = false; |
20 } |
22 } |
21 |
23 |
22 public function getConformsTo() { |
24 public function getConformsTo() { |
23 if($this->conformsTo === -1) { |
25 if($this->conformsTo === -1) { |
24 $conformsTo = $this->getResource("<http://purl.org/dc/terms/conformsTo>"); |
26 $conformsTo = $this->getResource("<http://purl.org/dc/terms/conformsTo>"); |
26 } |
28 } |
27 |
29 |
28 return $this->conformsTo; |
30 return $this->conformsTo; |
29 } |
31 } |
30 |
32 |
|
33 public function getRights() { |
|
34 if($this->rights === false) { |
|
35 $rightsRes = $this->getResource("<http://purl.org/dc/terms/license>"); |
|
36 $this->rights = is_null($rightsRes)?null:$rightsRes->getUri(); |
|
37 } |
|
38 return $this->rights; |
|
39 } |
|
40 |
31 |
41 |
32 protected function jsonSerializeExtra() { |
42 protected function jsonSerializeExtra() { |
33 return [ |
43 return [ |
34 'conforms-to' => $this->getConformsTo() |
44 'conforms-to' => $this->getConformsTo(), |
|
45 'rights' => $this->getRights() |
35 ]; |
46 ]; |
36 } |
47 } |
37 |
48 |
38 } |
49 } |