@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * |
| 65 | 65 | * @param string $query |
| 66 | 66 | * @return string |
| 67 | - */ |
|
| 67 | + */ |
|
| 68 | 68 | protected function generateQueryPrefixes($query) |
| 69 | 69 | { |
| 70 | 70 | // Check for undefined prefixes |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | $gcl = $this->graphClause; |
| 240 | 240 | $classes = ($classes) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept'); |
| 241 | 241 | |
| 242 | - $quote_string = function($val) { return "'$val'"; }; |
|
| 243 | - $quoted_values = array_map($quote_string, $langs); |
|
| 244 | - $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
| 242 | + $quote_string = function($val) { return "'$val'"; }; |
|
| 243 | + $quoted_values = array_map($quote_string, $langs); |
|
| 244 | + $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
| 245 | 245 | |
| 246 | 246 | $values = $this->formatValues('?type', $classes, 'uri'); |
| 247 | 247 | $valuesProp = $this->formatValues('?prop', $props, null); |
@@ -1812,7 +1812,7 @@ discard block |
||
| 1812 | 1812 | |
| 1813 | 1813 | /** |
| 1814 | 1814 | * Generates a sparql query for finding the hierarchy for a concept. |
| 1815 | - * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
| 1815 | + * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
| 1816 | 1816 | * @param string $uri concept uri. |
| 1817 | 1817 | * @param string $lang |
| 1818 | 1818 | * @param string $fallback language to use if label is not available in the preferred language |
@@ -1889,10 +1889,10 @@ discard block |
||
| 1889 | 1889 | $ret[$uri]['exact'] = $row->exact->getUri(); |
| 1890 | 1890 | } |
| 1891 | 1891 | if (isset($row->tops)) { |
| 1892 | - $topConceptsList=explode(" ", $row->tops->getValue()); |
|
| 1893 | - // sort to garantee an alphabetical ordering of the URI |
|
| 1894 | - sort($topConceptsList); |
|
| 1895 | - $ret[$uri]['tops'] = $topConceptsList; |
|
| 1892 | + $topConceptsList=explode(" ", $row->tops->getValue()); |
|
| 1893 | + // sort to garantee an alphabetical ordering of the URI |
|
| 1894 | + sort($topConceptsList); |
|
| 1895 | + $ret[$uri]['tops'] = $topConceptsList; |
|
| 1896 | 1896 | } |
| 1897 | 1897 | if (isset($row->children)) { |
| 1898 | 1898 | if (!isset($ret[$uri]['narrower'])) { |