@@ -10,6 +10,9 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | class VocabularyCategory extends DataObject |
| 12 | 12 | { |
| 13 | + /** |
|
| 14 | + * @param Model $model |
|
| 15 | + */ |
|
| 13 | 16 | public function __construct($model, $resource) |
| 14 | 17 | { |
| 15 | 18 | if (!($model instanceof Model)) { |
@@ -23,6 +23,9 @@ |
||
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param string $name |
|
| 28 | + */ |
|
| 26 | 29 | private function getConstant($name, $default) |
| 27 | 30 | { |
| 28 | 31 | if (defined($name) && constant($name)) { |
@@ -55,6 +55,7 @@ discard block |
||
| 55 | 55 | * @param Vocabulary $vocab |
| 56 | 56 | * @param EasyRdf_Resource $resource |
| 57 | 57 | * @param EasyRdf_Graph $graph |
| 58 | + * @param string|null $clang |
|
| 58 | 59 | */ |
| 59 | 60 | public function __construct($model, $vocab, $resource, $graph, $clang) |
| 60 | 61 | { |
@@ -512,6 +513,7 @@ discard block |
||
| 512 | 513 | |
| 513 | 514 | /** |
| 514 | 515 | * Gets the groups/arrays the concept belongs to. |
| 516 | + * @param boolean $includeArrays |
|
| 515 | 517 | */ |
| 516 | 518 | public function getReverseResources($includeArrays) { |
| 517 | 519 | $groups = array(); |
@@ -114,6 +114,9 @@ discard block |
||
| 114 | 114 | return $this->returnJson($ret); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | + /** |
|
| 118 | + * @param Request $request |
|
| 119 | + */ |
|
| 117 | 120 | private function constructSearchParameters($request) |
| 118 | 121 | { |
| 119 | 122 | $parameters = new ConceptSearchParameters($request, $this->model->getConfig(), true); |
@@ -129,6 +132,9 @@ discard block |
||
| 129 | 132 | return $parameters; |
| 130 | 133 | } |
| 131 | 134 | |
| 135 | + /** |
|
| 136 | + * @param Request $request |
|
| 137 | + */ |
|
| 132 | 138 | private function transformSearchResults($request, $results) |
| 133 | 139 | { |
| 134 | 140 | // before serializing to JSON, get rid of the Vocabulary object that came with each resource |
@@ -504,6 +510,9 @@ discard block |
||
| 504 | 510 | return $this->returnJson($ret); |
| 505 | 511 | } |
| 506 | 512 | |
| 513 | + /** |
|
| 514 | + * @param Request $request |
|
| 515 | + */ |
|
| 507 | 516 | private function redirectToVocabData($request) { |
| 508 | 517 | $urls = $request->getVocab()->getConfig()->getDataURLs(); |
| 509 | 518 | if (sizeof($urls) == 0) { |
@@ -519,6 +528,9 @@ discard block |
||
| 519 | 528 | header("Location: " . $urls[$format]); |
| 520 | 529 | } |
| 521 | 530 | |
| 531 | + /** |
|
| 532 | + * @param string $format |
|
| 533 | + */ |
|
| 522 | 534 | private function returnDataResults($results, $format) { |
| 523 | 535 | if ($format == 'application/ld+json' || $format == 'application/json') { |
| 524 | 536 | // further compact JSON-LD document using a context |
@@ -606,6 +618,12 @@ discard block |
||
| 606 | 618 | return $this->returnJson($ret); |
| 607 | 619 | } |
| 608 | 620 | |
| 621 | + /** |
|
| 622 | + * @param string $uri |
|
| 623 | + * @param string $lang |
|
| 624 | + * @param string $propname |
|
| 625 | + * @param string $propuri |
|
| 626 | + */ |
|
| 609 | 627 | private function transformPropertyResults($uri, $lang, $objects, $propname, $propuri) |
| 610 | 628 | { |
| 611 | 629 | foreach ($objects as $objuri => $vals) { |
@@ -620,6 +638,14 @@ discard block |
||
| 620 | 638 | return $ret; |
| 621 | 639 | } |
| 622 | 640 | |
| 641 | + /** |
|
| 642 | + * @param string $uri |
|
| 643 | + * @param string $lang |
|
| 644 | + * @param string $tpropname |
|
| 645 | + * @param string $tpropuri |
|
| 646 | + * @param string $dpropname |
|
| 647 | + * @param string $dpropuri |
|
| 648 | + */ |
|
| 623 | 649 | private function transformTransitivePropertyResults($uri, $lang, $objects, $tpropname, $tpropuri, $dpropname, $dpropuri) |
| 624 | 650 | { |
| 625 | 651 | $results = array(); |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | * Returns information (as a graph) for one or more concept URIs |
| 394 | 394 | * @param mixed $uris concept URI (string) or array of URIs |
| 395 | 395 | * @param string|null $arrayClass the URI for thesaurus array class, or null if not used |
| 396 | - * @param \Vocabulary[]|null $vocabs vocabularies to target |
|
| 396 | + * @param Vocabulary[] $vocabs vocabularies to target |
|
| 397 | 397 | * @return \Concept[] |
| 398 | 398 | */ |
| 399 | 399 | public function queryConceptInfoGraph($uris, $arrayClass = null, $vocabs = array()) { |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | |
| 620 | 620 | /** |
| 621 | 621 | * Generate a VALUES clause for limiting the targeted graphs. |
| 622 | - * @param Vocabulary[]|null $vocabs array of Vocabulary objects to target |
|
| 622 | + * @param Vocabulary[] $vocabs array of Vocabulary objects to target |
|
| 623 | 623 | * @return string VALUES clause, or "" if not necessary to limit |
| 624 | 624 | */ |
| 625 | 625 | protected function formatValuesGraph($vocabs) { |
@@ -1349,7 +1349,7 @@ discard block |
||
| 1349 | 1349 | /** |
| 1350 | 1350 | * Query a single transitive property of a concept. |
| 1351 | 1351 | * @param string $uri |
| 1352 | - * @param string $prop the name of the property eg. 'skos:broader'. |
|
| 1352 | + * @param string $props the name of the property eg. 'skos:broader'. |
|
| 1353 | 1353 | * @param string $lang |
| 1354 | 1354 | * @param integer $limit |
| 1355 | 1355 | * @param boolean $anylang if you want a label even when it isn't available in the language you requested. |