From: Heikki Levanto Date: Thu, 7 May 2015 12:31:51 +0000 (+0200) Subject: Cleaning up indentation and whitespace X-Git-Tag: v0.6~37 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=f33ee08be0e06b3780b4ecabdef8edc58fc3254a;p=mp-sparql-moved-to-github.git Cleaning up indentation and whitespace --- diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index 40912c5..1c1d739 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -35,499 +35,565 @@ ]> - - - - - - - - rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns - bf: http://bibframe.org/vocab/ - -
SELECT DISTINCT ?work
- ?work a bf:Work - - - ?work a bf:Work FILTER( ?work = %u ) - - - - - - - ?work bf:title %v FILTER(contains(%v, %s)) - - - - - ?work bf:workTitle ?wt . - ?wt bf:titleValue %v FILTER(contains(%v, %s)) - - - - - { - ?work bf:workTitle ?wt . - ?wt bf:titleValue %v FILTER(contains(%v, %s)) - } UNION { - ?work bf:title %v FILTER(contains(%v, %s)) - } - - - - - ?work bf:workTitle ?wt . - ?wt bf:subtitle %v FILTER(contains(%v, %s)) - - - - ?work bf:workTitle ?wt . - ?wt bf:partTitle %v FILTER(contains(%v, %s)) - - - - - ?work bf:titleVariation ?tv . - ?tv bf:titleValue %v FILTER(contains(%v, %s)) - - - - - ?inst bf:instanceOf ?work . - ?inst bf:instanceTitle ?it . - ?it bf:titleValue %v FILTER(contains(%v, %s)) - - - - - { ?work bf:workTitle ?wt . - { ?wt bf:titleValue %v FILTER(contains(%v, %s)) } UNION - { ?wt bf:subtitle %v FILTER(contains(%v, %s)) } UNION - { ?wt bf:partTitle %v FILTER(contains(%v, %s)) } - } UNION { - ?work bf:titleVariation ?tv . - ?tv bf:titleValue %v FILTER(contains(%v, %s)) - } UNION { - ?inst bf:instanceOf ?work . - ?inst bf:instanceTitle ?it . - ?it bf:titleValue %v FILTER(contains(%v, %s)) - } UNION { - ?work bf:title %v FILTER(contains(%v, %s)) - } - - - - - ?work bf:creator ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - - - - ?work bf:contributor ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - - - - { - ?work bf:creator ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - } UNION { - ?work bf:contributor ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - } - - - - - ?work bf:subject ?subject . - ?subject bf:label %v FILTER(contains(%v, %s)) - - - - - - ?work ?rel ?person . - ?person a bf:Person . - ?person bf:label %v FILTER(contains(%v, %s)) - - - - - - - CONSTRUCT { ?work ?rel ?subj } - WHERE { - ?work a bf:Work . - ?work ?rel ?subj . - ?work ?rel ?subj FILTER( str(?work) = %s ) - } - - - - - CONSTRUCT { ?work ?rel ?obj . + + + + + + + + + + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns + bf: http://bibframe.org/vocab/ + + +
SELECT DISTINCT ?work
+ ?work a bf:Work + + + ?work a bf:Work FILTER( ?work = %u ) + + + + + + + + ?work bf:title %v FILTER(contains(%v, %s)) + + + + + + ?work bf:workTitle ?wt . + ?wt bf:titleValue %v FILTER(contains(%v, %s)) + + + + + + + { + ?work bf:workTitle ?wt . + ?wt bf:titleValue %v FILTER(contains(%v, %s)) + } UNION { + ?work bf:title %v FILTER(contains(%v, %s)) + } + + + + ?work bf:workTitle ?wt . + ?wt bf:subtitle %v FILTER(contains(%v, %s)) + + + + ?work bf:workTitle ?wt . + ?wt bf:partTitle %v FILTER(contains(%v, %s)) + + + + + ?work bf:titleVariation ?tv . + ?tv bf:titleValue %v FILTER(contains(%v, %s)) + + + + + ?inst bf:instanceOf ?work . + ?inst bf:instanceTitle ?it . + ?it bf:titleValue %v FILTER(contains(%v, %s)) + + + + + + { + ?work bf:workTitle ?wt . + { ?wt bf:titleValue %v FILTER(contains(%v, %s)) } UNION + { ?wt bf:subtitle %v FILTER(contains(%v, %s)) } UNION + { ?wt bf:partTitle %v FILTER(contains(%v, %s)) } + } UNION { + ?work bf:titleVariation ?tv . + ?tv bf:titleValue %v FILTER(contains(%v, %s)) + } UNION { + ?inst bf:instanceOf ?work . + ?inst bf:instanceTitle ?it . + ?it bf:titleValue %v FILTER(contains(%v, %s)) + } UNION { + ?work bf:title %v FILTER(contains(%v, %s)) + } + + + + + ?work bf:creator ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + + + + ?work bf:contributor ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + + + + { + ?work bf:creator ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + } UNION { + ?work bf:contributor ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + } + + + + + + + ?work bf:subject ?subject . + ?subject bf:label %v FILTER(contains(%v, %s)) + + + + + + + ?work ?rel ?person . + ?person a bf:Person . + ?person bf:label %v FILTER(contains(%v, %s)) + + + + + + + CONSTRUCT { + ?work ?rel ?subj + } + WHERE { + ?work a bf:Work . + ?work ?rel ?subj . + ?work ?rel ?subj 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 } - 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 } - } - ?work ?rel ?obj FILTER( str(?work) = %s ) - } - - - - - CONSTRUCT { %u ?rel ?wobj1 . + ?obj2 ?rel3 ?obj3 + } + WHERE { + &workfull; + + ?work a bf:Work . + ?work ?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 } + } + ?work ?rel ?obj FILTER( str(?work) = %s ) + + + } + + + + + CONSTRUCT { + %u ?rel ?wobj1 . ?wobj1 ?wrel1 ?wobj2 . ?wobj2 ?wrel2 ?wobj3 . ?inst ?irel1 ?iobj1 . ?iobj1 ?irel2 ?iobj2 . - ?iobj2 ?irel3 ?iobj3 } - WHERE { - %u a bf:Work . - %u ?rel ?wobj1 . - OPTIONAL { - ?inst bf:instanceOf %u - } - &workfull; - OPTIONAL { - ?wobj ?wrel1 ?wobj1 - MINUS { ?wobj a bf:Work } - MINUS { ?wobj a bf:Instance } - } - OPTIONAL { - ?wobj1 ?wrel2 ?wobj2 - MINUS { ?wobj1 a bf:Work } - MINUS { ?wobj1 a bf:Instance } - } - OPTIONAL { - ?wobj2 ?wrel3 ?wobj3 - MINUS { ?wobj2 a bf:Work } - MINUS { ?wobj2 a bf:Instance } - } - - OPTIONAL { - ?inst ?irel1 ?iobj1 - } - OPTIONAL { - ?iobj1 ?irel2 ?iobj2 - } - OPTIONAL { - ?iobj2 ?irel3 ?iobj3 - } + ?iobj2 ?irel3 ?iobj3 + } + WHERE { + %u a bf:Work . + %u ?rel ?wobj1 . - } - -
- - - - - rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns - bf: http://bibframe.org/vocab/ - -
SELECT DISTINCT ?inst
- ?inst a bf:Instance - - - ?inst a bf:Instance FILTER( ?inst = %u ) - - - - - - - ?inst bf:title %v FILTER(contains(%v, %s)) - - - - - ?inst bf:instanceTitle ?it . - ?it bf:titleValue %v FILTER(contains(%v, %s)) - - - - ?inst bf:titleStatement %v FILTER(contains(%v, %s)) - - - - - { - ?inst bf:instanceTitle ?it . - ?it bf:titleValue %v FILTER(contains(%v, %s)) - } UNION { - ?inst bf:title %v FILTER(contains(%v, %s)) - } - + OPTIONAL { + ?wobj ?wrel1 ?wobj1 + MINUS { ?wobj a bf:Work } + MINUS { ?wobj a bf:Instance } + } + OPTIONAL { + ?wobj1 ?wrel2 ?wobj2 + MINUS { ?wobj1 a bf:Work } + MINUS { ?wobj1 a bf:Instance } + } + OPTIONAL { + ?wobj2 ?wrel3 ?wobj3 + MINUS { ?wobj2 a bf:Work } + MINUS { ?wobj2 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 DISTINCT ?inst
+ ?inst a bf:Instance - - - ?inst bf:instanceTitle ?it . - ?it bf:subtitle %v FILTER(contains(%v, %s)) - + + + ?inst a bf:Instance FILTER( ?inst = %u ) + - - ?inst bf:instanceTitle ?it . - ?it bf:partTitle %v FILTER(contains(%v, %s)) - - + + - - - { + + ?inst bf:title %v FILTER(contains(%v, %s)) - } UNION { + + + + + ?inst bf:instanceTitle ?it . + ?it bf:titleValue %v FILTER(contains(%v, %s)) + + + ?inst bf:titleStatement %v FILTER(contains(%v, %s)) - } UNION { - ?inst ?titlerel ?it . - ?it a bf:Title - { + + + + + { + ?inst bf:instanceTitle ?it . ?it bf:titleValue %v FILTER(contains(%v, %s)) } UNION { - ?it bf:partTitle %v FILTER(contains(%v, %s)) + ?inst bf:title %v FILTER(contains(%v, %s)) + } + + + + + + ?inst bf:instanceTitle ?it . + ?it bf:subtitle %v FILTER(contains(%v, %s)) + + + + ?inst bf:instanceTitle ?it . + ?it bf:partTitle %v FILTER(contains(%v, %s)) + + + + + + { + ?inst bf:title %v FILTER(contains(%v, %s)) + } UNION { + ?inst bf:titleStatement %v FILTER(contains(%v, %s)) } UNION { - ?it bf:subtitle %v FILTER(contains(%v, %s)) + ?inst ?titlerel ?it . + ?it a bf:Title + { + ?it bf:titleValue %v FILTER(contains(%v, %s)) + } UNION { + ?it bf:partTitle %v FILTER(contains(%v, %s)) + } UNION { + ?it bf:subtitle %v FILTER(contains(%v, %s)) + } } - } - - - - - ?inst bf:creator ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - - - - ?inst bf:instanceOf ?work . - ?work bf:creator ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - - - - ?inst bf:instanceOf ?work . - ?work bf:contributor ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - - - - ?inst bf:contributor ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - - - - { + + + + ?inst bf:creator ?c . ?c bf:label %v FILTER(contains(%v, %s)) - } UNION { - ?inst bf:contributor ?c . - ?c bf:label %v FILTER(contains(%v, %s)) - } UNION { + + + ?inst bf:instanceOf ?work . ?work bf:creator ?c . ?c bf:label %v FILTER(contains(%v, %s)) - } UNION { + + + ?inst bf:instanceOf ?work . ?work bf:contributor ?c . ?c bf:label %v FILTER(contains(%v, %s)) - } - - - - - CONSTRUCT { ?inst ?rel ?subj } - WHERE { - ?inst a bf:Instance . - ?inst ?rel ?subj . - ?inst ?rel ?subj FILTER( str(?inst) = %s ) - } - - - - - CONSTRUCT { - %u ?irel1 ?iobj1 . - ?iobj1 ?irel2 ?iobj2 . - ?iobj2 ?irel3 ?iobj3 . - ?work ?wrel1 ?wobj1 . - ?wobj1 ?wrel2 ?wobj2 . - ?wobj2 ?wrel3 ?wobj3 - } - WHERE { - %u a bf:Instance . - %u ?irel1 ?iobj1 - OPTIONAL { - ?iobj1 ?irel2 ?iobj2 - MINUS { ?iobj1 a bf:Work } - MINUS { ?iobj1 a bf:Instance } + + + + ?inst bf:contributor ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + + + + { + ?inst bf:creator ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + } UNION { + ?inst bf:contributor ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + } UNION { + ?inst bf:instanceOf ?work . + ?work bf:creator ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + } UNION { + ?inst bf:instanceOf ?work . + ?work bf:contributor ?c . + ?c bf:label %v FILTER(contains(%v, %s)) + } + + + + + CONSTRUCT { + ?inst ?rel ?subj + } + WHERE { + ?inst a bf:Instance . + ?inst ?rel ?subj . + ?inst ?rel ?subj FILTER( str(?inst) = %s ) + } + + + + + CONSTRUCT { + %u ?irel1 ?iobj1 . + ?iobj1 ?irel2 ?iobj2 . + ?iobj2 ?irel3 ?iobj3 . + ?work ?wrel1 ?wobj1 . + ?wobj1 ?wrel2 ?wobj2 . + ?wobj2 ?wrel3 ?wobj3 + } + WHERE { + %u a bf:Instance . + %u ?irel1 ?iobj1 OPTIONAL { - ?iobj2 ?irel3 ?iobj3 - MINUS { ?iobj2 a bf:Work } - MINUS { ?iobj2 a bf:Instance } + ?iobj1 ?irel2 ?iobj2 + MINUS { ?iobj1 a bf:Work } + MINUS { ?iobj1 a bf:Instance } + OPTIONAL { + ?iobj2 ?irel3 ?iobj3 + MINUS { ?iobj2 a bf:Work } + MINUS { ?iobj2 a bf:Instance } + } } - } - OPTIONAL { - %u bf:instanceOf ?work OPTIONAL { - ?work ?wrel1 ?wobj1 - MINUS { ?wobj1 a bf:Work } - MINUS { ?wobj1 a bf:Instance } + %u bf:instanceOf ?work OPTIONAL { - ?wobj1 ?wrel2 ?wobj2 - MINUS { ?wobj2 a bf:Work } - MINUS { ?wobj2 a bf:Instance } + ?work ?wrel1 ?wobj1 + MINUS { ?wobj1 a bf:Work } + MINUS { ?wobj1 a bf:Instance } OPTIONAL { - ?wobj2 ?wrel3 ?wobj3 - MINUS { ?wobj3 a bf:Work } - MINUS { ?wobj3 a bf:Instance } + ?wobj1 ?wrel2 ?wobj2 + MINUS { ?wobj2 a bf:Work } + MINUS { ?wobj2 a bf:Instance } + OPTIONAL { + ?wobj2 ?wrel3 ?wobj3 + MINUS { ?wobj3 a bf:Work } + MINUS { ?wobj3 a bf:Instance } + } } } } } - } - - -
- - - - - - - - - - ?thing bf:label %v FILTER(contains(%v, %s)) - ?thing 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 ?thing
- ?thing ?rel ?obj - - CONSTRUCT { %u ?rel ?obj } - WHERE { - %u ?rel ?obj . - } - - - - - CONSTRUCT { %u ?rel ?obj . + + +
+ + + + + + + + + + + ?thing bf:label %v FILTER(contains(%v, %s)) + + + ?thing 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 ?thing
+ ?thing ?rel ?obj + + CONSTRUCT { + %u ?rel ?obj + } + WHERE { + %u ?rel ?obj . + } + + + + + CONSTRUCT { + %u ?rel ?obj . ?obj ?rel1 ?obj1 . - } - WHERE { - %u ?rel ?obj . - OPTIONAL { ?obj ?rel1 ?obj1 } - } - -
- - - - ?thing a bf:Place - ?thing bf:label %v FILTER(contains(%v, %s)) - - - ?thing a bf:Person - ?thing bf:label %v FILTER(contains(%v, %s)) - - - ?thing a bf:Meeting - ?thing bf:label %v FILTER(contains(%v, %s)) - - - ?thing a bf:Agent - ?thing bf:label %v FILTER(contains(%v, %s)) - - - ?thing a bf:Event - ?thing bf:label %v FILTER(contains(%v, %s)) - - - ?thing a bf:Organization - ?thing bf:label %v FILTER(contains(%v, %s)) - - - ?thing a bf:Topic - ?thing bf:label %v FILTER(contains(%v, %s)) - - - - - ?thing a bf:Title - - { ?thing bf:titleValue %v FILTER(contains(%v, %s)) } UNION - { ?thing bf:subtitle %v FILTER(contains(%v, %s)) } UNION - { ?thing bf:partTitle %v FILTER(contains(%v, %s)) } - - - { ?thing bf:titleValue %v FILTER(contains(%v, %s)) } UNION - { ?thing bf:subtitle %v FILTER(contains(%v, %s)) } UNION - { ?thing bf:partTitle %v FILTER(contains(%v, %s)) } - - ?thing bf:titleValue %v FILTER(contains(%v, %s)) - ?thing bf:subtitle %v FILTER(contains(%v, %s)) - ?thing bf:partTitle %v FILTER(contains(%v, %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(?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 - - - - true - + } + WHERE { + %u ?rel ?obj . + OPTIONAL { ?obj ?rel1 ?obj1 } + } + + + + + + + + + ?thing a bf:Place + + ?thing bf:label %v FILTER(contains(%v, %s)) + + + + + ?thing a bf:Person + + ?thing bf:label %v FILTER(contains(%v, %s)) + + + + + ?thing a bf:Meeting + + ?thing bf:label %v FILTER(contains(%v, %s)) + + + + + ?thing a bf:Agent + + ?thing bf:label %v FILTER(contains(%v, %s)) + + + + + ?thing a bf:Event + + ?thing bf:label %v FILTER(contains(%v, %s)) + + + + + ?thing a bf:Organization + + ?thing bf:label %v FILTER(contains(%v, %s)) + + + + + ?thing a bf:Topic + + ?thing bf:label %v FILTER(contains(%v, %s)) + + + + + + + ?thing a bf:Title + + + { + ?thing bf:titleValue %v FILTER(contains(%v, %s)) + } UNION { + ?thing bf:subtitle %v FILTER(contains(%v, %s)) + } UNION { + ?thing bf:partTitle %v FILTER(contains(%v, %s)) + } + + + + { + ?thing bf:titleValue %v FILTER(contains(%v, %s)) + } UNION { + ?thing bf:subtitle %v FILTER(contains(%v, %s)) + } UNION { + ?thing bf:partTitle %v FILTER(contains(%v, %s)) + } + + + + ?thing bf:titleValue %v FILTER(contains(%v, %s)) + + + + ?thing bf:subtitle %v FILTER(contains(%v, %s)) + + + + ?thing bf:partTitle %v FILTER(contains(%v, %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(?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 + + + + + true +