SPARQL Editor
The Sparql editor can be accessed through the Semantic Turkey tool menu (by choosing the SPARQL option) as well as by clicking on the proper icon in the Semantic Turkey toolbar. The editor is hosted in a dedicated page which is opened in a new tab.
The editor is divided into three parts:
- an upper part is for query editing
- the central part reports the results of the query
- the bottom part contains the button for submitting the query, the option to include inferred statements in the result, and an exporter for the results of the queries
Query Editing
The query editing section of the SPARQL Editor contains a text area for typing the query. The facility buttons which were available in previous versions have been replaced with a syntax completion helper (see figure below, where prefixes are being suggested), activable with the CTRL+SPACE key combination. Syntax checking and highlighting are also a feature of this new editor.
The syntax completion helper and syntax checking/highlighting features have been made available by adapting the open source Flint SPARQL Editor to the Semantic Turkey environment. Besides the inclusion in the XUL environment of Firefox, the completion has been improved to provide not only language syntax completion, but also (to a limited extent) live suggestions from the data present in the managed project (e.g. available prefix/namespace mappings).
The SPARQL editor supports SPARQL 1.0, 1.1 (QUERY and UPDATE), and the completion/checker can be set to cover those specific languages.
Results Area
The results area of the SPARQL Tab shows the results of the submitted query:- SELECT queries provide results in the form of TUPLE bindings, so they are shown as records in a table, with the headers representing the bound variables
- DESCRIBE and CONSTRUCT queries are said to be GRAPH queries, in that the result of their processing is a RDF GRAPH. For this reason, a table with a static template (three headers representing the three elements of a RDF triple) is used to represent results content
- ASK queries provide a boolean result, telling if the GRAPH PATTERN of the query successfully matched the ontology graph
Exporting results
The results obtained from a SPARQL query can be exported to an external file. Currently the json and text format are available.