| @@ 212-226 (lines=15) @@ | ||
| 209 | * @return string array class URI or null |
|
| 210 | */ |
|
| 211 | ||
| 212 | public function getAdditionalSearchProperties() |
|
| 213 | { |
|
| 214 | $resources = $this->resource->allResources("skosmos:showPropertyInSearch"); |
|
| 215 | $ret = array(); |
|
| 216 | foreach ($resources as $res) { |
|
| 217 | $prop = $res->getURI(); |
|
| 218 | if (EasyRdf_Namespace::shorten($prop) !== null) // shortening property labels if possible |
|
| 219 | { |
|
| 220 | $prop = EasyRdf_Namespace::shorten($prop); |
|
| 221 | } |
|
| 222 | ||
| 223 | $ret[] = $prop; |
|
| 224 | } |
|
| 225 | return $ret; |
|
| 226 | } |
|
| 227 | ||
| 228 | /** |
|
| 229 | * Queries whether the property should be shown with all the label language variations. |
|
| @@ 368-382 (lines=15) @@ | ||
| 365 | * @return string array class URI or null |
|
| 366 | */ |
|
| 367 | ||
| 368 | public function getHierarchyProperty() |
|
| 369 | { |
|
| 370 | $resources = $this->resource->allResources("skosmos:hierarchyProperty"); |
|
| 371 | $ret = array(); |
|
| 372 | foreach ($resources as $res) { |
|
| 373 | $prop = $res->getURI(); |
|
| 374 | if (EasyRdf_Namespace::shorten($prop) !== null) // prefixing if possible |
|
| 375 | { |
|
| 376 | $prop = EasyRdf_Namespace::shorten($prop); |
|
| 377 | } |
|
| 378 | ||
| 379 | $ret[] = $prop; |
|
| 380 | } |
|
| 381 | return empty($ret) ? array('skos:broader') : $ret; |
|
| 382 | } |
|
| 383 | } |
|
| 384 | ||