Screenshots

Connection settings

First, user have to connect to any RDF data sources. In Sparkle, a user can connect to the two different RDF data sources – (1) local and (2) OpenLink Virtuoso. There are examples for both of them. Oracle Database with Semantic Web technologies were disabled from 2015.

Local store.OpenLink Virtuoso storage.

Main window

Sparkle main window is very simple. This you will see when connected to any data source.

Sparkle main window.

Management of repositories

There you can see the dialog for managing functions. Similar dialogs are for data types, prefixes and resources.

Dialog for managing functions.

Fields in query

Each field can have different type based on context. You can select from:

  • variable,
  • prefixed name,
  • IRI,
  • blank node
  • literal
  • a as shortcut for rdf:type
  • modifier
  • expression
  • boolean for true or false values (not case sensitive)
  • numeric
  • Nil
  • and undef

All field types have enabled validation. On the next figure you can see an empty form for the SELECT clause with field types for an object part of triple.

Form field type and validation example for <i>SELECT</i> query.

Sub-query

Sparkle has support for sub-queries defined by SPARQL 1.1. You can see our solution on the next figure. A new tab is added when a sub-query created. You edit sub-query on its own tab. You are allowed to evaluate sub-query only and see its results.

Tab color

You can set a tab color, for a better clarity. The color is used for the main tab and all tabs of its sub-queries and evaluated results.

Example of colored tabs.

Example 1 - main diagnosis of patients

Example of list of patients with their main diagnosis. This means we want:

  • get patient ID (?id), sex (?sex), date of diagnosis (?diagDate) and diagnosis date (?code - as URI)
  • use the http://mre.zcu.cz/dataset/medical graph
  • main diagnosis has value 1 of ds:diagOrder property - used in FILTER clause.
  • order by patient's ID in an ascending order

Query in Sparkle's form-based environment is shown on the next figure.

Filed SELECT query in form elements.

Results you will see when you push Evaluate button.

Results of SELECT query listing main diagnosis of patients.

You can switch to Query tab showing generated SPARQL query in text editor with simple highlighting and auto-complete functions Ctrl + Space when query evaluated.

The generated SPARQL shown in text editor with highlighting.

The generated SELECT query in the SPARQL is:

PREFIX  xsd:  <http://www.w3.org/2001/XMLSchema#>
PREFIX  ds:   <http://mre.zcu.cz/ontology/dasta.owl#>

SELECT ?id ?sex ?diagDate ?code
FROM <http://mre.zcu.cz/dataset/medical>
WHERE
  { ?diagnosis a                       ds:ActualDiagnosis ;
               ds:diagOrder            ?diagnosisOrder ;
               ds:datetimeEvent        ?diagDate ;
               ds:diagCode             ?code .
    ?diagnosis ds:patient/ds:patientID ?id .
    ?diagnosis ds:patient/ds:sex       ?sex
    FILTER ( xsd:int(?diagnosisOrder) = "1"^^xsd:int )
  }
ORDER BY ASC(xsd:int(?id))

You can download example 1 in Sparkle's SQF.

Example 2 - properties count in RDF/RDFS

Query in Sparkle's form-based environment is shown on the next figure.

Filled SELECT query in form elements.

Results you will see when you push Evaluate button.

Results of SELECT query listing count of properties in RDF/RDFS.

You can switch to Query tab showing generated SPARQL query.

The generated SPARQL shown in text editor with highlighting.

The generated SELECT query in the SPARQL is:

SELECT ?property (COUNT(?subject) AS ?count)
WHERE
  { ?subject ?property ?object }
GROUP BY ?property
HAVING ( ?count > 50 )
ORDER BY DESC(?count)

You can download example 2 in Sparkle's SQF.

Special functions

Search for properties

This function is available in all queries where WHERE clause is present. Sparkle is able to search for properties that exist for some subject in connected data source.

Button for using the property-search function.

A triple with the property-search ability have a question-mark button before predicate field when the subject filled properly and property type is Prefixed name.

You are asked to set depth for searching when button with question-mark is pressed.

Searching depth is set to 3.

Then a Searching of paths with progress bar is shown. You can cancel searching by pressing the cancel button of the dialog.

Searching of paths.

Dialog with found paths is shown when searching was done. The list consists of found property paths with its value. The value is after two dashes.

You just select one of found results and it will be used in the active triple's predicate and object fields.