1 | <?php |
||
6 | class ConceptProperty |
||
7 | { |
||
8 | /** stores the property type */ |
||
9 | private $prop; |
||
10 | /** stores the property supertype */ |
||
11 | private $super; |
||
12 | /** stores the property label */ |
||
13 | private $label; |
||
14 | /** stores the property values */ |
||
15 | private $values; |
||
16 | /** flag whether the values are sorted, as we do lazy sorting */ |
||
17 | private $is_sorted; |
||
18 | private $sort_by_notation; |
||
19 | |||
20 | /** |
||
21 | * Label parameter seems to be optional in this phase. |
||
22 | * @param string $prop property type eg. 'rdf:type'. |
||
23 | * @param string $label |
||
24 | */ |
||
25 | public function __construct($prop, $label, $super=null, $sort_by_notation=false) |
||
34 | |||
35 | /** |
||
36 | * Gets the gettext translation for a property or returns the identifier as a fallback. |
||
37 | */ |
||
38 | public function getLabel() |
||
57 | |||
58 | /** |
||
59 | * Returns a gettext translation for the property tooltip. |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getDescription() |
||
68 | |||
69 | /** |
||
70 | * Returns an array of the property values. |
||
71 | * @return ConceptMappingPropertyValue[] |
||
72 | */ |
||
73 | public function getValues() |
||
80 | |||
81 | public function addValue($value) |
||
86 | |||
87 | private function sortValues() |
||
121 | |||
122 | /** |
||
123 | * Returns property type as a string. |
||
124 | * @return string eg. 'rdf:type'. |
||
125 | */ |
||
126 | public function getType() |
||
130 | |||
131 | /** |
||
132 | * Returns property supertype (?property skos:subPropertyOf ?super) as a string. |
||
133 | * @return string eg. 'skos:hiddenLabel'. |
||
134 | */ |
||
135 | public function getSubPropertyOf() |
||
139 | } |
||
140 |