| @@ 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 |
|
| @@ 2237-2252 (lines=16) @@ | ||
| 2234 | * @param EasyRdf\Sparql\Result $result |
|
| 2235 | * @return array |
|
| 2236 | */ |
|
| 2237 | private function transformChangeListResults($result) { |
|
| 2238 | $ret = array(); |
|
| 2239 | foreach ($result as $row) { |
|
| 2240 | $concept = array('uri' => $row->concept->getURI()); |
|
| 2241 | if (isset($row->label)) { |
|
| 2242 | $concept['prefLabel'] = $row->label->getValue(); |
|
| 2243 | } |
|
| 2244 | ||
| 2245 | if (isset($row->date)) { |
|
| 2246 | $concept['date'] = $row->date->getValue(); |
|
| 2247 | } |
|
| 2248 | ||
| 2249 | $ret[] = $concept; |
|
| 2250 | } |
|
| 2251 | return $ret; |
|
| 2252 | } |
|
| 2253 | ||
| 2254 | /** |
|
| 2255 | * return a list of recently changed or entirely new concepts |
|