Schema and beginnings of man page for zoom filter
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 21 Jun 2011 19:33:46 +0000 (21:33 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 21 Jun 2011 19:33:46 +0000 (21:33 +0200)
14 files changed:
doc/Makefile.am
doc/zoom.xml [new file with mode: 0644]
etc/Makefile.am
etc/config-torus.xml [deleted file]
xml/schema/Makefile.am
xml/schema/filter_virt_db.rnc
xml/schema/filter_virt_db.rng
xml/schema/filter_virt_db.xsd
xml/schema/filter_zoom.rnc [new file with mode: 0644]
xml/schema/filter_zoom.rng [new file with mode: 0644]
xml/schema/filter_zoom.xsd [new file with mode: 0644]
xml/schema/metaproxy.rnc
xml/schema/metaproxy.rng
xml/schema/metaproxy.xsd

index 31d6566..13d5b15 100644 (file)
@@ -27,6 +27,7 @@ XMLMAN = metaproxy.xml \
        template.xml \
        virt_db.xml \
        z3950_client.xml \
+       zoom.xml \
         zeerex_explain.xml
 
 MANFILES = metaproxy.1 \
@@ -47,8 +48,8 @@ MANFILES = metaproxy.1 \
        template.3mp \
        virt_db.3mp \
        z3950_client.3mp \
-       zeerex_explain.3mp
-
+       zeerex_explain.3mp \
+       zoom.3mp 
 
 HTMLFILES = index.html
 
diff --git a/doc/zoom.xml b/doc/zoom.xml
new file mode 100644 (file)
index 0000000..7802331
--- /dev/null
@@ -0,0 +1,101 @@
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+ <!ENTITY copyright SYSTEM "copyright.xml">
+ <!ENTITY % idcommon SYSTEM "common/common.ent">
+     %idcommon;
+]>
+<refentry id="ref-zoom">
+ <refentryinfo>
+  <productname>Metaproxy</productname>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
+ <refmeta>
+  <refentrytitle>zoom</refentrytitle>
+  <manvolnum>3mp</manvolnum>
+  <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+  <refname>zoom</refname>
+  <refpurpose>Metaproxy Package ZOOM Module</refpurpose>
+ </refnamediv>
+ <refsect1><title>DESCRIPTION</title>
+  <para>
+   This filter implements a generic client based on
+   <ulink url="&url.yaz.zoom;">ZOOM</ulink> of YAZ.
+   The client implements the protocols that ZOOM C does: Z39.50, SRU
+   (GET, POST, SOAP) and SOLR .
+  </para>
+ </refsect1>
+ <refsect1><title>SCHEMA</title>
+   <literallayout><xi:include
+                    xi:href="../xml/schema/filter_zoom.rnc"
+                    xi:parse="text"  
+                    xmlns:xi="http://www.w3.org/2001/XInclude" />
+   </literallayout>
+ </refsect1>
+ <refsect1><title>EXAMPLES</title>
+  <para>
+   The following configuration illustrates most of the
+   facilities:
+   <screen><![CDATA[
+    <filter type="zoom">
+      <torus
+         url="http://torus.indexdata.com/src/records/?query=udb%3D%db"
+         xsldir="."
+         />
+      <fieldmap cql="cql.anywhere"/>
+      <fieldmap cql="cql.serverChoice"/>
+      <fieldmap cql="dc.creator" ccl="au"/>
+      <fieldmap cql="dc.title" ccl="ti"/>
+      <fieldmap cql="dc.subject" ccl="su"/>
+      
+      <cclmap>
+        <qual name="ocn">
+          <attr type="u" value="12"/>
+          <attr type="s" value="107"/>
+        </qual>
+      </cclmap>
+    </filter>
+]]>
+   </screen>
+  </para>
+
+ </refsect1> 
+ <refsect1><title>SEE ALSO</title>
+  <para>
+   <citerefentry>
+    <refentrytitle>metaproxy</refentrytitle>
+    <manvolnum>1</manvolnum>
+   </citerefentry>
+  </para>
+  <para>
+   <citerefentry>
+    <refentrytitle>virt_db</refentrytitle>
+    <manvolnum>3mp</manvolnum>
+   </citerefentry>
+  </para>
+ </refsect1>
+ &copyright;
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-local-catalogs: nil
+sgml-namecase-general:t
+End:
+-->
index ec83b73..d3a76b1 100644 (file)
@@ -20,7 +20,7 @@ xmlconfig = $(srcdir)/config-bytarget.xml \
     $(srcdir)/config4.xml \
     $(srcdir)/config5.xml \
     $(srcdir)/config-cgi.xml \
-    $(srcdir)/config-torus.xml \
+    $(srcdir)/config-zoom.xml \
     $(srcdir)/retrieval-info.xml
 
 config = example.simple-auth example.target-auth pqf2pqf.xsl explain.xml
diff --git a/etc/config-torus.xml b/etc/config-torus.xml
deleted file mode 100644 (file)
index 75abcf1..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
-  <!-- Offers virtual databases .. No authentication -->
-  <start route="start"/>
-  <routes>
-    <route id="start">
-      <filter type="frontend_net">
-        <threads>10</threads>
-        <port>@:9000</port>
-       <timeout>30</timeout>
-      </filter>
-      <filter type="log">
-        <message>F</message>
-       <category session="true" apdu="true"/>
-      </filter>
-      <filter type="virt_db">
-        <torus
-         url="http://torus2dev.indexdata.com/torus2/searchable.mike/records/"/>
-      </filter>
-      <filter type="log">
-        <message>M</message>
-      </filter>
-      <filter type="multi">
-        <hideunavailable/>
-        <mergetype>roundrobin</mergetype>
-      </filter>
-      <filter type="log">
-        <message>B</message>
-       <category session="true"/>
-      </filter>
-      <filter type="z3950_client">
-        <timeout>30</timeout>
-      </filter>
-      <filter type="bounce"/>
-    </route>
-  </routes>
-</metaproxy>
-
index 3fbd9a5..93cfcdb 100644 (file)
@@ -22,6 +22,7 @@ filter_session_shared.xsd \
 filter_sru_z3950.xsd \
 filter_virt_db.xsd \
 filter_z3950_client.xsd \
+filter_zoom.xsd \
 local.xsd \
 metaproxy.xsd \
 retrievalinfo.xsd
@@ -44,6 +45,7 @@ filter_session_shared.rng \
 filter_sru_z3950.rng \
 filter_virt_db.rng \
 filter_z3950_client.rng \
+filter_zoom.rng \
 metaproxy.rng \
 retrievalinfo.rng
 
@@ -65,6 +67,7 @@ filter_session_shared.rnc \
 filter_sru_z3950.rnc \
 filter_virt_db.rnc \
 filter_z3950_client.rnc \
+filter_zoom.rnc \
 metaproxy.rnc \
 retrievalinfo.rnc
 
index 8e040f4..2e5568b 100644 (file)
@@ -7,9 +7,6 @@ filter_virt_db =
   attribute id { xsd:NCName }?,
   attribute name { xsd:NCName }?,
   element mp:pass-vhosts { xsd:boolean }?,
-  element mp:torus {
-    attribute url { xsd:string }
-  }?,
   element mp:virtual {
     attribute route { xsd:NCName }?,
     element mp:database { xsd:string },
index cbca66a..f6708ef 100644 (file)
         <data type="boolean"/>
       </element>
     </optional>
-    <optional>
-      <element name="mp:torus">
-        <attribute name="url">
-          <data type="string"/>
-        </attribute>
-      </element>
-    </optional>
     <zeroOrMore>
       <element name="mp:virtual">
         <optional>
index ee610a9..d46362c 100644 (file)
@@ -6,16 +6,10 @@
   <xs:group name="filter_virt_db">
     <xs:sequence>
       <xs:element minOccurs="0" ref="mp:pass-vhosts"/>
-      <xs:element minOccurs="0" ref="mp:torus"/>
       <xs:element minOccurs="0" maxOccurs="unbounded" ref="mp:virtual"/>
     </xs:sequence>
   </xs:group>
   <xs:element name="pass-vhosts" type="xs:boolean"/>
-  <xs:element name="torus">
-    <xs:complexType>
-      <xs:attribute name="url" use="required" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
   <xs:element name="virtual">
     <xs:complexType>
       <xs:sequence>
diff --git a/xml/schema/filter_zoom.rnc b/xml/schema/filter_zoom.rnc
new file mode 100644 (file)
index 0000000..8882a62
--- /dev/null
@@ -0,0 +1,27 @@
+# Metaproxy XML config file schema
+
+namespace mp = "http://indexdata.com/metaproxy"
+
+filter_zoom =
+  attribute type { "zoom" },
+  attribute id { xsd:NCName }?,
+  attribute name { xsd:NCName }?,
+  element mp:torus {
+    attribute url { xsd:string },
+    attribute xsldir { xsd:string }?
+  }?,
+  element mp:fieldmap {
+    attribute cql { xsd:string },
+    attribute ccl { xsd:string }?
+  }*,
+  element mp:cclmap {
+    element mp:qual {
+      attribute name { xsd:string },
+      element mp:attr {
+        attribute type { xsd:string },
+        attribute value { xsd:string }
+      }+
+    }*
+  }?
+
+
diff --git a/xml/schema/filter_zoom.rng b/xml/schema/filter_zoom.rng
new file mode 100644 (file)
index 0000000..a174e3d
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Metaproxy XML config file schema -->
+<grammar xmlns:mp="http://indexdata.com/metaproxy" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <define name="filter_zoom">
+    <attribute name="type">
+      <value>zoom</value>
+    </attribute>
+    <optional>
+      <attribute name="id">
+        <data type="NCName"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="name">
+        <data type="NCName"/>
+      </attribute>
+    </optional>
+    <optional>
+      <element name="mp:torus">
+        <attribute name="url">
+          <data type="string"/>
+        </attribute>
+        <optional>
+          <attribute name="xsldir">
+            <data type="string"/>
+          </attribute>
+        </optional>
+      </element>
+    </optional>
+    <zeroOrMore>
+      <element name="mp:fieldmap">
+        <attribute name="cql">
+          <data type="string"/>
+        </attribute>
+        <optional>
+          <attribute name="ccl">
+            <data type="string"/>
+          </attribute>
+        </optional>
+      </element>
+    </zeroOrMore>
+    <optional>
+      <element name="mp:cclmap">
+        <zeroOrMore>
+          <element name="mp:qual">
+            <attribute name="name">
+              <data type="string"/>
+            </attribute>
+            <oneOrMore>
+              <element name="mp:attr">
+                <attribute name="type">
+                  <data type="string"/>
+                </attribute>
+                <attribute name="value">
+                  <data type="string"/>
+                </attribute>
+              </element>
+            </oneOrMore>
+          </element>
+        </zeroOrMore>
+      </element>
+    </optional>
+  </define>
+</grammar>
diff --git a/xml/schema/filter_zoom.xsd b/xml/schema/filter_zoom.xsd
new file mode 100644 (file)
index 0000000..ef571b2
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Metaproxy XML config file schema -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://indexdata.com/metaproxy" xmlns:mp="http://indexdata.com/metaproxy" xmlns:y="http://indexdata.com/yaz">
+  <xs:import schemaLocation="local.xsd"/>
+  <xs:import namespace="http://indexdata.com/yaz" schemaLocation="retrievalinfo.xsd"/>
+  <xs:group name="filter_zoom">
+    <xs:sequence>
+      <xs:element minOccurs="0" ref="mp:torus"/>
+      <xs:element minOccurs="0" maxOccurs="unbounded" ref="mp:fieldmap"/>
+      <xs:element minOccurs="0" ref="mp:cclmap"/>
+    </xs:sequence>
+  </xs:group>
+  <xs:element name="torus">
+    <xs:complexType>
+      <xs:attribute name="url" use="required" type="xs:string"/>
+      <xs:attribute name="xsldir" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="fieldmap">
+    <xs:complexType>
+      <xs:attribute name="cql" use="required" type="xs:string"/>
+      <xs:attribute name="ccl" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="cclmap">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" maxOccurs="unbounded" ref="mp:qual"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="qual">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" ref="mp:attr"/>
+      </xs:sequence>
+      <xs:attribute name="name" use="required" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="attr">
+    <xs:complexType>
+      <xs:attribute name="type" use="required" type="xs:string"/>
+      <xs:attribute name="value" use="required" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:attributeGroup name="filter_zoom">
+    <xs:attribute name="type" use="required">
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="zoom"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="id" type="xs:NCName"/>
+    <xs:attribute name="name" type="xs:NCName"/>
+  </xs:attributeGroup>
+</xs:schema>
index 983b1cf..f128ed5 100644 (file)
@@ -39,6 +39,7 @@ include "filter_session_shared.rnc"
 include "filter_sru_z3950.rnc"
 include "filter_virt_db.rnc"
 include "filter_z3950_client.rnc"
+include "filter_zoom.rnc"
 
 any = (text | element * { attribute * { text }*, any })*
 
@@ -79,6 +80,7 @@ filter =
     | filter_sru_z3950
     | filter_virt_db
     | filter_z3950_client
+    | filter_zoom
   }
 
 filter_refid = attribute refid { xsd:NCName }
index 00b42a3..81e8915 100644 (file)
@@ -41,6 +41,7 @@
   <include href="filter_sru_z3950.rng"/>
   <include href="filter_virt_db.rng"/>
   <include href="filter_z3950_client.rng"/>
+  <include href="filter_zoom.rng"/>
   <define name="any">
     <zeroOrMore>
       <choice>
         <ref name="filter_sru_z3950"/>
         <ref name="filter_virt_db"/>
         <ref name="filter_z3950_client"/>
+        <ref name="filter_zoom"/>
       </choice>
     </element>
   </define>
index d7cd6fa..cedc1ca 100644 (file)
@@ -34,6 +34,7 @@
   <xs:include schemaLocation="filter_sru_z3950.xsd"/>
   <xs:include schemaLocation="filter_virt_db.xsd"/>
   <xs:include schemaLocation="filter_z3950_client.xsd"/>
+  <xs:include schemaLocation="filter_zoom.xsd"/>
   <xs:import schemaLocation="local.xsd"/>
   <xs:import namespace="http://indexdata.com/yaz" schemaLocation="retrievalinfo.xsd"/>
   <xs:complexType name="any" mixed="true">
         <xs:group ref="mp:filter_sru_z3950"/>
         <xs:group ref="mp:filter_virt_db"/>
         <xs:group ref="mp:filter_z3950_client"/>
+        <xs:group ref="mp:filter_zoom"/>
       </xs:choice>
       <xs:attribute name="type">
         <xs:simpleType>
             <xs:enumeration value="sru_z3950"/>
             <xs:enumeration value="virt_db"/>
             <xs:enumeration value="z3950_client"/>
+            <xs:enumeration value="zoom"/>
           </xs:restriction>
         </xs:simpleType>
       </xs:attribute>