Help:Configuration parameter "$smwgSparqlDefaultGraph"

Jump to: navigation, search
edit with form (experimental)

Title $smwgSparqlDefaultGraph
Description Sets the identifier (graph) of the SPARQL database
Default setting
Software Semantic MediaWiki
First version supported
Last version supported still available
Configuration Store settings
Keyword sparqlstore · store · rdf · sparql

$smwgSparqlDefaultGraph is a configuration parameter that is used to set the identifier (graph) of the the semantic update store when using a SPARQL database. The parameter was introduced in Semantic MediaWiki 1.7.0Released on 1 January 2012 and compatible with MW 1.16.x - 1.19.x..

Default setting

$smwgSparqlDefaultGraph = '';

This means that no name for the default graph was defined. Leaving the default graph URI empty only works if the SPARQL store is configured to use some default default graph or if it generally supports this.

Changing the default setting

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Defining a default name for the graph
$smwgSparqlDefaultGraph = '';

The default graph is similar to a database name in relational databases. It can be set to any URI, e.g. the main page URI of your wiki with "#graph" appended. Different wikis should normally use different default graphs unless there is a good reason to share one graph. Moreover, once set this name should not be changed even in case of an URL change since it serves as an unique universal identifier.

See also