X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bibframe%2Ftriplestore.xml;h=27220ea090bbab26ba97c06acc0084aa9c19edfb;hb=16b2af13f40e21e9b63192487e9ea2d247ad32c2;hp=3f7d34ce8a1fb20efb4bbcd320602455f7b4edb3;hpb=4ac3a5c367f8a1ccf102cd2a053370f51b735bb6;p=mp-sparql-moved-to-github.git diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index 3f7d34c..27220ea 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -1,76 +1,111 @@ - - + + + + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
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 + SELECT DISTINCT ?work
?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)) - } + + ?work bf:workTitle ?wt . + ?wt bf:titleValue %v FILTER(contains(%v, %s)) + ?work bf:creator ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + ?work bf:subject ?subject . + ?subject bf:label %v FILTER(contains(%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 - ?wt bf:titleValue ?wtitle - ?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)) + + CONSTRUCT { ?work ?rel ?subj } + WHERE { + ?work a bf:Work . + ?work ?rel ?subj . + ?work ?rel ?obj FILTER( str(?work) = %s ) + } + + + CONSTRUCT { ?work ?rel ?obj . + ?obj ?rel1 ?obj1 . + ?obj1 ?rel2 ?obj2 . + ?obj2 ?rel3 ?obj3 } + WHERE { + ?work a bf:Work . + ?work ?rel ?obj . + OPTIONAL { + ?obj ?rel1 ?obj1 + MINUS { ?obj a bf:Work } + } + OPTIONAL { + ?obj1 ?rel2 ?obj2 + MINUS { ?obj1 a bf:Work } + } + OPTIONAL { + ?obj2 ?rel3 ?obj3 + MINUS { ?obj2 a bf:Work } + } + ?work ?rel ?obj FILTER( str(?work) = %s ) + } +
+ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/
SELECT ?instance ?title ?format
?instance a bf:Instance - ?instance bf:title ?title ?instance bf:title %v FILTER(contains(%v, %s)) ?instance bf:format ?format ?instance bf:format %s
+ + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ +
SELECT DISTINCT ?place
+ ?place a bf:Place + ?place ?rel ?obj + ?place bf:label %v FILTER(contains(%v, %s)) + ?place bf:label %v FILTER(contains(%v, %s)) + ?place bf:label %v FILTER(contains(%v, %s)) + + CONSTRUCT { %u ?rel ?obj } + WHERE { + %u ?rel ?obj . + } + + + + + CONSTRUCT { %u ?rel ?obj . + ?obj ?rel1 ?obj1 . + + } + WHERE { + %u ?rel ?obj . + OPTIONAL { ?obj ?rel1 ?obj1 } + + } + +
+ + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns + bf: http://bibframe.org/vocab/
SELECT DISTINCT ?label ?id ?place ?relatedTo ?authorizedAccessPoint
?place a bf:Place ?place bf:label ?label @@ -152,6 +187,9 @@ ?topic bf:label %v FILTER(contains(%v, %s)) ?topic bf:label %v FILTER(contains(%v, %s))
+ + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/