RDFAuthor does SPARQL

Damian is working on a new version of RDFAuthor that generates SPARQL queries (instead of the older Squish notation). It can also (not sure which protocol(s)) get results from a query service. Here’s a screenshot:

Example screenshot of RDFAuthor for query authoring and result display. Nodes and arcs at top of window, tabular results at bottom

The automatically generated (and hence not 100% user-friendly) query was as follows:

      ?var_4 <http ://> ?var_1 .
      ?var_4 <http ://> ?var_5 .
      ?var_4 <http ://> ?var_2 .
      ?var_5 <http ://> ?var_3 .
      ?var_5 <http ://> <mailto> .

What does this say? Pretty much just the following:

Match where we have (in some default RDF graph) the foaf:name of any things with a foaf:mbox of,
whenever there is something that has an emir:subject and emir:date, and that is also emir:from the first thing. SELECT from that the name, subject and date.

This is based on a template graph whose structure can be seen in the screenshot, decorated with yellow variable markers where a node is marked as unknown. Actually I screwed up after the query executed and subsequently marked the mailbox node as unknown too, before taking the screenshot; if that query had been executed, the resultset would have been much larger. The target database is a Joseki service that has an RDF version of the jena-dev mail archives.

A more readable version of the query (untested) might be:

PREFIX emir: <http ://>
PREFIX foaf: <>

SELECT ?name ?date ?sub

emir:subject ?sub ;
emir:date ?date ;
foaf:name ?name;
foaf:mbox>> .

Add Comment Register