Created
June 28, 2016 06:47
-
-
Save jindrichmynarz/1a54943db87c94e0ad561b36169d9d51 to your computer and use it in GitHub Desktop.
Generating SPARQL: Mustache template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
| SELECT ?person | |
| {{#properties}} | |
| (SAMPLE(?_{{varname}}) AS ?{{varname}}) | |
| {{/properties}} | |
| WHERE { | |
| { | |
| SELECT ?person | |
| WHERE { | |
| { | |
| SELECT DISTINCT ?person | |
| WHERE { | |
| ?person a foaf:Person . | |
| {{#properties}} | |
| {{#required?}} | |
| ?person <{{{property}}}> [] . | |
| {{/required?}} | |
| {{/properties}} | |
| } | |
| ORDER BY ?person | |
| } | |
| } | |
| LIMIT {{limit}} | |
| OFFSET {{offset}} | |
| } | |
| {{#properties}} | |
| {{^required?}} OPTIONAL { {{/required?}} | |
| ?person <{{{property}}}> ?_{{varname}} . | |
| {{^required?}} } {{/required?}} | |
| {{/properties}} | |
| } | |
| GROUP BY ?person |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment