12 |
12 |
13 public function __construct($uri, $graph) { |
13 public function __construct($uri, $graph) { |
14 parent::__construct($uri, $graph); |
14 parent::__construct($uri, $graph); |
15 } |
15 } |
16 |
16 |
17 private $refLoc = false; |
17 private $refLocs = null; |
18 private $notes = null; |
18 private $notes = null; |
19 |
19 |
20 public function clearMemoizationCache() { |
20 public function clearMemoizationCache() { |
21 $this->refLoc = false; |
21 $this->refLocs = null; |
22 $this->notes = null; |
22 $this->notes = null; |
23 } |
23 } |
24 |
24 |
25 public function getRefLoc() { |
25 public function getRefLocs() { |
26 if($this->refLoc === false) { |
26 if(is_null($this->refLocs)) { |
27 $refLoc = $this->getResource("<http://www.w3.org/2002/07/owl#sameAs>"); |
27 $refLocs = $this->allResources("<http://www.w3.org/2002/07/owl#sameAs>"); |
28 $this->refLoc = is_null($refLoc)?null:$refLoc->getUri(); |
28 $this->refLocs = array_map(function($refLoc) { return $refLoc->getUri();}, $refLocs); |
29 } |
29 } |
30 return $this->refLoc; |
30 return $this->refLocs; |
31 } |
31 } |
32 |
32 |
33 public function getNotes() { |
33 public function getNotes() { |
34 if(is_null($this->notes)) { |
34 if(is_null($this->notes)) { |
35 $this->notes = $this->all('<http://www.w3.org/2004/02/skos/core#note>'); |
35 $this->notes = $this->all('<http://www.w3.org/2004/02/skos/core#note>'); |