1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
2 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
6 <productname>Metaproxy SPARQL module</productname>
7 <info><orgname>Index Data</orgname></info>
11 <refentrytitle>sparql</refentrytitle>
12 <manvolnum>3mp</manvolnum>
13 <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
17 <refname>sparql</refname>
19 Metaproxy Module for accessing a triplestore
23 <refsect1><title>DESCRIPTION</title>
25 This module translates Z39.50 operations init, search, present to
26 HTTP requests that accesses a remote triplestore via HTTP
29 Configuration consists of one or more db elements. Each db element
30 describes how to access a specific database. The db element takes
31 attributes name of Z39.50 database (<literal>path</literal>) and
32 HTTP access point of triplestore (<literal>uri</literal>).
33 Optionally, the schema for the database may be given with attribute
34 <literal>schema</literal>.
36 db element takes these elements:
39 <varlistentry><term><prefix/></term>
42 Section that maps prefixes and namespaces for RDF vocabularies.
43 The format is prefix followed by colon, followed by value.
47 <varlistentry><term><form/></term>
50 SPARQL Query formulation selection. SHould start with one of the
51 query forms: SELECT or CONSTRUCT.
55 <varlistentry><term><criteria/></term>
58 section that allows to map static graph patterns for binding
59 variables, narrowing types, etc, or any other WHERE clause criteria
60 static to the Z39.50/SRU database. The final query conversion logic
61 should be able to deduce which optional criteria should be included
62 in the generated SPARQL by analyzing variables required in the query
63 matching and display fields.
67 <varlistentry><term><index type="attribute"/></term>
70 Section used to declare RPN use attribute strings (indexes) and map
71 them to BIBFRAME graph patterns.
72 Items in this section are expanded during RPN query processing and
73 placeholders (%s, %d) are substituted with query terms.
74 To map a given CQL index (e.g the default keyword index) into
75 multiple entity properties, SPARQL constructs like
76 `OPTIONAL` or `UNION` could be used.
84 <refsect1><title>SCHEMA</title>
85 <literallayout><xi:include
86 xi:href="filter_sparql.rnc"
88 xmlns:xi="http://www.w3.org/2001/XInclude" />
92 <refsect1><title>EXAMPLES</title>
94 Configuration for database "Default" that allows searching works. Only
95 the field (use attribute) "bf.wtitle" is supported.
97 <filter type="sparql">
99 uri="http://bibframe.indexdata.com/sparql/"
100 schema="sparql-results"
102 <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
103 <prefix>bf: http://bibframe.org/vocab/</prefix>
104 <field>SELECT ?work ?wtitle</field>
105 <criteria>?work a bf:Work</criteria>
106 <criteria>?work bf:workTitle ?wt</criteria>
107 <criteria>?wt bf:titleValue ?wtitle</criteria>
108 <index type="bf.wtitle">?wt bf:titleValue %v FILTER(contains(%v, %s))</index>
116 <refsect1><title>SEE ALSO</title>
119 <refentrytitle>metaproxy</refentrytitle>
120 <manvolnum>1</manvolnum>
127 <!-- Keep this comment at the end of the file