You are here:
/ Dashboard / Main / MediaWikiSIOCRef

MediaWiki SIOC Reference

What is it about?

By hosting Mediawiki in Virtuoso, you gain integration of your data, both in its existing wiki form, with the ability to manage Talk Pages as NNTP groups, or map the MediaWiki data to the SIOC ontology for the purpose of constructing SPARQL? queries against MediaWiki articles and discussion comments.

Why is it important?

Treating Mediawiki as a repository of semantically marked-up data allows constructing SPARQL? Queries thereby offering a powerful search feature through mapping the data to the SIOC ontology.

How can one use this feature?

What are the RDF Views supported?

Key MediaWiki to SIOC Mappings

MediaWiki SIOC Sample Value
Only 1 Wiki Instance rdf:type sioc:Container
Instance Type rdf:type sioct:Wiki
Instance link sioc:link "http://demo.openlinksw.com/mediawiki"

Dump of all MediaWiki articles


PREFIX sioc: <http://rdfs.org/sioc/ns#> 
prefix dc: <http://purl.org/dc/elements/1.1/>
prefix dct: <http://purl.org/dc/terms/>prefix wikiont: <http://sw.deri.org/2005/04/wikipedia/wikiont.owl#>
SELECT *
FROM <http://demo.openlinksw.com/mw_v> 
WHERE    
  { 
    ?art a wikiont:Article .
    optional{ ?art dc:title ?post_title }.
    optional{ ?art dct:created ?post_date_gmt }.
    optional{ ?art dct:modified ?post_modified_gmt }.
    optional{ ?art sioc:has_creator ?user_name }.
    optional{ ?art sioc:has_container ?name }.
    optional{ ?art sioc:content ?post_content }.
    optional{ ?art sioc:id ?post_id }.
  }
Sample Data (Live Query Results)
  • Click *Here* for an Interactive-Web View of MediaWiki
  • Click *Here* for a live SPARQL Query (via SPARQL Protocol) against a MediaWiki collection of articles.

Dump of MediaWiki General Info


PREFIX sioc: <http://rdfs.org/sioc/ns#> 
PREFIX sioct: <http://rdfs.org/sioc/types#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dct: <http://purl.org/cdc/terms/> 
SELECT *
FROM <http://demo.openlinksw.com/mw_v> 
WHERE    
  { 
    ?forum a sioct:Wiki.           
    optional{ ?forum dc:title ?title }.
    optional{ ?forum  sioc:description ?description }.
    optional{ ?forum  sioc:link ?url }.
    optional{ ?forum  sioc:has_host ?name}.
  }

Sample Data (Live Query Results)
  • Click *Here* for an Interactive-Web View of MediaWiki.
  • Click *Here* for a live SPARQL Query (via SPARQL Protocol) against a MediaWiki.

Dump of MediaWiki Users details


PREFIX sioc: <http://rdfs.org/sioc/ns#>
SELECT *
FROM <http://demo.openlinksw.com/mw_v>
WHERE
  {
    ?user a sioc:User .
    optional{ ?user sioc:id ?id}.
    optional{ ?user sioc:name ?name}.
    optional{ ?user sioc:email ?email}.
    optional{ ?user sioc:email_sha1 ?user_email_sha1}.         
  }

Sample Data (Live Query Results)
  • Click *Here* for an Interactive-Web View of MediaWiki
  • Click *Here* for a live SPARQL Query (via SPARQL Protocol) against a MediaWiki collection of users.

Using SPARQL CONSTRUCT to Export SIOC-based RDF Data Sets

CONSTRUCT-based SPARQL queries are very useful when trying to expose RDF (via a SPARQL Endpoint) to RDF Data Set consumers that do not support SPARQL. In a sense, the SPARQL CONSTRUCT statements as part of a SPARQL Protocol payload deliver a Data Web (Web 3.0) Experience to Interactive-Web Clients (Web 1.0).

List of all registered MediaWiki members returned as an RDF Graph


PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sioc: <http://rdfs.org/sioc/ns#>
CONSTRUCT
  {
    ?x rdf:type sioc:User . 
  }
FROM <http://demo.openlinksw.com/mw_v>
WHERE
  {
    ?x rdf:type sioc:User . 
  }

Reference

See also

Virtuoso and the Virtuoso Website are Copyright (C) OpenLink Software 2006-
SourceForge.net Logo