From: Dan B. <dan...@gm...> - 2009-03-10 10:08:15
|
What is the best way to programatically query SMW? i.e. should I grab the appropriate RDF and parse it (with Perl for example)? Any recommended Perl libraries for parsing the RDF? Should queries be created on a page and then the RDF extracted, or are there mechanisms of sending (GET/POST) 'ask' queries to SMW? Sorry for asking questions that have probably been dicussed before - I didn't find any threads after a quick search. Any links would be great. Dan. |
From: Patrick N. <ma...@pa...> - 2009-03-10 10:19:04
|
Hi, On 2009-03-10 18:08, Dan Bolser wrote: > What is the best way to programatically query SMW? > > i.e. should I grab the appropriate RDF and parse it (with Perl for > example)? Any recommended Perl libraries for parsing the RDF? > > Should queries be created on a page and then the RDF extracted, or are > there mechanisms of sending (GET/POST) 'ask' queries to SMW? > > Sorry for asking questions that have probably been dicussed before - I > didn't find any threads after a quick search. Any links would be > great. If CSV output is ok, you can just GET http://$WIKI/Special:Ask/-5B-5BCategory:Persons-5D-5D-20-5B-5BGender::m-5D-5D/format%3Dcsv/sep%3D,/limit%3D100 which equals the ask query {{ #ask: [[Category:Persons]] [[Gender::m]] | format=csv }} Patrick. -- Key ID: 0x86E346D4 http://patrick-nagel.net/key.asc Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4 |
From: Brian <Bri...@co...> - 2009-03-12 00:29:35
|
mwclient has the expandtemplates and parse methods https://mwclient.svn.sourceforge.net/svnroot/mwclient/trunk/mwclient/ query = '{{ #ask: [[Category:Persons]] [[Gender::m]] | format=csv }}' result = site.expandtemplates(query) On Tue, Mar 10, 2009 at 4:08 AM, Dan Bolser <dan...@gm...> wrote: > What is the best way to programatically query SMW? > > i.e. should I grab the appropriate RDF and parse it (with Perl for > example)? Any recommended Perl libraries for parsing the RDF? > > Should queries be created on a page and then the RDF extracted, or are > there mechanisms of sending (GET/POST) 'ask' queries to SMW? > > Sorry for asking questions that have probably been dicussed before - I > didn't find any threads after a quick search. Any links would be > great. > > Dan. > > ------------------------------------------------------------------------------ > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |
From: Kai K. <ku...@on...> - 2009-03-12 13:22:09
|
hi Dan, You may install the SMWHalo extension. It has an external query interface. You can access it in two ways: 1. Via a SOAP webservice: // ini_set("soap.wsdl_cache_enabled", "0"); $client = new SoapClient("http://<wikipath>/index.php?action=ajax&rs=smwf_ws_getWSDL&rsargs[]=get_eqi"); $query="[[Category:GardeningLog]]"; try { $response = $client->query($query); } catch(Exception $e) { print_r($e); } echo($response); You'll receive the answer in SPARQL-XML format. 2. Via a simple HTTP call http://<wikipath>/index.php?action=ajax&rs=smwf_ws_callEQI&rsargs[]=%5B%5BCategory%3AGardeningLog%5D%5D You'll receive HTML depending on the chosen query format. http://sourceforge.net/projects/halo-extension/ Best, Kai Dan Bolser schrieb: > What is the best way to programatically query SMW? > > i.e. should I grab the appropriate RDF and parse it (with Perl for > example)? Any recommended Perl libraries for parsing the RDF? > > Should queries be created on a page and then the RDF extracted, or are > there mechanisms of sending (GET/POST) 'ask' queries to SMW? > > Sorry for asking questions that have probably been dicussed before - I > didn't find any threads after a quick search. Any links would be > great. > > Dan. > > ------------------------------------------------------------------------------ > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- 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...@on...; 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 |
From: Brian <Bri...@co...> - 2009-03-13 09:28:09
|
Does Halo work with MW and SMW subversion head? On Thu, Mar 12, 2009 at 7:21 AM, Kai Kühn <ku...@on...> wrote: > hi Dan, > > You may install the SMWHalo extension. It has an external query > interface. You can access it in two ways: > > 1. Via a SOAP webservice: > > // ini_set("soap.wsdl_cache_enabled", "0"); > $client = new > SoapClient("http://<wikipath>/index.php?action=ajax&rs=smwf_ws_getWSDL&rsargs[]=get_eqi"); > $query="[[Category:GardeningLog]]"; > > try { > $response = $client->query($query); > } catch(Exception $e) { > print_r($e); > } > echo($response); > > You'll receive the answer in SPARQL-XML format. > > 2. Via a simple HTTP call > > > http://<wikipath>/index.php?action=ajax&rs=smwf_ws_callEQI&rsargs[]=%5B%5BCategory%3AGardeningLog%5D%5D > > > You'll receive HTML depending on the chosen query format. > > http://sourceforge.net/projects/halo-extension/ > > Best, > Kai > > Dan Bolser schrieb: >> What is the best way to programatically query SMW? >> >> i.e. should I grab the appropriate RDF and parse it (with Perl for >> example)? Any recommended Perl libraries for parsing the RDF? >> >> Should queries be created on a page and then the RDF extracted, or are >> there mechanisms of sending (GET/POST) 'ask' queries to SMW? >> >> Sorry for asking questions that have probably been dicussed before - I >> didn't find any threads after a quick search. Any links would be >> great. >> >> Dan. >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Semediawiki-user mailing list >> Sem...@li... >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >> > > > -- > 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...@on...; 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-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |
From: Kai K. <ku...@on...> - 2009-03-13 10:36:13
|
I don't know. SMWHalo 1.4.2 was tested with MW 1.13 and SMW 1.4.2. Kai Brian schrieb: > Does Halo work with MW and SMW subversion head? > > On Thu, Mar 12, 2009 at 7:21 AM, Kai Kühn <ku...@on...> wrote: > >> hi Dan, >> >> You may install the SMWHalo extension. It has an external query >> interface. You can access it in two ways: >> >> 1. Via a SOAP webservice: >> >> // ini_set("soap.wsdl_cache_enabled", "0"); >> $client = new >> SoapClient("http://<wikipath>/index.php?action=ajax&rs=smwf_ws_getWSDL&rsargs[]=get_eqi"); >> $query="[[Category:GardeningLog]]"; >> >> try { >> $response = $client->query($query); >> } catch(Exception $e) { >> print_r($e); >> } >> echo($response); >> >> You'll receive the answer in SPARQL-XML format. >> >> 2. Via a simple HTTP call >> >> >> http://<wikipath>/index.php?action=ajax&rs=smwf_ws_callEQI&rsargs[]=%5B%5BCategory%3AGardeningLog%5D%5D >> >> >> You'll receive HTML depending on the chosen query format. >> >> http://sourceforge.net/projects/halo-extension/ >> >> Best, >> Kai >> >> Dan Bolser schrieb: >> >>> What is the best way to programatically query SMW? >>> >>> i.e. should I grab the appropriate RDF and parse it (with Perl for >>> example)? Any recommended Perl libraries for parsing the RDF? >>> >>> Should queries be created on a page and then the RDF extracted, or are >>> there mechanisms of sending (GET/POST) 'ask' queries to SMW? >>> >>> Sorry for asking questions that have probably been dicussed before - I >>> didn't find any threads after a quick search. Any links would be >>> great. >>> >>> Dan. >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> Semediawiki-user mailing list >>> Sem...@li... >>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >>> >>> >> -- >> 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...@on...; 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-user mailing list >> Sem...@li... >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >> >> > > ------------------------------------------------------------------------------ > 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-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- 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...@on...; 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 |
From: Dan B. <dan...@gm...> - 2009-03-14 00:57:36
|
Thanks all for replies! I'll let you know what I pick. 2009/3/13 Kai Kühn <ku...@on...>: > I don't know. SMWHalo 1.4.2 was tested with MW 1.13 and SMW 1.4.2. > > Kai > > Brian schrieb: >> Does Halo work with MW and SMW subversion head? >> >> On Thu, Mar 12, 2009 at 7:21 AM, Kai Kühn <ku...@on...> wrote: >> >>> hi Dan, >>> >>> You may install the SMWHalo extension. It has an external query >>> interface. You can access it in two ways: >>> >>> 1. Via a SOAP webservice: >>> >>> // ini_set("soap.wsdl_cache_enabled", "0"); >>> $client = new >>> SoapClient("http://<wikipath>/index.php?action=ajax&rs=smwf_ws_getWSDL&rsargs[]=get_eqi"); >>> $query="[[Category:GardeningLog]]"; >>> >>> try { >>> $response = $client->query($query); >>> } catch(Exception $e) { >>> print_r($e); >>> } >>> echo($response); >>> >>> You'll receive the answer in SPARQL-XML format. >>> >>> 2. Via a simple HTTP call >>> >>> >>> http://<wikipath>/index.php?action=ajax&rs=smwf_ws_callEQI&rsargs[]=%5B%5BCategory%3AGardeningLog%5D%5D >>> >>> >>> You'll receive HTML depending on the chosen query format. >>> >>> http://sourceforge.net/projects/halo-extension/ >>> >>> Best, >>> Kai >>> >>> Dan Bolser schrieb: >>> >>>> What is the best way to programatically query SMW? >>>> >>>> i.e. should I grab the appropriate RDF and parse it (with Perl for >>>> example)? Any recommended Perl libraries for parsing the RDF? >>>> >>>> Should queries be created on a page and then the RDF extracted, or are >>>> there mechanisms of sending (GET/POST) 'ask' queries to SMW? >>>> >>>> Sorry for asking questions that have probably been dicussed before - I >>>> didn't find any threads after a quick search. Any links would be >>>> great. >>>> >>>> Dan. >>>> >>>> ------------------------------------------------------------------------------ >>>> _______________________________________________ >>>> Semediawiki-user mailing list >>>> Sem...@li... >>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >>>> >>>> >>> -- >>> 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...@on...; 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-user mailing list >>> Sem...@li... >>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >>> >>> >> >> ------------------------------------------------------------------------------ >> 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-user mailing list >> Sem...@li... >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >> > > > -- > 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...@on...; 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-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |