-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
14760c4
commit d799857
Showing
3 changed files
with
15 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import Handlebars from 'handlebars/dist/handlebars.runtime'; | ||
|
||
import sparqlPreamble from '../sparql/query-templates/preamble-template'; | ||
import restrictToItems from '../sparql/query-templates/restrict-to-items-template'; | ||
|
||
Handlebars.registerPartial('sparqlPreamble', sparqlPreamble); | ||
Handlebars.registerPartial('restrictToItems', restrictToItems); |
25 changes: 15 additions & 10 deletions
25
frontend/src/sparql/query-templates/nodes-by-user-template.hbs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
PREFIX dcterms: <http://purl.org/dc/terms/> | ||
PREFIX oa: <http://www.w3.org/ns/oa#> | ||
CONSTRUCT {?node ?p ?o} | ||
WHERE { | ||
?node ?p ?o. | ||
?node dcterms:creator <{{userURI}}>. | ||
{{#if itemQuery}} | ||
{{>restrictToItems}} | ||
{{/if}} | ||
{{>sparqlPreamble}} | ||
|
||
construct { | ||
?subject ?prop ?val | ||
} where { | ||
?subject ?prop ?val; | ||
dcterms:creator <{{userURI}}>. | ||
{{#itemQuery}} | ||
?anno oa:hasBody ?subject. | ||
?subject a ?x. | ||
{{/itemQuery}} | ||
{{^itemQuery}} | ||
?subject a vocab:Source. | ||
{{/itemQuery}} | ||
} | ||
ORDER BY desc(?node) | ||
ORDER BY desc(?subject) |
12 changes: 0 additions & 12 deletions
12
frontend/src/sparql/query-templates/restrict-to-items-template.hbs
This file was deleted.
Oops, something went wrong.