Extension:LinkedWiki/Configuration

By default, LinkedWiki uses the file extension.json to describe the SPARQL services usable by the users of your Wiki, such as Wikidata.

For your local SPARQL services, you can use the LocaSettings.php of your wiki.

Quick start
In the special pages of your Wiki, you will find a new special page  where you can see the details of your current configuration. When you change your configuration, you can check in this page if your wiki reads correctly your configuration.

The default parameters of SPARQL services are in the file. Before to change it, save a copy of the precedent configuration. The configuration  gives the configuration by default of unknown endpoint and for uncompleted configurations. For example : If users use the parameter   of parser , it's the  's configuration will use to build the HTTP request (by default a HTTP POST request).

After installation, Wikidata is the service SPARQL by default that means, if you do a SPARQL query without precise an endpoint or a configuration, Wikidata will be use to resolve the query. You can change the service by default with this parameter  in the LocalSettings.php of wiki.

Example, if you add a new SPARQL service:

The system completes the configuration with the configuration by default so at the end the configuration of this new SPARQL service will be :

Easily, you can use the other parameters in your configuration. The credentials doesn't show in the special page.

See examples of configuration : basic endpoints in the Linked Open Data

Wikidata and other use their own RDF schemas. The Lua functions can simplify the users's works without learn all these schemas but you need to define a new  for each schema used by your SPARQL services. Here, an example :

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: