From: Adam Dickmeiss Date: Fri, 9 Jan 2015 13:23:27 +0000 (+0100) Subject: Add man page and pdate RPM to install it MPSPARQL-3 X-Git-Tag: v0.1 X-Git-Url: http://git.indexdata.com/?p=mp-sparql-moved-to-github.git;a=commitdiff_plain;h=fd951f5b39fc73d6f4d97b93965ec1f3b6d9407b Add man page and pdate RPM to install it MPSPARQL-3 --- diff --git a/Makefile b/Makefile index a966b17..a3fb177 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SUBDIRS = src +SUBDIRS = src doc .PHONY: $(SUBDIRS) all all: $(SUBDIRS) diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..a044d6d --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,39 @@ + +.PHONY: check all +.SUFFIXES: .3mp .xml .1 + +prefix = /usr + +XSLTPROC_COMPILE = xsltproc --xinclude -path "." +HTML_COMPILE = $(XSLTPROC_COMPILE) id.htmlhelp.xsl +MAN_COMPILE = $(XSLTPROC_COMPILE) id.man.xsl +REFFILES = sparql.xml +MANFILES=sparql.3mp + +XMLFILES=book.xml manref.xml + +all: $(MANFILES) + +index.html: $(XMLFILES) + $(HTML_COMPILE) book.xml + +manref.xml: $(REFFILES) + rm -f manref.xml + for i in $(REFFILES); do \ + xsltproc stripref.xsl $$i | sed 1d >>manref.xml; \ + done + +.xml.3mp: + $(MAN_COMPILE) $< + +clean: + rm -f *.html *.pdf manref.xml *.hhp *.hhc $(MANFILES) + +distclean: clean + +check: all + +install: + mkdir -p $(DESTDIR)$(prefix)/share/man/man3 + cp *.3mp $(DESTDIR)$(prefix)/share/man/man3/ + diff --git a/doc/filter_sparql.rnc b/doc/filter_sparql.rnc new file mode 100644 index 0000000..263214d --- /dev/null +++ b/doc/filter_sparql.rnc @@ -0,0 +1,20 @@ +# Metaproxy XML config file schema + +namespace mp = "http://indexdata.com/metaproxy" + +filter_sparql = + attribute type { "xquery" }, + attribute id { xsd:NCName }?, + attribute name { xsd:NCName }?, + element mp:db { + attribute path { xsd:string }, + attribute uri { xsd:string }, + element mp:prefix { xsd:string }+, + element mp:field { xsd:string }*, + element mp:criteria { xsd:string }*, + element mp:index { + attribute type { xsd:string }, + xsd:string + }* + }+ + diff --git a/doc/id.htmlhelp.xsl b/doc/id.htmlhelp.xsl new file mode 100644 index 0000000..c31b7ee --- /dev/null +++ b/doc/id.htmlhelp.xsl @@ -0,0 +1,18 @@ + + + + + + + +0 +1 +1 +3 +3 +1 + + + + diff --git a/doc/id.man.xsl b/doc/id.man.xsl new file mode 100644 index 0000000..6cea265 --- /dev/null +++ b/doc/id.man.xsl @@ -0,0 +1,7 @@ + + + + + + diff --git a/doc/sparql.xml b/doc/sparql.xml new file mode 100644 index 0000000..838dce1 --- /dev/null +++ b/doc/sparql.xml @@ -0,0 +1,127 @@ + + + + Metaproxy SPARQL module + Index Data + + + + sparql + 3mp + Metaproxy Module + + + + sparql + + Metaproxy Module for accessing a triplestore + + + + DESCRIPTION + + This module translates Z39.50 operations init, search, present to + HTTP requests that accesses a remote triplestore via HTTP + + + Configuration consists of one or more db elements. Each db element + describes how to access a specific database. The db element takes + attributes name of Z39.50 database (path) and + HTTP access point of triplestore (uri). Each + db element takes these elements: + Configurable values: + + <prefix/> + + + Section that maps prefixes and namespaces for RDF vocabularies. + The format is prefix followed by colon, followed by value. + + + + <field/> + + + Optional section for controlling what data rows are selected in the + SPARQL statement and how they are mapped to the output document, all + variables (\*) are selected when none is provided. + + + + <criteria/> + + + section that allows to map static graph patterns for binding + variables, narrowing types, etc, or any other WHERE clause criteria + static to the Z39.50/SRU database. The final query conversion logic + should be able to deduce which optional criteria should be included + in the generated SPARQL by analyzing variables required in the query + matching and display fields. + + + + <index type="attribute"/> + + + Section used to declare RPN use attribute strings (indexes) and map + them to BIBFRAME graph patterns. + Items in this section are expanded during RPN query processing and + placeholders (%s, %d) are substituted with query terms. + To map a given CQL index (e.g the default keyword index) into + multiple entity properties, SPARQL constructs like + `OPTIONAL` or `UNION` could be used. + + + + + + + + SCHEMA + + + + + EXAMPLES + + Configuration for database "Default" that allows searching works. Only + the field (use attribute) "bf.wtitle" is supported. + + + rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns + bf: http://bibframe.org/vocab/ + ?work ?wtitle + ?work a bf:Work + ?work bf:workTitle ?wt + ?wt bf:titleValue ?wtitle + ?wt bf:titleValue %v FILTER(contains(%v, %s)) + + +]]> + + + + + SEE ALSO + + + metaproxy + 1 + + + + + + + diff --git a/doc/stripref.xsl b/doc/stripref.xsl new file mode 100644 index 0000000..b39f24a --- /dev/null +++ b/doc/stripref.xsl @@ -0,0 +1,14 @@ + + + + + + + Generated by stripref.xsl . Do not edit + + + + + diff --git a/mp-sparql.spec b/mp-sparql.spec index d368db0..4d2c5d8 100644 --- a/mp-sparql.spec +++ b/mp-sparql.spec @@ -56,4 +56,4 @@ rm -fr ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %{_libdir}/mp-sparql/* -# %{_mandir}/man3/sparql.* +%{_mandir}/man3/sparql.*