X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bibframe%2Ftriplestore.xml;h=7fd29fd699396563c10f95f37477e315b6db7f1d;hb=c2f66096841eb02cf1d68e79660ca57e6a9b4b65;hp=25fab14cb9dd16072a19906a9f9b510b0b90e44c;hpb=f46a54721c067a4146453148774dfeb4c17a6a40;p=mp-sparql-moved-to-github.git diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index 25fab14..7fd29fd 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -17,18 +17,23 @@ - ?thing rdf:type ?any FILTER( ?thing = %u ) + ?thing rdf:type ?any FILTER( ?thing = %u ) + + + + + ?thing a %t + - + CONSTRUCT { - ?thing ?rel ?subj + %u ?rel ?subj } WHERE { - ?thing ?rel ?subj . - ?thing ?rel ?subj FILTER( str(?thing) = %s ) + %u ?rel ?subj . } @@ -158,22 +163,27 @@ ?subject bf:label %v FILTER(contains(%v, %s)) + + + + ?thing bf:contentCategory %u + - - + + CONSTRUCT { - %u ?rel ?wobj1 . - ?wobj1 ?wrel1 ?wobj2 . - ?wobj2 ?wrel2 ?wobj3 . + %u ?wrel1 ?wobj1 . + ?wobj1 ?wrel2 ?wobj2 . + ?wobj2 ?wrel3 ?wobj3 . ?inst ?irel1 ?iobj1 . ?iobj1 ?irel2 ?iobj2 . ?iobj2 ?irel3 ?iobj3 } WHERE { %u a bf:Work . - %u ?rel ?wobj1 . + %u ?wrel1 ?wobj1 . OPTIONAL { ?wobj1 ?wrel2 ?wobj2 @@ -311,9 +321,34 @@ } + + + + + + + + { + ?thing bf:isbn10 %v + FILTER(contains(str(%v), %s)) + } UNION { + ?thing bf:isbn13 %v + FILTER(contains(str(%v), %s)) + } UNION { + { + ?thing bf:isbn10 ?isbn + } UNION { + ?thing bf:isbn13 ?isbn + } + ?isbn a bf:Identifier . + ?isbn bf:identifierValue %v FILTER( %v = %s ) + } + + + - + CONSTRUCT { %u ?irel1 ?iobj1 . ?iobj1 ?irel2 ?iobj2 . @@ -324,11 +359,11 @@ } WHERE { %u a bf:Instance . - %u ?irel1 ?iobj1 + %u ?irel1 ?iobj1 . OPTIONAL { ?iobj1 ?irel2 ?iobj2 MINUS { ?iobj2 a bf:Work } - MINUS { ?iobj2 a bf:Instance } + MINUS { ?iobj2 a bf:Instance } . OPTIONAL { ?iobj2 ?irel3 ?iobj3 MINUS { ?iobj3 a bf:Work } @@ -336,12 +371,12 @@ } } OPTIONAL { - %u bf:instanceOf ?work - ?work ?wrel1 ?wobj1 + %u bf:instanceOf ?work . + ?work ?wrel1 ?wobj1 . OPTIONAL { ?wobj1 ?wrel2 ?wobj2 MINUS { ?wobj1 a bf:Work } - MINUS { ?wobj1 a bf:Instance } + MINUS { ?wobj1 a bf:Instance } . OPTIONAL { ?wobj2 ?wrel3 ?wobj3 MINUS { ?wobj2 a bf:Work } @@ -364,7 +399,7 @@ - + CONSTRUCT {