SPARQL extractor

From WandoraWiki
Revision as of 13:07, 9 June 2011 by Akivela (Talk | contribs)

Jump to: navigation, search

Wandora's SPARQL extractor is used to transform SPARQL result sets to topic maps. SPARQL extractor takes a SPARQL query and SPARQL endpoint address as inputs, sends the query to the given endpoint and transforms result set to a topic map. Reader should note SPARQL extractor is not a SPARQL endpoint itself nor does it provide a SPARQL interface to topic maps. However, being able to transform SPARQL result sets to topic maps, the feature is very useful as there exists several public SPARQL endpoints such as DBPedia, data.gov and data.gov.uk. A special emphasis is given to Finnish SPARQL endpoint of Helsinki Region Infoshare (HRI) which opens local data sets for mash-ups.

SPARQL extractor is started with menu option File > Extract > Other > SPARQL extractor.... Once started, Wandora opens up a dialog window for endpoint address and SPARQL query. Addition to a general options, we have specified some endpoints forehand to ease extractor usage. These predefined endpoints are DBPedia, HRI, data.gov.uk and data.gov. Select endpoint specific tab to send a query to it.

SPARQL result set conversion to a topic map is simple. Each row in the result set is converted to an association where column values are player topics. Association type is a generic one of type SPARQL Result Set N where N is a query specific hash number. Thus, if your result set has three columns, Wandora creates triple-associations for results. Number of associations is equal to the number of rows in the result set. Conversion transforms all result set values to topics. This applies both resources and literals. Wandora user should note that Wandora merges automatically equal literals (and literals with resources with equal name). As a consequence, user should be careful with the literal values in the result set.

Example

In this rather long example Wandora user first send a query to DBPedia and receives a list of French movies. Then user enriches one of the created movie topics using Wandora's DBPedia extractor.

Second example

In this example Wandora user sends a query to Helsinki Region Infoshare's SPARQL endpoint and receives regional information about Helsinki's suburbs and population centers. Information includes geographical coordinates and polygons of city regions, hierarchy of regions and sometimes a description of a region. Wandora user builds up an occurrence of one region description and translates it to English and Swedish using Google translate feature.

Personal tools