Help:SPARQLStore (default)

Default access point to the SPARQLStore
Further Information
Short name: Default
Provided by: Semantic MediaWiki
Added: 1.6.0
Removed: still in use
Keyword : RDFRDF · SPARQLStoreSPARQLStore · Database connectorDatabase connector
Table of Contents

To configure Semantic MediaWiki (SMW) to use a SPARQL database, you need to know the location of the SPARQL query service and the location of the SPARQL update service. Optionally, you can also make use of a service that supports the SPARQL over HTTP protocol for updates (if used, SMW will prefer this method over SPARQL Update for simple update requests; it can be omitted if problems occur). The locations of these web services then must be given in LocalSettings.php, as in the following example:


$smwgDefaultStore = 'SMWSparqlStore';
$smwgSparqlRepositoryConnector = 'default';                        # using the default connector
$smwgSparqlQueryEndpoint = 'http://localhost:8080/sparql/';        # location of query service
$smwgSparqlUpdateEndpoint = 'http://localhost:8080/update/';       # location of update service
$smwgSparqlDataEndpoint = 'http://localhost:8080/data/';           # location of SPARQL over HTTP service (set it to ''; in case of problems)
$smwgSparqlDefaultGraph = ''; # optional name of default graph

The first line tells SMW to use the SPARQL store implementation to store data (instead of the SMWSQLStore2 that is the default). The remaining lines provide the relevant service locations, where the last two lines can be omitted. In many cases, configuration parameter $smwgSparqlDataEndpointSets the endpoint for data on the SPARQL database should rather not be set since most stores have their own protocol for posting.

By default, SMW will use a generic SPARQL connector that is based on recent SPARQL documents. Some RDF databases might not be fully compatible with this or might need special tweaks to make use of advanced, non-standard features. Special settings therefore should be used with some stores.

Custom database connectors[edit]

Stores that are conforming to the official SPARQL and SPARQL Update standards should mostly work out of the box. In many cases, the setting $smwgSparqlDataEndpoint = ''; should be used, since support for the (optional) data endpoint protocol is not well tested.

To take advantage of special features of your store, a modified implementation can be created easily by subclassing SparqlDBConnectionProvider together with changing configuration parameter $smwgSparqlCustomConnectorDefines the SPARQL custom database connectors. Other examples include:

Help PageConnectorDescriptionVersion
Help:SPARQLStore (custom)CustomCustom access point to the SPARQLStore2.0.0
Help:SPARQLStore (default)DefaultDefault access point to the SPARQLStore1.6.0
Help:SPARQLStore and VirtuosoVirtuosoVirtuoso access point to the SPARQLStore1.7.1
Help:SPARQLStore and 4store4store4store access point to the SPARQLStore2.0.0
Help:SPARQLStore and BlazegraphBlazegraphBlazegraph access point to the SPARQLStore2.3.0
Help:SPARQLStore and FusekiFusekiJena Fuseki access point to the SPARQLStore2.0.0
Help:SPARQLStore and SesameSesameSesame (RDF4J) access point to the SPARQLStore2.1.0