This page (revision-30) was last changed on 20-Mar-2018 09:23 by Joba Baumeister

This page was created on 25-Oct-2013 10:15 by Jochen Reutelshöfer

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
30 20-Mar-2018 09:23 1 KB Joba Baumeister to previous
29 20-Mar-2018 09:22 1 KB Joba Baumeister to previous | to last
28 07-Feb-2017 09:56 1 KB Jochen Reutelshöfer to previous | to last
27 07-Feb-2017 09:53 1 KB Jochen Reutelshöfer to previous | to last
26 23-Jun-2014 16:16 1 KB Albrecht Striffler to previous | to last
25 23-Jun-2014 16:15 1 KB Albrecht Striffler to previous | to last
24 21-May-2014 15:37 1 KB Joba Baumeister to previous | to last
23 21-May-2014 15:35 1 KB Joba Baumeister to previous | to last
22 21-May-2014 15:34 1 KB Joba Baumeister to previous | to last
21 21-May-2014 15:34 1 KB Joba Baumeister to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 changed one line
[{TableOfContents }]
!!! Inline SPARQL Queries
At line 3 removed 3 lines
!!! Definition
At line 12 removed one line
After the SPARQL statement the following annotations can be inserted:
At line 14 changed 8 lines
|| Annotation || Description
| @name | Gives the SPARQL the specified name. The name can be used as reference in other markups (like [InlineSparql|Doc InlineSparql])
| @zebramode | Renders the result table in zebra-style (gray/white).
| @border | A visual border is painted around the result table cells.
| @rawOutput | No abbreviations are used in the result table, but the full content (of literals for example) is printed.
| @showQuery | Besides the results of the query, also the query is shown in the view mode of the wiki.
| @sorting | The result table is sorted.
| @timeout  | The SPARQL gets more time to calculate the results; parameter in milliseconds.
%%KnowledgeBase
%
At line 23 removed 9 lines
!!! Example
The sparql markup allows full support of the SPARQL 1.1. query language specification, which can be found here: [http://www.w3.org/TR/sparql11-query/]
The following simple example shows a query selecting all instances of the class Person:
{{{
At line 33 changed 7 lines
SELECT ?x
WHERE {
?x rdf:type lns:Person .
}
@name: exampleQuery
@zebramode: true
@border: true
SELECT ?x ?y ?z WHERE {?x ?y ?z}
At line 41 removed 30 lines
}}}
In the view mode the results of the query are shown.
!!! Hierarchy Table Example
[Demo - Simpsons]
{{{
SELECT (SAMPLE(?sub) as ?sub) (SAMPLE(?par) as ?par) (SAMPLE(?name) as ?name) ?concept
WHERE {
{
# bind si:abraham as root node
BIND (si:abraham as ?sub) .
}
UNION
{
# collect all parent child relations (will be conntected automagically to si:abraham)
?sub si:parent ?par ;
}
# display name and concept as table columns
?sub rdfs:label ?name .
BIND (?sub as ?concept) .
} GROUP BY ?concept
}}}
!!! See also
* [InlineSparql|Doc InlineSparql]