From: Heikki Levanto Date: Thu, 30 Apr 2015 09:28:27 +0000 (+0200) Subject: Towards LOC-7: experimental BF-FI, works with instances X-Git-Tag: v0.6~44 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=36ef98cd8e62046c02aa1bff3a74ee14f6151d9a;p=mp-sparql-moved-to-github.git Towards LOC-7: experimental BF-FI, works with instances --- diff --git a/bibframe/triplestore.xml b/bibframe/triplestore.xml index 27220ea..5e41731 100644 --- a/bibframe/triplestore.xml +++ b/bibframe/triplestore.xml @@ -4,9 +4,9 @@ - + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns bf: http://bibframe.org/vocab/ @@ -37,21 +37,62 @@ WHERE { ?work a bf:Work . ?work ?rel ?obj . - OPTIONAL { + OPTIONAL { ?obj ?rel1 ?obj1 MINUS { ?obj a bf:Work } } - OPTIONAL { + OPTIONAL { ?obj1 ?rel2 ?obj2 MINUS { ?obj1 a bf:Work } } - OPTIONAL { + 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 + } + } +