Extension:LinkedWiki/Configuration

LinkedWiki uses the file extension.json to describe the SPARQL services by default usable by the users of your Wiki, such as Wikidata. For your local SPARQL services, you can use the locasettings 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 new configuration is correct.

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 endpoint of parser functions (#SPARQL), 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 of wiki.

Example, if you add an new SPARQL service:

The system will complete 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 storageMethodClass for each schema used by your SPARQL services. You can start to see the 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 for a Virtuoso SPARQL service:

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

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

To save/delete correctly each triple in the good graph, we 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 extension.json to use it in the configuration of your SPARQL service.

Wikidata
Wikidata doesn't support the POST method.

The storage method for Wikidata: