LOC-6: Isbn indexes for instances
authorHeikki Levanto <heikki@indexdata.dk>
Fri, 8 May 2015 14:08:07 +0000 (16:08 +0200)
committerHeikki Levanto <heikki@indexdata.dk>
Fri, 8 May 2015 14:20:11 +0000 (16:20 +0200)
bibframe/triplestore.xml

index b5d529f..02d62c5 100644 (file)
                 }
             </index>
 
+            <!-- isbn index. The Instance may contain a isbn10 or isbn13. -->
+            <!-- These can be literal values like -->
+            <!--   http://isbn.example.org/1906833214 which we need to search -->
+            <!-- by our usual substring match. Or they can be links to Identivfiers -->
+            <!-- which will have a proper identifierValue on which we can do -->
+            <!-- an exact match.  -->
+            <index type="bf.isbn">
+                {
+                    ?thing bf:isbn10  %v
+                        FILTER(isUri(%v) &amp;&amp; contains(str(%v), %s))
+                } UNION {
+                    ?thing bf:isbn13  %v
+                        FILTER(isUri(%v) &amp;&amp; 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 )
+                }
+            </index>
+
+
             <!-- Present formats. BF-L comes from "thing" -->
             <!-- Full instance, with the related work too -->
             <present type="BF-V">