X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=bibframe%2Ftriplestore.xml;h=5e41731432f6aa9824b9b1a04e99faf0e778e5aa;hb=36ef98cd8e62046c02aa1bff3a74ee14f6151d9a;hp=13eee027728ad28131677ce59e047f8bb77b725f;hpb=cca60a38323ce892b615d6643a45fc5f688e506c;p=mp-sparql-moved-to-github.git diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index 13eee02..5e41731 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -1,76 +1,153 @@ - - + + + + + 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 ) + } + + + CONSTRUCT { %u ?rel ?obj . + ?obj ?rel1 ?obj1 . + ?obj1 ?rel2 ?obj2 . + ?obj2 ?rel3 ?obj3 . + ?inst ?irel1 ?iobj1 . + ?iobj1 ?irel2 ?iobj2 . + ?iobj2 ?irel3 ?iobj3 } + WHERE { + %u a bf:Work . + %u ?rel ?obj . + OPTIONAL { + ?obj ?rel1 ?obj1 + MINUS { ?obj a bf:Work } + MINUS { ?obj a bf:Instance } + } + OPTIONAL { + ?obj1 ?rel2 ?obj2 + MINUS { ?obj1 a bf:Work } + MINUS { ?obj1 a bf:Instance } + } + OPTIONAL { + ?obj2 ?rel3 ?obj3 + MINUS { ?obj2 a bf:Work } + MINUS { ?obj2 a bf:Instance } + } + OPTIONAL { + ?inst bf:instanceOf %u + } + OPTIONAL { + ?inst ?irel1 ?iobj1 + } + OPTIONAL { + ?iobj1 ?irel2 ?iobj2 + } + OPTIONAL { + ?iobj2 ?irel3 ?iobj3 + } + } +
+ 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 ?label ?id ?place ?relatedTo ?authorizedAccessPoint
+
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 OPTIONAL { ?place bf:identifier ?id} @@ -82,7 +159,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT ?label ?id ?person ?relatedTo ?authorizedAccessPoint
+
SELECT DISTINCT ?label ?id ?person ?relatedTo ?authorizedAccessPoint
?person a bf:Person ?person bf:label ?label OPTIONAL { ?person bf:identifier ?id} @@ -94,7 +171,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT ?label ?id ?meeting ?relatedTo ?authorizedAccessPoint
+
SELECT DISTINCT ?label ?id ?meeting ?relatedTo ?authorizedAccessPoint
?meeting a bf:Meeting ?meeting bf:label ?label OPTIONAL { ?meeting bf:identifier ?id} @@ -106,7 +183,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT ?label ?id ?agent ?relatedTo ?authorizedAccessPoint
+
SELECT DISTINCT ?label ?id ?agent ?relatedTo ?authorizedAccessPoint
?agent a bf:Agent ?agent bf:label ?label OPTIONAL { ?agent bf:identifier ?id} @@ -118,7 +195,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT ?label ?id ?event ?relatedTo ?authorizedAccessPoint
+
SELECT DISTINCT ?label ?id ?event ?relatedTo ?authorizedAccessPoint
?event a bf:Event ?event bf:label ?label OPTIONAL { ?event bf:identifier ?id} @@ -130,7 +207,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT ?label ?id ?organization ?relatedTo ?authorizedAccessPoint
+
SELECT DISTINCT ?label ?id ?organization ?relatedTo ?authorizedAccessPoint
?organization a bf:Organization ?organization bf:label ?label OPTIONAL { ?organization bf:identifier ?id} @@ -142,7 +219,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT ?label ?id ?topic ?relatedTo ?authorizedAccessPoint
+
SELECT DISTINCT ?label ?id ?topic ?relatedTo ?authorizedAccessPoint
?topic a bf:Topic ?topic bf:label ?label OPTIONAL { ?topic bf:identifier ?id} @@ -151,10 +228,13 @@ ?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/ -
SELECT ?title ?titleValue + SELECT DISTINCT ?title ?titleValue ?formDesignation ?partNumber ?partTitle ?subtitle ?titleAttribute ?titleQualifier ?titleSource ?titleType ?titleVariationDate
@@ -174,12 +254,20 @@ ?title bf:partTitle %v FILTER(contains(%v, %s)) ?title ?rel %v FILTER(contains(str(%v), %s))
- + + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
DESCRIBE ?node
+
SELECT ?node ?rel ?obj
?node ?rel ?obj FILTER( str(?node) = %s )
+ + + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns + bf: http://bibframe.org/vocab/ +
SELECT ?node ?rel ?obj
+ ?node ?rel ?obj FILTER( str(?obj) = %s ) +
http