In mediaWiki proper this generally handled with hooks and callback something so semantic wiki could be patched.. and do something like the following in Halos setup: $wgHooks['smwfGetStore'][] = 'getHaloStore';
//in the hook function in Halo: function getHaloStore( &$smwgMasterStore ){ $smwgMasterStore = new SMWHaloStore(); return true; } //then in semantic wiki's smwfGetStore function something like: //assuming nobody force overides the $smwgMasterStore global... ... if ($smwgMasterStore === NULL) { wfRunHooks( 'smwfGetStore', $smwgMasterStore); if($smwgMasterStore !== NULL)) { return $smwgMasterStore; } $smwgMasterStore = new $smwgDefaultStore(); } return $smwgMasterStore; but long term I don't know if you should not even have the global smwgMasterStore variable the store system should probably work similar to the wfGetDB functions. An abstract class and static instance storing the persistent store reference. And do calls like smwfGetStore( HALO_STORE ) or smwfGetStore() //(default store set in config) this would also let you in the future do runtime choices about your stores.. ie quick property lookups go to mysql while complicated stuff goes out to your fancy SPARQL engine (which is only updated by maintenance scripts not at runtime or whatever is optimal) . ... anyway just my 2c might be missing part of the bigger picture ;) peace, michael Kai Kühn wrote: > We want SMW to use our implementation of the SMW storage layer > interface. The SMWHalo storage layer implementation delegates all calls > to the default implementation and extend some of them. But we need to > make sure that SMW will instantiate our implementation, thats why we > change $smwgDefaultStore (SMW_GlobalFunctions.php l. 589 ff): > > function &smwfGetStore() { > global $smwgMasterStore, $smwgDefaultStore, $smwgIP; > > .... > > if ($smwgMasterStore === NULL) { > $smwgMasterStore = new $smwgDefaultStore(); > } > return $smwgMasterStore; > } > > > Kai > > Yaron Koren schrieb: > >> I don't understand - if you need to somehow indicate something about >> Halo's own data storage, why not create a separate variable for it? >> You're not actually modifying SMW's own data storage, I assume. >> >> -Yaron >> >> >> On Tue, Mar 24, 2009 at 10:14 AM, Kai Kühn <ku...@ontoprise.de >> <mailto:ku...@ontoprise.de>> wrote: >> >> Other extensions do not extend SMW's storage layer. For example, we >> added a triplestore. Do you know a way to extend SMW's storage layer >> without changing that variable or patching SMW in any way? >> >> Kai >> >> Yaron Koren schrieb: >> > That's ridiculous - extensions shouldn't modify global variables >> that >> > the user can set, especially not ones defined by other extensions. >> > >> > -Yaron >> > >> > >> > On Tue, Mar 24, 2009 at 9:24 AM, Kai Kühn <ku...@ontoprise.de >> <mailto:ku...@ontoprise.de> >> > <mailto:ku...@ontoprise.de <mailto:ku...@ontoprise.de>>> wrote: >> > >> > SMWHalo changes $smwgDefaultStore to SMWHaloStore2, because it >> > adds some >> > functionality to the update process. Change SD that it accepts >> > SMWHaloStore2 as a wrapper around SMWStoreSQL2. It's fully >> compatible. >> > >> > Kai >> > >> > >> > Yaron Koren schrieb: >> > > With some testing and private discussion, Valerio and I >> > uncovered the >> > > problem: the Halo extension seems to be either unsetting >> or changing >> > > the value of the "$smwgDefaultStore" variable, which SD relies >> > on. If >> > > anyone from Halo is reading this, please be aware of the bug. >> > > >> > > -Yaron >> > > >> > >> ------------------------------------------------------------------------ >> > > >> > > >> > >> >> ------------------------------------------------------------------------------ >> > > Apps built with the Adobe(R) Flex(R) framework and Flex >> > Builder(TM) are >> > > powering Web 2.0 with engaging, cross-platform capabilities. >> > Quickly and >> > > easily build your RIAs with Flex Builder, the Eclipse(TM)based >> > development >> > > software that enables intelligent coding and step-through >> debugging. >> > > Download the free 60 day trial. >> http://p.sf.net/sfu/www-adobe-com >> > > >> > >> ------------------------------------------------------------------------ >> > > >> > > _______________________________________________ >> > > Semediawiki-devel mailing list >> > > Semediawiki-devel@lists.sourceforge.net >> <mailto:Semediawiki-devel@lists.sourceforge.net> >> > <mailto:Semediawiki-devel@lists.sourceforge.net >> <mailto:Semediawiki-devel@lists.sourceforge.net>> >> > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel >> > > >> > >> > >> > -- >> > Kai Kühn >> > Professional Services >> > ontoprise GmbH - know how to use Know-how >> > --- >> > ontoprise ist Generalunternehmer für Vulcans Semantic Wiki im >> > Projekt Halo >> > http://www.ontoprise.de/index.php?id=33 >> > --- >> > Amalienbadstraße 36 (Raumfabrik 29); 76227 Karlsruhe >> > Tel.: +49 (0) 721 509 809 48; Fax: +49 (0) 721 509 809 11 >> > eMail: ku...@ontoprise.de <mailto:ku...@ontoprise.de> >> <mailto:ku...@ontoprise.de <mailto:ku...@ontoprise.de>>; www: >> > http://www.ontoprise.de >> > Sitz der Gesellschaft: Amtsgericht Mannheim, HRB 109540 >> > Geschäftsführer: Prof. Dr. Jürgen Angele, Dipl.Wi.-Ing. >> Hans-Peter >> > Schnurr >> > >> > >> > >> >> ------------------------------------------------------------------------------ >> > Apps built with the Adobe(R) Flex(R) framework and Flex >> > Builder(TM) are >> > powering Web 2.0 with engaging, cross-platform capabilities. >> > Quickly and >> > easily build your RIAs with Flex Builder, the Eclipse(TM)based >> > development >> > software that enables intelligent coding and step-through >> debugging. >> > Download the free 60 day trial. >> http://p.sf.net/sfu/www-adobe-com >> > _______________________________________________ >> > Semediawiki-devel mailing list >> > Semediawiki-devel@lists.sourceforge.net >> <mailto:Semediawiki-devel@lists.sourceforge.net> >> > <mailto:Semediawiki-devel@lists.sourceforge.net >> <mailto:Semediawiki-devel@lists.sourceforge.net>> >> > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel >> > >> > >> >> >> -- >> Kai Kühn >> Professional Services >> ontoprise GmbH - know how to use Know-how >> --- >> ontoprise ist Generalunternehmer für Vulcans Semantic Wiki im >> Projekt Halo >> http://www.ontoprise.de/index.php?id=33 >> --- >> Amalienbadstraße 36 (Raumfabrik 29); 76227 Karlsruhe >> Tel.: +49 (0) 721 509 809 48; Fax: +49 (0) 721 509 809 11 >> eMail: ku...@ontoprise.de <mailto:ku...@ontoprise.de>; www: >> http://www.ontoprise.de >> Sitz der Gesellschaft: Amtsgericht Mannheim, HRB 109540 >> Geschäftsführer: Prof. Dr. Jürgen Angele, Dipl.Wi.-Ing. Hans-Peter >> Schnurr >> >> >> >> ------------------------------------------------------------------------------ >> Apps built with the Adobe(R) Flex(R) framework and Flex >> Builder(TM) are >> powering Web 2.0 with engaging, cross-platform capabilities. >> Quickly and >> easily build your RIAs with Flex Builder, the Eclipse(TM)based >> development >> software that enables intelligent coding and step-through debugging. >> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >> _______________________________________________ >> Semediawiki-devel mailing list >> Semediawiki-devel@lists.sourceforge.net >> <mailto:Semediawiki-devel@lists.sourceforge.net> >> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel >> >> >> > > > ------------------------------------------------------------------------------ _______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel