RDFIO-Mediawiki Extension
RDFIO is a Mediawiki extension which:
- adds SPARQL Endpoint to SMW installtion
- imports RDFs into the wiki
- queries remote SPARQL endpoint URL
Related Work
The article RDFIO: extending Semantic MediaWiki for interoperable biomedical data management[1] was quite eye opening, as to how RDFIO can be used to expand the territory of Mediawiki + Semantic Mediawiki into Semantic Web, in "usage scenarios such as bootstrapping new wikis from existing data sources, or round-tripping between the SMW data structure and the RDF data format used in the wider Semantic Web, "
Installing
Installation of RDFIO is simple, if the installation steps are followed.
However, as described in the following issue: the extension development team is having a hard time to keep up with the development and deployment rate of Mediawiki. So for the moment, for Mediawiki 1.34.1, the branch 59-make-work-with-mw-1.34 should be checkout
.
cd extensions/Rdfio git checkout 59-make-work-with-mw-1.34 php ../../maintenance/update.php
Once done in the page Special:RDFIOAdmin it should read: "The triplestore is already set up"
import RDF
using Rdfio/maintenance/importRdf.php it is possible to import to the wiki RDF files. As example I will import Tim Berners Lee FOAF card
php importRdf.php --server http://localhost --in ~/Documents/Projects/RDF/LearningSparql/TimBernersLee.ttl
That import will probably add a few Jobs to be MW queue which need to be run:
php ../../maintenance/update.php
SPARQL Query
Now that TBL FOAF se can use the Special:SPARQLEndpoint to query it
@PREFIX w: <http://localhost/beerwiki/index.php/Special:URIResolver/> .
SELECT *
WHERE { ?s ?p "Timothy Berners-Lee" }
LIMIT 25
References
- ↑ Lampa, S., Willighagen, E., Kohonen, P. et al. RDFIO: extending Semantic MediaWiki for interoperable biomedical data management. J Biomed Semant 8, 35 (2017). https://doi.org/10.1186/s13326-017-0136-y