+
+ <!-- bf.uri is a simple way to get to a work -->
+ <index type="bf.uri"> ?work a bf:Work FILTER( ?work = %u ) </index>
+
+ <!-- Title indexes -->
+ <!-- These are messy, there are so many ways to get to a title -->
+
+ <!-- Main title. Looks logical, but in practice we have seen only a very
+ small number of these -->
+ <index type="bf.title">
+ ?work bf:title %v FILTER(contains(%v, %s))
+ </index>
+
+ <!-- worktitle seems to be the most common way to store the title of a work -->
+ <index type="bf.worktitle">
+ ?work bf:workTitle ?wt .
+ ?wt bf:titleValue %v FILTER(contains(%v, %s))
+ </index>
+
+ <!-- Combining the two above, since users are not likely to know how
+ a given title has been indexed -->
+ <index type="bf.maintitle">
+ {
+ ?work bf:workTitle ?wt .
+ ?wt bf:titleValue %v FILTER(contains(%v, %s))
+ } UNION {
+ ?work bf:title %v FILTER(contains(%v, %s))
+ }
+ </index>
+
+
+ <!-- the worktitle can also contain a subtitle and a parttitle -->
+ <index type="bf.subtitle">?work bf:workTitle ?wt .
+ ?wt bf:subtitle %v FILTER(contains(%v, %s))
+ </index>
+
+ <index type="bf.parttitle">
+ ?work bf:workTitle ?wt .
+ ?wt bf:partTitle %v FILTER(contains(%v, %s))
+ </index>
+
+ <!-- work.titlevariation - this could also have sub- and partTitles -->
+ <index type="bf.titlevariation">
+ ?work bf:titleVariation ?tv .
+ ?tv bf:titleValue %v FILTER(contains(%v, %s))
+ </index>
+
+ <!-- Instance titles -->
+ <index type="bf.instancetitle">
+ ?inst bf:instanceOf ?work .
+ ?inst bf:instanceTitle ?it .
+ ?it bf:titleValue %v FILTER(contains(%v, %s))
+ </index>
+
+ <!-- Combined title index. There are so many ways titles can be expresses
+ in Bibframe, this seems to cover most of what we have seen -->
+ <index type="bf.anytitle">
+ { ?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))
+ }
+ </index>
+
+ <!-- Author indexes. Much simpler than titles. -->
+ <index type="bf.creator">
+ ?work bf:creator ?c .
+ ?c bf:label %v FILTER(contains(%v, %s))
+ </index>
+
+ <index type="bf.contributor">
+ ?work bf:contributor ?c .
+ ?c bf:label %v FILTER(contains(%v, %s))
+ </index>
+
+ <!-- Subjects -->
+ <index type="bf.subject">
+ ?work bf:subject ?subject .