X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bibframe%2Ftriplestore.xml;h=f227102a1ebe8239fb752b663ed95aac61cc9266;hb=940489f5143549dd69ffa456e47e13b7c94aa29a;hp=2e53a3147111270d3fc34b581d294ee45cc1c875;hpb=e5b5ae2b4836f76d84aae25c0edf4312b761dae4;p=mp-sparql-moved-to-github.git diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index 2e53a31..f227102 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -1,25 +1,48 @@ - + + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?work ?wtitle ?creatorlabel ?subjectlabel
+
SELECT + ?work + (sql:GROUP_DIGEST (?wtitle, ' ; ', 1000, 1)) AS ?title + (sql:GROUP_DIGEST (?creatorlabel, ' ; ', 1000, 1))AS ?creator + (sql:GROUP_DIGEST (?subjectlabel, ' ; ', 1000, 1))AS ?subject +
?work a bf:Work - ?work bf:workTitle ?wt - ?wt bf:titleValue ?wtitle + OPTIONAL { + ?work bf:workTitle ?wt . + ?wt bf:titleValue ?wtitle } + + OPTIONAL { + ?work bf:creator ?creator . + ?creator bf:label ?creatorlabel } + + OPTIONAL { + ?work bf:subject ?subject . + ?subject bf:label ?subjectlabel } + ?wt bf:titleValue %v FILTER(contains(%v, %s)) - ?work bf:creator ?creator - ?creator bf:label ?creatorlabel ?creator bf:label %v FILTER(contains(%v, %s)) - ?work bf:subject ?subject - ?subject bf:label ?subjectlabel ?subject bf:label %v FILTER(contains(%v, %s)) + { + ?work ?op1 ?child . + ?child ?op2 %v FILTER(contains(STR(%v), %s)) + } + + GROUP BY $work
- + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
CONSTRUCT { ?work bf:title ?title . ?work bf:author ?creator . ?work bf:instanceTitle ?it }
+
CONSTRUCT { + ?work bf:title ?wtitle . + ?work bf:instanceTitle ?title . + ?work bf:author ?creator . + ?work bf:subject ?subjectlabel } +
?work a bf:Work ?work bf:workTitle ?wt @@ -32,10 +55,10 @@ ?subject bf:label ?subjectlabel ?subject bf:label %v FILTER(contains(%v, %s))
- + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?instance ?title ?format
+
SELECT ?instance ?title ?format
?instance a bf:Instance ?instance bf:title ?title