| @@ 465-480 (lines=16) @@ | ||
| 462 | * @param EasyRdf_Sparql_Result $result |
|
| 463 | * @return array Array with URIs (string) as key and array of (label, superclassURI) as value |
|
| 464 | */ |
|
| 465 | private function transformQueryTypesResults($result) { |
|
| 466 | $ret = array(); |
|
| 467 | foreach ($result as $row) { |
|
| 468 | $type = array(); |
|
| 469 | if (isset($row->label)) { |
|
| 470 | $type['label'] = $row->label->getValue(); |
|
| 471 | } |
|
| 472 | ||
| 473 | if (isset($row->superclass)) { |
|
| 474 | $type['superclass'] = $row->superclass->getUri(); |
|
| 475 | } |
|
| 476 | ||
| 477 | $ret[$row->type->getURI()] = $type; |
|
| 478 | } |
|
| 479 | return $ret; |
|
| 480 | } |
|
| 481 | ||
| 482 | /** |
|
| 483 | * Retrieve information about types from the endpoint |
|
| @@ 1927-1942 (lines=16) @@ | ||
| 1924 | * @param EasyRdf_Sparql_Result $result |
|
| 1925 | * @return array |
|
| 1926 | */ |
|
| 1927 | private function transformChangeListResults($result) { |
|
| 1928 | $ret = array(); |
|
| 1929 | foreach ($result as $row) { |
|
| 1930 | $concept = array('uri' => $row->concept->getURI()); |
|
| 1931 | if (isset($row->label)) { |
|
| 1932 | $concept['prefLabel'] = $row->label->getValue(); |
|
| 1933 | } |
|
| 1934 | ||
| 1935 | if (isset($row->date)) { |
|
| 1936 | $concept['date'] = $row->date->getValue(); |
|
| 1937 | } |
|
| 1938 | ||
| 1939 | $ret[] = $concept; |
|
| 1940 | } |
|
| 1941 | return $ret; |
|
| 1942 | } |
|
| 1943 | ||
| 1944 | /** |
|
| 1945 | * return a list of recently changed or entirely new concepts |
|