Index: trunk/extensions/SemanticMediaWiki/includes/SMW_OldDataValue.php |
— | — | @@ -377,6 +377,10 @@ |
378 | 378 | return $this->vxsd; |
379 | 379 | } |
380 | 380 | |
| 381 | + public function getWikiValue() { |
| 382 | + return $this->vuser; |
| 383 | + } |
| 384 | + |
381 | 385 | /** |
382 | 386 | * Return the numeric representation of the value, or NULL |
383 | 387 | * is none is available. This representation is used to |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php |
— | — | @@ -158,6 +158,15 @@ |
159 | 159 | abstract public function getXSDValue(); |
160 | 160 | |
161 | 161 | /** |
| 162 | + * Return the plain wiki version of the value, or |
| 163 | + * FALSE if no such version is available. The returned |
| 164 | + * string suffices to reobtain the same DataValue |
| 165 | + * when passing it as an input string to setUserValue(). |
| 166 | + * Thus it also includes units, if any. |
| 167 | + */ |
| 168 | + abstract public function getWikiValue(); |
| 169 | + |
| 170 | + /** |
162 | 171 | * Return the numeric representation of the value, or NULL |
163 | 172 | * is none is available. This representation is used to |
164 | 173 | * compare values of scalar types more efficiently, especially |
— | — | @@ -179,6 +188,13 @@ |
180 | 189 | abstract public function getError(); |
181 | 190 | |
182 | 191 | /** |
| 192 | + * Return a short string that unambiguously specify the type of this value. |
| 193 | + * This value will globally be used to identify the type of a value (in spite |
| 194 | + * of the class it actually belongs to, which can still implement various types). |
| 195 | + */ |
| 196 | + abstract public function getTypeID(); |
| 197 | + |
| 198 | + /** |
183 | 199 | * Return an array of SMWLink objects that provide additional resources |
184 | 200 | * for the given value. |
185 | 201 | * Captions can contain some HTML markup which is admissible for wiki |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Types.php |
— | — | @@ -78,6 +78,10 @@ |
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
| 82 | + public function getWikiValue() { |
| 83 | + return implode('; ', $this->m_typevalues); |
| 84 | + } |
| 85 | + |
82 | 86 | public function getNumericValue() { |
83 | 87 | return NULL; |
84 | 88 | } |
— | — | @@ -90,6 +94,10 @@ |
91 | 95 | return $this->m_error; |
92 | 96 | } |
93 | 97 | |
| 98 | + public function getTypeID() { |
| 99 | + return 'types'; |
| 100 | + } |
| 101 | + |
94 | 102 | public function getInfolinks() { |
95 | 103 | return array(); |
96 | 104 | } |