Extension:LinkedWiki/Configuration

By default, LinkedWiki uses the file  to describe the SPARQL services usable by the users of your Wiki, such as Wikidata. For your local SPARQL services, you can also use  of your wiki.

Quick Start
LinkedWiki provides a new special page  where you can see the details of your current configuration. When you change your configuration, this page can tell you if your wiki reads the configuration correctly.

The default parameters of SPARQL services are specified in the file. Before changing it, save a copy of this configuration as backup. The configuration  contains the default settings for all unknown endpoints and for incomplete configurations. For example: If users use the parameter   of the   parser function, the settings from the   configuration will be used to create the HTTP request (by default a HTTP POST request).

After installation, Wikidata will be the default SPARQL service, i.e. if you do a SPARQL query without specifying an endpoint or a configuration, Wikidata will be used to resolve the query. You can change the default service with the global variable  in   of your wiki.

Example, if you add a new SPARQL service:

The system completes this configuration with the settings from the default configuration, i.e. in the end the configuration of this new SPARQL service will look like this:

In the same way you can set the other parameters in your configuration. See examples for configurations: basic endpoints in the Linked Open Data

The credentials will never be shown in the special page.

Wikidata and other services use their own RDF schemas. The Lua functions can make it easier for users to add and query data without learning all these schemas. You need to define a new  for each schema used by your SPARQL services, e.g.

If you have a question, you can use the talk page.

Basic example with a private database and a simple RDF schema
In the LocalSettings.php for a Virtuoso SPARQL service:

If you want to replace Wikidata by this new SPARQL service, you need to add this line:

If you want to use this SPARQL service to save all RDF data of wiki, you need to add this line:

To save/delete correctly each triple in the good graph, you have to create a new class. In this example, we created the class DatabaseExampleMethod in the folder "LinkedWiki/storageMethod":

With this new class, you need to add it in the LocalSettings.php to use it in the configuration of your SPARQL service.

Wikidata
Wikidata doesn't support the POST method.

The storage method for Wikidata: