<author>
<firstname>Heikki</firstname><surname>Levanto</surname>
</author>
+ <author>
+ <firstname>Jakub</firstname><surname>Skoczen</surname>
+ </author>
</authorgroup>
<releaseinfo>&version;</releaseinfo>
<copyright>
<chapter id="installation">
<title>Installation</title>
<para>
- MP-SPARQL is available as packages for CentOS/RHEL 5+6 and most
+ MP-SPARQL is available as packages for CentOS/RHEL and most
recent Ubuntu/Debian versions. For other systems, the module must be build
from source.
</para>
url="http://ftp.indexdata.dk/pub/mp-sparql/redhat/centos/6/README">CentOS 6</ulink>
,
<ulink
+ url="http://ftp.indexdata.dk/pub/mp-sparql/redhat/centos/7/README">CentOS 7</ulink>
+ ,
+ <ulink
url="http://ftp.indexdata.dk/pub/mp-sparql/ubuntu/README">Ubuntu</ulink>
and
<ulink
Install that package and you are ready to use filter "sparql" in your
setup.
</para>
+ <para>
+ mp-sparql depends on a number of packages created by Index Data and
+ system-provided ones, such as Libxml2. For external software Zorba, no
+ system package exist so Index Data has packaged that separately. This
+ package is called <literal>idzorba</literal>. All these dependences should
+ be automatically installed when the Index Data software repository is
+ set up.
+ </para>
</sect1>
<sect1 id="installation.source">
<title>Installing from source</title>
make
sudo make install
</screen>
- But consult the Metaproxy documentation for requirements and
- options.
+ Refer to the Metaproxy documentation for requirements and options.
</para>
<para>
We are now ready to build the MP-SPARQL module with:
</para>
</note>
</sect1>
+ <sect1 id="configuration">
+ <title>Configuration</title>
+ <para>
+ If you have installed mp-sparql as a package or have executed
+ <literal>make install</literal> from source, sample configuration
+ can be found in <filename>/usr/share/mp-sparql/bibframe</filename> or
+ <filename>/usr/local/share/mp-sparql/bibframe</filename>. In the
+ the following /usr/share prefix assumed. Adjust accordingly.
+ The directory contains these files:
+ <variablelist>
+ <varlistentry>
+ <term><filename>triplestore.xml</filename></term>
+ <listitem>
+ <para>
+ A mature PQF to SPARQL configuration illustrating a lot of the
+ configuration facilities that are described in the manual
+ page of <xref linkend="sparql"/>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>config-sparql.xml</filename></term>
+ <listitem>
+ <para>
+ A full metaproxy configuration file that includes
+ <filename>triplestore.xml</filename> cofiguration for the
+ mp-sparql filter, enables SRU and CQL to PQF conversion.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>filter-sparql.xml</filename></term>
+ <listitem>
+ <para>
+ A partial metaproxy configuration suitable to be enabled in
+ <filename>/etc/metaproxy/filters-enabled</filename>.
+ This includes <filename>triplestore.xml</filename> as well.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ If you want to use the package layout and modular configuration we
+ suggest you use filter-sparql.xml and perform something along the lines of:
+ <screen>
+ cp /usr/share/mp-sparql/bibframe/filter-sparql.xml /etc/metaproxy/filters-available
+ cp /usr/share/mp-sparql/bibframe/triplestore.xml /etc/metaproxy
+ vi /etc/metaproxy/triplestore.xml
+ ln -s ../filters-available/filter-sparql.xml /etc/metaproxy/filters-enabled
+ service metaproxy restart
+ </screen>
+ A copy of triplestore.xml is made. Adjust the
+ <literal><defaults uri=.. </literal> value to the URI of your
+ triplestore.
+ </para>
+ <para>
+ If you want to create your own top-level configuration, you can copy
+ <filename>config-sparql.xml</filename> to any location you like and
+ run metaproxy with that. Something like this:
+ <screen>
+ mkdir /etc/myconfig
+ cp /usr/share/mp-sparql/bibframe/* /etc/myconfig
+ sudo vi /etc/myconfig/triplestore.xml
+ metaproxy -c /etc/myconfig/config-sparql.xml
+ </screen>
+ Again, a copy of triplestore.xml is made. Adjust the
+ <literal><defaults uri=.. </literal> value to the URI of your
+ triplestore.
+ </para>
+ <note>
+ <para>
+ Do not edit files in <filename>/usr/share/mp-sparql/bibframe</filename>.
+ They are only samples and will be overwritten by a package update.
+ Instead copy the files away from there if you need to modify them.
+ </para>
+ </note>
+ </sect1>
+ <sect1 id="using">
+ <title>Using the service</title>
+ <para>
+ Either way, unless you have adjusted the metaproxy configuration,
+ Metaproxy can be reached on port 9000. Example using yaz-client and
+ PQF/Type-1:
+ <screen><![CDATA[
+adam@tuna:~$ yaz-client localhost:9000/work
+Connecting...OK.
+Sent initrequest.
+Connection accepted by v3 target.
+ID : 81
+Name : sparql
+Version: 1.9.0/5.14.6 87faebe8ef5cab8f6df86f387e8b919b7b9897a8
+Options: search present namedResultSets
+Elapsed: 0.000961
+Z> f @attr 1=bf.anytitle water
+Sent searchRequest.
+Received SearchResponse.
+Search was a success.
+Number of hits: 1, setno 1
+records returned: 0
+Elapsed: 0.279441
+Z> s
+Sent presentRequest (1+1).
+Records: 1
+[work]Record type: XML
+<?xml version="1.0" encoding="utf-8" ?>
+<rdf:RDF
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:ns2="http://bibframe.org/vocab/" >
+ <rdf:Description rdf:about="http://bibframe.org/resources/sample-lc-2/15513351">
+ ...
+ </rdf:Description>
+</rdf:RDF>nextResultSetPosition = 0
+Elapsed: 0.256142
+]]></screen>
+ </para>
+ <para>
+ Example using SRU:
+ <ulink url="http://localhost:9000/work?query=bf.anytitle%3Dwater&maximumRecords=1"/>
+ </para>
+ </sect1>
</chapter>
<reference id="reference">
<title>Reference</title>
along with Metaproxy; see the file LICENSE. If not, write to the
Free Software Foundation,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- </para>
+ </para>
</appendix>