|
@@ 334-340 (lines=7) @@
|
| 331 |
|
* @param string $uri |
| 332 |
|
* @param string $lang language identifier. |
| 333 |
|
*/ |
| 334 |
|
public function getConceptHierarchy($uri, $lang) |
| 335 |
|
{ |
| 336 |
|
$lang = $lang ? $lang : $this->getEnvLang(); |
| 337 |
|
$fallback = count($this->config->getLanguageOrder($lang)) > 1 ? $this->config->getLanguageOrder($lang)[1] : $this->config->getDefaultLanguage(); |
| 338 |
|
$props = $this->config->getHierarchyProperty(); |
| 339 |
|
return $this->getSparql()->queryParentList($uri, $lang, $fallback, $props); |
| 340 |
|
} |
| 341 |
|
|
| 342 |
|
/** |
| 343 |
|
* Gets the child relations of a concept and whether these children have more children. |
|
@@ 346-352 (lines=7) @@
|
| 343 |
|
* Gets the child relations of a concept and whether these children have more children. |
| 344 |
|
* @param string $uri |
| 345 |
|
*/ |
| 346 |
|
public function getConceptChildren($uri, $lang) |
| 347 |
|
{ |
| 348 |
|
$lang = $lang ? $lang : $this->getEnvLang(); |
| 349 |
|
$fallback = count($this->config->getLanguageOrder($lang)) > 1 ? $this->config->getLanguageOrder($lang)[1] : $this->config->getDefaultLanguage(); |
| 350 |
|
$props = $this->config->getHierarchyProperty(); |
| 351 |
|
return $this->getSparql()->queryChildren($uri, $lang, $fallback, $props); |
| 352 |
|
} |
| 353 |
|
|
| 354 |
|
/** |
| 355 |
|
* Gets the skos:narrower relations of a concept. |