1 <filters xmlns="http://indexdata.com/metaproxy">
3 <!-- Which sparql server to use, our demo, or your local installation -->
4 <defaults uri="http://bibframe.indexdata.com/sparql/"/>
5 <!--defaults uri="http://localhost:8890/sparql/"/-->
7 <!-- New structure: Any search in work returns just a list of records.
8 Present will make another request to the backend to get the fields
9 we want, depending on the schema. That part is not yet implemented -->
10 <db path="work" schema="sparql-results">
11 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
12 <prefix>bf: http://bibframe.org/vocab/</prefix>
13 <form>SELECT DISTINCT ?work
15 <criteria>?work a bf:Work</criteria>
16 <!-- TODO: Many more indexes like the ones below-->
17 <index type="bf.title">?work bf:workTitle ?wt .
18 ?wt bf:titleValue %v FILTER(contains(%v, %s))</index>
19 <index type="bf.creator">?work bf:creator ?c .
20 ?c bf:label %v FILTER(contains(%v, %s))</index>
21 <index type="bf.subject">?work bf:subject ?subject .
22 ?subject bf:label %v FILTER(contains(%v, %s))
25 CONSTRUCT { ?work ?rel ?subj }
29 ?work ?rel ?obj FILTER( str(?work) = %s )
33 CONSTRUCT { ?work ?rel ?obj .
42 MINUS { ?obj a bf:Work }
46 MINUS { ?obj1 a bf:Work }
50 MINUS { ?obj2 a bf:Work }
52 ?work ?rel ?obj FILTER( str(?work) = %s )
56 <!-- Instance searches, need to be refined later -->
57 <db path="instance" schema="sparql-results">
58 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
59 <prefix>bf: http://bibframe.org/vocab/</prefix>
60 <form>SELECT ?instance ?title ?format</form>
61 <criteria>?instance a bf:Instance</criteria>
63 <criteria>?instance bf:title ?title</criteria>
64 <index type="4">?instance bf:title %v FILTER(contains(%v, %s))</index>
65 <criteria>?instance bf:format ?format</criteria>
66 <index type="1013">?instance bf:format %s</index>
69 <!-- Simple databases -->
70 <db path="place" schema="sparql-results">
71 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
72 <prefix>bf: http://bibframe.org/vocab/</prefix>
73 <form>SELECT DISTINCT ?label ?id ?place ?relatedTo ?authorizedAccessPoint </form>
74 <criteria>?place a bf:Place</criteria>
75 <criteria>?place bf:label ?label</criteria>
76 <criteria>OPTIONAL { ?place bf:identifier ?id}</criteria>
77 <criteria>OPTIONAL { ?place bf:relatedTo ?relatedTo}</criteria>
78 <criteria>OPTIONAL { ?place bf:authorizedAccessPoint ?authorizedAccessPoint}</criteria>
79 <index type="bf.place">?place bf:label %v FILTER(contains(%v, %s))</index>
80 <index type="any">?place bf:label %v FILTER(contains(%v, %s))</index>
82 <db path="person" schema="sparql-results">
83 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
84 <prefix>bf: http://bibframe.org/vocab/</prefix>
85 <form>SELECT DISTINCT ?label ?id ?person ?relatedTo ?authorizedAccessPoint </form>
86 <criteria>?person a bf:Person</criteria>
87 <criteria>?person bf:label ?label</criteria>
88 <criteria>OPTIONAL { ?person bf:identifier ?id}</criteria>
89 <criteria>OPTIONAL { ?person bf:relatedTo ?relatedTo}</criteria>
90 <criteria>OPTIONAL { ?person bf:authorizedAccessPoint ?authorizedAccessPoint}</criteria>
91 <index type="bf.person">?person bf:label %v FILTER(contains(%v, %s))</index>
92 <index type="any">?person bf:label %v FILTER(contains(%v, %s))</index>
94 <db path="meeting" schema="sparql-results">
95 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
96 <prefix>bf: http://bibframe.org/vocab/</prefix>
97 <form>SELECT DISTINCT ?label ?id ?meeting ?relatedTo ?authorizedAccessPoint </form>
98 <criteria>?meeting a bf:Meeting</criteria>
99 <criteria>?meeting bf:label ?label</criteria>
100 <criteria>OPTIONAL { ?meeting bf:identifier ?id}</criteria>
101 <criteria>OPTIONAL { ?meeting bf:relatedTo ?relatedTo}</criteria>
102 <criteria>OPTIONAL { ?meeting bf:authorizedAccessPoint ?authorizedAccessPoint}</criteria>
103 <index type="bf.meeting">?meeting bf:label %v FILTER(contains(%v, %s))</index>
104 <index type="any">?meeting bf:label %v FILTER(contains(%v, %s))</index>
106 <db path="agent" schema="sparql-results">
107 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
108 <prefix>bf: http://bibframe.org/vocab/</prefix>
109 <form>SELECT DISTINCT ?label ?id ?agent ?relatedTo ?authorizedAccessPoint </form>
110 <criteria>?agent a bf:Agent</criteria>
111 <criteria>?agent bf:label ?label</criteria>
112 <criteria>OPTIONAL { ?agent bf:identifier ?id}</criteria>
113 <criteria>OPTIONAL { ?agent bf:relatedTo ?relatedTo}</criteria>
114 <criteria>OPTIONAL { ?agent bf:authorizedAccessPoint ?authorizedAccessPoint}</criteria>
115 <index type="bf.agent">?agent bf:label %v FILTER(contains(%v, %s))</index>
116 <index type="any">?agent bf:label %v FILTER(contains(%v, %s))</index>
118 <db path="event" schema="sparql-results">
119 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
120 <prefix>bf: http://bibframe.org/vocab/</prefix>
121 <form>SELECT DISTINCT ?label ?id ?event ?relatedTo ?authorizedAccessPoint </form>
122 <criteria>?event a bf:Event</criteria>
123 <criteria>?event bf:label ?label</criteria>
124 <criteria>OPTIONAL { ?event bf:identifier ?id}</criteria>
125 <criteria>OPTIONAL { ?event bf:relatedTo ?relatedTo}</criteria>
126 <criteria>OPTIONAL { ?event bf:authorizedAccessPoint ?authorizedAccessPoint}</criteria>
127 <index type="bf.event">?event bf:label %v FILTER(contains(%v, %s))</index>
128 <index type="any">?event bf:label %v FILTER(contains(%v, %s))</index>
130 <db path="organization" schema="sparql-results">
131 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
132 <prefix>bf: http://bibframe.org/vocab/</prefix>
133 <form>SELECT DISTINCT ?label ?id ?organization ?relatedTo ?authorizedAccessPoint </form>
134 <criteria>?organization a bf:Organization</criteria>
135 <criteria>?organization bf:label ?label</criteria>
136 <criteria>OPTIONAL { ?organization bf:identifier ?id}</criteria>
137 <criteria>OPTIONAL { ?organization bf:relatedTo ?relatedTo}</criteria>
138 <criteria>OPTIONAL { ?organization bf:authorizedAccessPoint ?authorizedAccessPoint}</criteria>
139 <index type="bf.organization">?organization bf:label %v FILTER(contains(%v, %s))</index>
140 <index type="any">?organization bf:label %v FILTER(contains(%v, %s))</index>
142 <db path="topic" schema="sparql-results">
143 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
144 <prefix>bf: http://bibframe.org/vocab/</prefix>
145 <form>SELECT DISTINCT ?label ?id ?topic ?relatedTo ?authorizedAccessPoint </form>
146 <criteria>?topic a bf:Topic</criteria>
147 <criteria>?topic bf:label ?label</criteria>
148 <criteria>OPTIONAL { ?topic bf:identifier ?id}</criteria>
149 <criteria>OPTIONAL { ?topic bf:relatedTo ?relatedTo}</criteria>
150 <criteria>OPTIONAL { ?topic bf:authorizedAccessPoint ?authorizedAccessPoint}</criteria>
151 <index type="bf.topic">?topic bf:label %v FILTER(contains(%v, %s))</index>
152 <index type="any">?topic bf:label %v FILTER(contains(%v, %s))</index>
155 <!-- Title search, probably not needed. Will need to be rewritten to the same
156 system as the work search above, with separate present query -->
157 <db path="title" schema="sparql-results">
158 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
159 <prefix>bf: http://bibframe.org/vocab/</prefix>
160 <form>SELECT DISTINCT ?title ?titleValue
161 ?formDesignation ?partNumber ?partTitle ?subtitle
162 ?titleAttribute ?titleQualifier ?titleSource
163 ?titleType ?titleVariationDate</form>
164 <criteria>?title a bf:Title</criteria>
165 <criteria>OPTIONAL { ?title bf:titleValue ?titleValue}</criteria>
166 <criteria>OPTIONAL { ?title bf:formDesignation ?formDesignation}</criteria>
167 <criteria>OPTIONAL { ?title bf:partNumber ?partNumber}</criteria>
168 <criteria>OPTIONAL { ?title bf:partTitle ?partTitle}</criteria>
169 <criteria>OPTIONAL { ?title bf:subtitle ?subtitle}</criteria>
170 <criteria>OPTIONAL { ?title bf:titleAttribute ?titleAttribute}</criteria>
171 <criteria>OPTIONAL { ?title bf:titleQualifier ?titleQualifier}</criteria>
172 <criteria>OPTIONAL { ?title bf:titleSource ?titleSource}</criteria>
173 <criteria>OPTIONAL { ?title bf:titleType ?titleType}</criteria>
174 <criteria>OPTIONAL { ?title bf:titleVariationDate ?titleVariationDate}</criteria>
175 <index type="bf.title">?title bf:titleValue %v FILTER(contains(%v, %s))</index>
176 <index type="bf.subtitle">?title bf:subtitle %v FILTER(contains(%v, %s))</index>
177 <index type="bf.parttitle">?title bf:partTitle %v FILTER(contains(%v, %s))</index>
178 <index type="any">?title ?rel %v FILTER(contains(str(%v), %s))</index>
180 <!-- A hack to be able to look at any triplet in the base -->
181 <db path="node" schema="sparql-results">
182 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
183 <prefix>bf: http://bibframe.org/vocab/</prefix>
184 <form>SELECT ?node ?rel ?obj</form>
185 <index type="any">?node ?rel ?obj FILTER( str(?node) = %s )</index>
187 <!-- A way to see which triplets refers to a given uri. -->
188 <db path="ref" schema="sparql-results">
189 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
190 <prefix>bf: http://bibframe.org/vocab/</prefix>
191 <form>SELECT ?node ?rel ?obj</form>
192 <index type="any">?node ?rel ?obj FILTER( str(?obj) = %s )</index>
196 <message>http</message>
197 <category apdu="true"/>
199 <filter type="http_client">
200 <x-forwarded-for>true</x-forwarded-for>