r60733 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60732‎ | r60733 | r60734 >
Date:14:46, 6 January 2010
Author:mkroetzsch
Status:deferred
Tags:
Comment:
remove code that is specific to old n-aries; update known type ids
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/export/SMW_Exporter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/export/SMW_Exporter.php
@@ -219,17 +219,19 @@
220220 /**
221221 * Determine what kind of OWL property some SMW property should be exported as.
222222 * The input is an SMWTypesValue object, a typeid string, or empty (use default)
 223+ * @todo An improved mechanism for selecting property types here is needed.
223224 */
224225 static public function getOWLPropertyType($type = '') {
225 - /// TODO: improved mechanism for selecting property types is needed.
226226 if ($type instanceof SMWTypesValue) {
227 - $type = ($type->isUnary())?$type->getDBkey():'__nry';
 227+ $type = $type->getDBkey();
228228 } elseif ($type == false) {
229229 $type = '';
230230 } // else keep $type
231231 switch ($type) {
232232 case '_anu': return 'AnnotationProperty';
233 - case '': case '_wpg': case '_uri': case '_ema': case '__nry':
 233+ case '': case '_wpg': case '_wpp': case '_wpc': case '_wpf':
 234+ case '_uri': case '_ema': case '_tel': case '_lst': case '__typ':
 235+ case '__red': case '__spf': case '__spu':
234236 return 'ObjectProperty';
235237 default: return 'DatatypeProperty';
236238 }

Status & tagging log