| @@ 442-457 (lines=16) @@ | ||
| 439 | * @param EasyRdf_Sparql_Result $result |
|
| 440 | * @return array Array with URIs (string) as key and array of (label, superclassURI) as value |
|
| 441 | */ |
|
| 442 | private function transformQueryTypesResults($result) { |
|
| 443 | $ret = array(); |
|
| 444 | foreach ($result as $row) { |
|
| 445 | $type = array(); |
|
| 446 | if (isset($row->label)) { |
|
| 447 | $type['label'] = $row->label->getValue(); |
|
| 448 | } |
|
| 449 | ||
| 450 | if (isset($row->superclass)) { |
|
| 451 | $type['superclass'] = $row->superclass->getUri(); |
|
| 452 | } |
|
| 453 | ||
| 454 | $ret[$row->type->getURI()] = $type; |
|
| 455 | } |
|
| 456 | return $ret; |
|
| 457 | } |
|
| 458 | ||
| 459 | /** |
|
| 460 | * Retrieve information about types from the endpoint |
|
| @@ 1847-1862 (lines=16) @@ | ||
| 1844 | * @param EasyRdf_Sparql_Result $result |
|
| 1845 | * @return array |
|
| 1846 | */ |
|
| 1847 | private function transformChangeListResults($result) { |
|
| 1848 | $ret = array(); |
|
| 1849 | foreach ($result as $row) { |
|
| 1850 | $concept = array('uri' => $row->concept->getURI()); |
|
| 1851 | if (isset($row->label)) { |
|
| 1852 | $concept['prefLabel'] = $row->label->getValue(); |
|
| 1853 | } |
|
| 1854 | ||
| 1855 | if (isset($row->date)) { |
|
| 1856 | $concept['date'] = $row->date->getValue(); |
|
| 1857 | } |
|
| 1858 | ||
| 1859 | $ret[] = $concept; |
|
| 1860 | } |
|
| 1861 | return $ret; |
|
| 1862 | } |
|
| 1863 | ||
| 1864 | /** |
|
| 1865 | * return a list of recently changed or entirely new concepts |
|