Markus,

Greetings from the presumed-dead author of Semantic Layers. I'm  
finally starting to update SL for compatibility with SMW 1.0--and  
having some luck so far, I've made good progress on a subclass of  
SMWResultPrinter that lets you specify "map" as the format, and that  
part seems to be progressing well.

However, for several of the other features I need to do exactly what  
you mention below--use the existing SMW objects to submit and process  
an arbitrary query, and get the results back in a form I can  
manipulate programmatically. Glad to hear that accessing the database  
is discouraged, as I was loathe to do so.

But I'm having a bit of trouble figuring it out, since the pipeline  
seems primarily geared towards producing printed output. So, could you  
elaborate a bit on precisely how one might use SMW_Store within an  
extension, to process and retrieve a query result, which will be used  
for something other than printing out the results?

Thanks!

-Matt

P.S.: The improvements in 1.0 over 0.7 are terrific so far for  
extension developers--as I said, making my own ResultPrinter was  
practically a piece of cake. Thanks again!


On Feb 9, 2008, at 7:40 AM, Markus Krötzsch wrote:

> On Freitag, 8. Februar 2008, Jeff Thompson wrote:
>> Is there a document (or an email message or comments in the code)  
>> that
>> describes the database schema that SMW uses to store semantic data,
>> including the change history?  I could read the code to try to  
>> figure it
>> out, but I wondered if it is already explained somewhere.
>
> AFAIR it is not. We might add such a resource *but* we strongly  
> discourage any
> direct access to SMW DB tables by extensions anyway. The reason is  
> that SMW
> was designed to allow complete replacement of the semantic storage
> implementation with bascially no changes in the SMW code. We might  
> make us of
> that option.
>
> If you want to access semantic data programmatically, consider the  
> storage
> interface methods (SMW_Store.php) if in PHP, and the RDF export
> (Special:ExportRDF or full dump via SMW_dumpRDF.php) if you are  
> outside PHP.
> If you need something in between, then subclassing the current MySQL  
> storage
> implementation might be a good idea.
>
> Cheers,
>
> Markus
>
>>
>> Thanks,
>> - Jeff
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Semediawiki-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>
>
> -- 
> Markus Krötzsch
> Institut AIFB, Universität Karlsruhe (TH), 76128 Karlsruhe
> phone +49 (0)721 608 7362          fax +49 (0)721 608 5998
> [EMAIL PROTECTED]          www  http://korrekt.org
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
> Semediawiki-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to