| @@ 551-566 (lines=16) @@ | ||
| 548 | * @param EasyRdf\Sparql\Result $result |
|
| 549 | * @return array Array with URIs (string) as key and array of (label, superclassURI) as value |
|
| 550 | */ |
|
| 551 | private function transformQueryTypesResults($result) { |
|
| 552 | $ret = array(); |
|
| 553 | foreach ($result as $row) { |
|
| 554 | $type = array(); |
|
| 555 | if (isset($row->label)) { |
|
| 556 | $type['label'] = $row->label->getValue(); |
|
| 557 | } |
|
| 558 | ||
| 559 | if (isset($row->superclass)) { |
|
| 560 | $type['superclass'] = $row->superclass->getUri(); |
|
| 561 | } |
|
| 562 | ||
| 563 | $ret[$row->type->getURI()] = $type; |
|
| 564 | } |
|
| 565 | return $ret; |
|
| 566 | } |
|
| 567 | ||
| 568 | /** |
|
| 569 | * Retrieve information about types from the endpoint |
|
| @@ 2189-2204 (lines=16) @@ | ||
| 2186 | * @param EasyRdf\Sparql\Result $result |
|
| 2187 | * @return array |
|
| 2188 | */ |
|
| 2189 | private function transformChangeListResults($result) { |
|
| 2190 | $ret = array(); |
|
| 2191 | foreach ($result as $row) { |
|
| 2192 | $concept = array('uri' => $row->concept->getURI()); |
|
| 2193 | if (isset($row->label)) { |
|
| 2194 | $concept['prefLabel'] = $row->label->getValue(); |
|
| 2195 | } |
|
| 2196 | ||
| 2197 | if (isset($row->date)) { |
|
| 2198 | $concept['date'] = $row->date->getValue(); |
|
| 2199 | } |
|
| 2200 | ||
| 2201 | $ret[] = $concept; |
|
| 2202 | } |
|
| 2203 | return $ret; |
|
| 2204 | } |
|
| 2205 | ||
| 2206 | /** |
|
| 2207 | * return a list of recently changed or entirely new concepts |
|