X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bibframe%2Ftriplestore.xml;h=f227102a1ebe8239fb752b663ed95aac61cc9266;hb=940489f5143549dd69ffa456e47e13b7c94aa29a;hp=7a6f5068536c3eba721cdfcd41e3be836edee3bd;hpb=29b5585d478fd67ca994c6c76bc454a8e24f79f1;p=mp-sparql-moved-to-github.git diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index 7a6f506..f227102 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -1,9 +1,48 @@ - + + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ - 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 + + 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)) + ?creator bf:label %v FILTER(contains(%v, %s)) + ?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 ?wtitle . + ?work bf:instanceTitle ?title . + ?work bf:author ?creator . + ?work bf:subject ?subjectlabel } +
?work a bf:Work ?work bf:workTitle ?wt @@ -16,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/ - DISTINCT ?instance ?title ?format +
SELECT ?instance ?title ?format
?instance a bf:Instance ?instance bf:title ?title