@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * |
| 66 | 66 | * @param string $query |
| 67 | 67 | * @return string |
| 68 | - */ |
|
| 68 | + */ |
|
| 69 | 69 | protected function generateQueryPrefixes($query) |
| 70 | 70 | { |
| 71 | 71 | // Check for undefined prefixes |
@@ -233,9 +233,9 @@ discard block |
||
| 233 | 233 | $gcl = $this->graphClause; |
| 234 | 234 | $classes = ($classes) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept'); |
| 235 | 235 | |
| 236 | - $quote_string = function($val) { return "'$val'"; }; |
|
| 237 | - $quoted_values = array_map($quote_string, $langs); |
|
| 238 | - $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
| 236 | + $quote_string = function($val) { return "'$val'"; }; |
|
| 237 | + $quoted_values = array_map($quote_string, $langs); |
|
| 238 | + $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
| 239 | 239 | |
| 240 | 240 | $values = $this->formatValues('?type', $classes, 'uri'); |
| 241 | 241 | $valuesProp = $this->formatValues('?prop', $props, null); |
@@ -951,7 +951,7 @@ discard block |
||
| 951 | 951 | return $query; |
| 952 | 952 | } |
| 953 | 953 | /** |
| 954 | - * This function can be overwritten in other SPARQL dialects for the possibility of handling the differenc language clauses |
|
| 954 | + * This function can be overwritten in other SPARQL dialects for the possibility of handling the differenc language clauses |
|
| 955 | 955 | * @param string $lang |
| 956 | 956 | * @return string formatted language clause |
| 957 | 957 | */ |
@@ -1845,7 +1845,7 @@ discard block |
||
| 1845 | 1845 | |
| 1846 | 1846 | /** |
| 1847 | 1847 | * Generates a sparql query for finding the hierarchy for a concept. |
| 1848 | - * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
| 1848 | + * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
| 1849 | 1849 | * @param string $uri concept uri. |
| 1850 | 1850 | * @param string $lang |
| 1851 | 1851 | * @param string $fallback language to use if label is not available in the preferred language |
@@ -1922,10 +1922,10 @@ discard block |
||
| 1922 | 1922 | $ret[$uri]['exact'] = $row->exact->getUri(); |
| 1923 | 1923 | } |
| 1924 | 1924 | if (isset($row->tops)) { |
| 1925 | - $topConceptsList=explode(" ", $row->tops->getValue()); |
|
| 1926 | - // sort to garantee an alphabetical ordering of the URI |
|
| 1927 | - sort($topConceptsList); |
|
| 1928 | - $ret[$uri]['tops'] = $topConceptsList; |
|
| 1925 | + $topConceptsList=explode(" ", $row->tops->getValue()); |
|
| 1926 | + // sort to garantee an alphabetical ordering of the URI |
|
| 1927 | + sort($topConceptsList); |
|
| 1928 | + $ret[$uri]['tops'] = $topConceptsList; |
|
| 1929 | 1929 | } |
| 1930 | 1930 | if (isset($row->children)) { |
| 1931 | 1931 | if (!isset($ret[$uri]['narrower'])) { |