URL recipe in place
[metaproxy-moved-to-github.git] / etc / config-zoom.xml
1 <?xml version="1.0"?>
2 <metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
3   <start route="start"/>
4   <filters>
5     <filter id="frontend" type="frontend_net">
6       <threads>10</threads>
7       <port>@:9000</port>
8     </filter>
9     <filter id="backend" type="zoom">
10       <torus
11           url="http://newmk2.indexdata.com/torus2/searchable.ebsco/records/?query=udb%3D%db"
12             xsldir="."
13             element_transform="pz2"
14             element_raw="raw"
15             >   
16         <records>
17           <record>
18             <piggyback>1</piggyback>
19             <queryEncoding>UTF-8</queryEncoding>
20             <udb>z-local</udb>
21             <cclmap_term>1=1016 s=al</cclmap_term>
22             <cclmap_ti>1=4 s=pw t=l,r</cclmap_ti>
23             <requestSyntax>usmarc</requestSyntax>
24             <transform>tmarc.xsl</transform>
25             <urlRecipe>http://sever.com?title=${md-title[\s+/+/g]}</urlRecipe>
26             <zurl>localhost:9999/db01</zurl>
27           </record>
28           <record>
29             <piggyback>1</piggyback>
30             <queryEncoding>UTF-8</queryEncoding>
31             <udb>sru-local</udb>
32             <cclmap_term>s=al</cclmap_term>
33             <cclmap_ti>1=title s=pw t=l,r</cclmap_ti>
34             <sru>get</sru>
35             <transform>tmarc.xsl</transform>
36             <zurl>localhost:9999/db01</zurl>
37           </record>
38           <record>
39             <piggyback>1</piggyback>
40             <queryEncoding>UTF-8</queryEncoding>
41             <udb>cf-local</udb>
42             <cclmap_term>1=1016 s=al</cclmap_term>
43             <cclmap_ti>1=4 s=pw t=l,r</cclmap_ti>
44             <requestSyntax>xml</requestSyntax>
45             <transform>cf.xsl</transform>
46             <zurl>localhost:9999/db01</zurl>
47             <cfAuth>cfuser/cfpassword</cfAuth>
48             <cfProxy>localhost:3128</cfProxy>
49             <cfSubDb>mysub</cfSubDb>
50           </record>
51         </records>
52       </torus>
53       <fieldmap cql="cql.anywhere"/>
54       <fieldmap cql="cql.serverChoice"/>
55       <fieldmap cql="dc.creator" ccl="au"/>
56       <fieldmap cql="dc.title" ccl="ti"/>
57       <fieldmap cql="dc.subject" ccl="su"/>
58       <fieldmap cql="bath.isbn" ccl="isbn"/>
59       <fieldmap cql="bath.issn" ccl="issn"/>
60       <fieldmap cql="bash.isbn" ccl="isbn"/><!-- ### deprecated erroneous synonym -->
61       <fieldmap cql="bash.issn" ccl="issn"/><!-- ### deprecated erroneous synonym -->
62       <fieldmap cql="dc.date" ccl="date"/>
63       <!-- 
64            I got some of the following CCL qualifier names from
65            http://catalog.pburglib.org/polaris/Help/PWbasicsearch6.html
66            These are marked with the comment POLARIS.
67            The others, I just made up.
68            (Mike, Wed Jun 15 22:50:18 BST 2011)
69         -->
70       <fieldmap cql="rec.identifier" ccl="ocn"/><!-- POLARIS -->
71       <fieldmap cql="net.path" ccl="db"/>
72       <fieldmap cql="dc.language" ccl="la"/><!-- POLARIS -->
73       <fieldmap cql="dc.format" ccl="tom"/><!-- POLARIS -->
74       <fieldmap cql="id.fullText" ccl="fullText"/>
75       <fieldmap cql="id.peerReviewed" ccl="peerReviewed"/>
76       <fieldmap cql="dc.description" ccl="desc"/>
77       <fieldmap cql="dc.source" ccl="src"/>
78       <fieldmap cql="dc.publisher" ccl="pub"/><!-- POLARIS -->
79       <fieldmap cql="id.seriesTitle" ccl="series-ti"/>
80
81       <cclmap>
82         <qual name="ocn">
83           <attr type="1" value="12"/>
84         </qual>
85       </cclmap>
86     </filter>
87   </filters>
88   <routes>  
89     <route id="start">
90       <filter refid="frontend"/>
91       <filter type="log">
92         <message>F</message>
93       </filter>
94       <filter type="sru_z3950"/>
95       <filter type="record_transform">
96         <retrievalinfo   xmlns="http://indexdata.com/yaz" version="1.0">
97           <retrieval syntax="xml" name="usi">
98             <backend syntax="xml" name="pz2">
99               <xslt stylesheet="pz22usi.xsl"/>
100             </backend>
101           </retrieval>
102           <retrieval syntax="xml"/>
103           <retrieval syntax="json"/>
104           <retrieval syntax="usmarc"/>
105         </retrievalinfo>
106       </filter>
107       <filter type="session_shared"/>
108       <filter type="log">
109         <message>B</message>
110         <category apdu="true"/>
111       </filter>
112       <filter refid="backend"/>
113       <filter type="bounce"/>
114     </route>
115   </routes>
116 </metaproxy>
117