Testing set up of SPARQL endpoint for SMW using RAP and NetAPI

(For my internal documentation, mostly)

In preparation for my GSoC project to extend RDF export/import in Semantic Mediawiki (SMW), i tested setting up a SPARQL endpoint for my local install of SMW, using the currently available method, which is to use the RAP RDF API for PHP, as described on this page, except for the little modification to the instruction on installing NetAPI, that I should edit /rdfapi-php/netapi/config.inc.php, and not /rdfapi-php/netapi/config.inc.

As described in the project proposal, we are considering replacing the RAP connection with a connection to ARC instead, but the RAP connection will likely be used as a starting point, so I wanted to try it out.

I tried adding some very simple semantic data to my SMW; two articles "Methane" and "Alkane", with an "is a" link on the Methane page to the Alkane page.

One feature of NetAPI is to just export all triples. I tried this, and converted the RDF/XML output into Notation 3 format. with the following results (common namespaces left out for brevity):

    ns2:Alkane     a :Subject;
:page <http://localhost/smw/index.php/Alkane>;
rdfs:isDefinedBy <http://localhost/smw/index.php/Special:ExportRDF/Alkane>;
rdfs:label "Alkane" .

ns2:Methane a :Subject;
ns2:Property-3AIs_a ns2:Alkane;
:page <http://localhost/smw/index.php/Methane>;
rdfs:isDefinedBy <http://localhost/smw/index.php/Special:ExportRDF/Methane>;
rdfs:label "Methane" .

Executing a simple SPARQL query such as:

SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 1.


<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<variable name="s"/>
<variable name="p"/>
<variable name="o"/>
<results ordered="false" distinct="false">
<binding name="s"><uri>http://localhost/smw/index.php/Special:URIResolver/Methane</uri></binding>
<binding name="p"><uri>http://www.w3.org/2000/01/rdf-schema#label</uri></binding>
<binding name="o"><literal>Methane</literal></binding>