X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bibframe%2Ftriplestore.xml;h=e9827688cb1abbab5e3fde3be0f26ddb28c758d1;hb=c9757fa62aa6079ffde988098d1f6db4178b2ccb;hp=7277edbfae3251e367726f1aa285788c1d184909;hpb=7a968011cd557e3f962ef3423f276cc6a5294479;p=mp-sparql-moved-to-github.git diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index 7277edb..e982768 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -1,61 +1,59 @@ - - + + + + + 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/ @@ -67,10 +65,12 @@ ?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 ?label ?id ?place ?relatedTo ?authorizedAccessPoint
+
SELECT DISTINCT ?label ?id ?place ?relatedTo ?authorizedAccessPoint
?place a bf:Place ?place bf:label ?label OPTIONAL { ?place bf:identifier ?id} @@ -82,7 +82,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?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 +94,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?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 +106,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?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 +118,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?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 +130,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?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 +142,7 @@ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ -
SELECT DISTINCT ?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,12 +151,46 @@ ?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 DISTINCT ?title ?titleValue + ?formDesignation ?partNumber ?partTitle ?subtitle + ?titleAttribute ?titleQualifier ?titleSource + ?titleType ?titleVariationDate
+ ?title a bf:Title + OPTIONAL { ?title bf:titleValue ?titleValue} + OPTIONAL { ?title bf:formDesignation ?formDesignation} + OPTIONAL { ?title bf:partNumber ?partNumber} + OPTIONAL { ?title bf:partTitle ?partTitle} + OPTIONAL { ?title bf:subtitle ?subtitle} + OPTIONAL { ?title bf:titleAttribute ?titleAttribute} + OPTIONAL { ?title bf:titleQualifier ?titleQualifier} + OPTIONAL { ?title bf:titleSource ?titleSource} + OPTIONAL { ?title bf:titleType ?titleType} + OPTIONAL { ?title bf:titleVariationDate ?titleVariationDate} + ?title bf:titleValue %v FILTER(contains(%v, %s)) + ?title bf:subtitle %v FILTER(contains(%v, %s)) + ?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