Revision: 43619
Author: mkroetzsch
Date: 2008-11-17 18:46:10 +0000 (Mon, 17 Nov 2008)
Log Message:
-----------
add support for SF special properties, improving their performance
Modified Paths:
--------------
trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php
trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php
2008-11-17 18:36:03 UTC (rev 43618)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php
2008-11-17 18:46:10 UTC (rev 43619)
@@ -57,11 +57,14 @@
parent::__construct($typeid);
switch ($typeid) {
case '_wpp' : case '__sup':
- $this->m_fixNamespace = SMW_NS_PROPERTY;
+ $this->m_fixNamespace = SMW_NS_PROPERTY;
break;
case '_wpc' : case '__suc':
- $this->m_fixNamespace = NS_CATEGORY;
+ $this->m_fixNamespace = NS_CATEGORY;
break;
+ case '_wpf' : case '__spf':
+ $this->m_fixNamespace = SF_NS_FORM;
+ break;
default: //case '_wpg':
$this->m_fixNamespace = NS_MAIN;
}
Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
2008-11-17 18:36:03 UTC (rev 43618)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
2008-11-17 18:46:10 UTC (rev 43619)
@@ -323,7 +323,9 @@
define('SMW_NS_PROPERTY_TALK', $smwgNamespaceIndex+3);
define('SMW_NS_TYPE', $smwgNamespaceIndex+4);
define('SMW_NS_TYPE_TALK', $smwgNamespaceIndex+5);
- // 106 and 107 are occupied by the Semantic Forms
+ // 106 and 107 are occupied by the Semantic Forms, we define
them here to offer some (easy but useful) support to SF
+ define('SF_NS_FORM', $smwgNamespaceIndex+6);
+ define('SF_NS_FORM_TALK', $smwgNamespaceIndex+7);
define('SMW_NS_CONCEPT', $smwgNamespaceIndex+8);
define('SMW_NS_CONCEPT_TALK', $smwgNamespaceIndex+9);
Modified: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
2008-11-17 18:36:03 UTC (rev 43618)
+++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
2008-11-17 18:46:10 UTC (rev 43619)
@@ -65,7 +65,9 @@
'_REDI' => 15,
'_SUBP' => 17,
'_SUBC' => 18,
- '_CONC' => 19
+ '_CONC' => 19,
+ '_SF_DF' => 20, // Semantic Form's default form property
+ '_SF_AF' => 21 // Semantic Form's alternate form property
);
/// This array defines how various datatypes should be handled
internally. This
@@ -84,6 +86,7 @@
'_wpg' => SMW_SQL2_RELS2, // Page type
'_wpp' => SMW_SQL2_RELS2, // Property page type
'_wpc' => SMW_SQL2_RELS2, // Category page type
+ '_wpf' => SMW_SQL2_RELS2, // Form page type (for Semantic
Forms)
'_num' => SMW_SQL2_ATTS2, // Number type
'_tem' => SMW_SQL2_ATTS2, // Temperature type
'_dat' => SMW_SQL2_ATTS2, // Time type
@@ -96,6 +99,7 @@
'__spu' => SMW_SQL2_SPEC2, // Special uri type
'__sup' => SMW_SQL2_SUBS2, // Special subproperty type
'__suc' => SMW_SQL2_SUBS2, // Special subcategory type
+ '__spf' => SMW_SQL2_SPEC2, // Special form type (for Semantic
Forms)
'__sin' => SMW_SQL2_INST2, // Special instance of type
'__red' => SMW_SQL2_REDI2, // Special redirect type
'__lin' => SMW_SQL2_SPEC2, // Special linear unit conversion
type
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs