More stuff such as record-transform, cql, sru etc
[metaproxy-moved-to-github.git] / etc / config-loc.xml
1 <?xml version="1.0"?>
2 <!--
3 1.   LCDB_UTF8_Port1        (e.g., z3950.loc.gov:7097/voyager)
4 2.   LCDB_UTF8_Port2        (e.g., z3950.loc.gov:7098/voyager)
5 3.   LCDB_MARC8_Port1       (e.g., z3950.loc.gov:7095/voyager)
6 4.   LCDB_MARC8_Port2       (e.g., z3950.loc.gov:7096/voyager)
7 5.   HLAS_UTF8              (e.g., z3950.loc.gov:7999/voyager)
8 6.   HLAS_MARC8             (e.g., z3950.loc.gov:7990/voyager)
9 7.   NLSBPH_UTF8            (e.g., z3950.loc.gov:7499/voyager)
10 8.   NLSBPH_MARC8           (e.g., z3950.loc.gov:7490/voyager)
11 9.   Name_Authority_File    (e.g., sun4.loc.gov:9018/NAF)
12 10.  Subject_Authority_File (e.g., sun4.loc.gov:9019/SAF)
13 11.  Server_in_the_UK       (e.g., blah.blah.uk:210/Aleph)
14 12.  Server_in_California   (e.g., blah.blah.edu:210/Unicorn)
15 13.  Performing_Arts_Encyclopedia (e.g., sun4.loc.gov:9013/PAE)
16 14.  Veterans_History_Project (e.g., sun4.loc.gov:9013/VETS)
17
18
19 MetaProxy could be configured to support accessing
20 the following databaseNames (virtual databases):
21
22    LCDB_UTF8               (1 and 2 above with load balancing)
23    LCDB_MARC8              (3 and 4 above with load balancing)
24    AllVoyager              (1, 2, 5, 7 above with merged results)
25    Name_Authority_File     (Just 9 above)
26    Subject_Authority_File  (Just 10 above)
27    Authority_Files         (9 and 10 above)
28    LC_and_Friends          (1, 2, 5, 7, 11, 12, 13, and 14 above)
29 -->
30 <metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
31   <start route="start"/>
32   <routes>  
33     <route id="start">
34        <filter type="frontend_net">
35         <port>@:7090</port>
36         <!-- maximum connections within a minute from same IP -->
37         <connect-max>10</connect-max> 
38       </filter>
39
40       <!-- converts SRU to Z39.50 and back -->
41       <filter type="sru_z3950"/>
42
43       <filter type="log">
44         <message>F</message>
45         <category init-options="true" apdu="false"/>
46       </filter>
47
48       <!-- converts CQL to RPN -->
49       <filter type="cql_rpn">
50         <conversion file="../etc/cql2pqf.txt"/>
51       </filter>
52
53       <!-- record transformations -->
54       <filter type="record_transform">
55         <retrievalinfo  xmlns="http://indexdata.com/yaz" version="1.0">
56           <retrieval syntax="xml" name="dc"
57                     identifier="info:srw/schema/1/dc-v1.1">
58           <backend syntax="usmarc" name="F">
59             <marc inputformat="marc" outputformat="marcxml"
60                   inputcharset="marc-8"/>
61             <xslt stylesheet="../xml/xslt/MARC21slim2DC.xsl"/>
62           </backend>
63         </retrieval>
64         <retrieval syntax="opac"/>
65         <retrieval syntax="xml" name="opac">
66           <backend syntax="opac" name="F">
67           <marc inputformat="marc" outputformat="marcxml"
68                 inputcharset="marc-8"/>
69           </backend>
70         </retrieval>
71         <retrieval syntax="usmarc">
72           <backend syntax="usmarc" name="F">
73           </backend>
74           </retrieval>
75         </retrievalinfo>
76       </filter>
77
78       <filter type="limit">
79         <limit bandwidth="50000" pdu="100" search="5" retrieve="50"/>
80       </filter>
81       <filter type="session_shared"> 
82         <resultset ttl="10" max="3"/>
83         <session ttl="30"/>
84       </filter>
85       <filter type="virt_db">
86         <virtual>
87           <database>LCDB_UTF8</database>
88           <target>z3950.loc.gov:7097/LCDB_UTF8</target>
89         </virtual>
90         <virtual>
91           <database>LCDB_MARC8</database>
92           <target>z3950.loc.gov:7095/LCDB_MARC8</target>
93         </virtual>
94         <virtual>
95           <database>HLAS_UTF8</database>
96           <target>z3950.loc.gov:7999/HLAS_MARC8</target>
97         </virtual>
98         <virtual>
99           <database>HLAS_MARC8</database>
100           <target>z3950.loc.gov:7990/HLAS_MARC8</target>
101         </virtual>
102         <virtual>
103           <database>NLSBPH_UTF8</database>
104           <target>z3950.loc.gov:7499/NLSBPH_UTF8</target>
105         </virtual>
106         <virtual>
107           <database>NLSBPH_MARC8</database>
108           <target>z3950.loc.gov:7490/NLSBPH_MARC8</target>
109         </virtual>
110         <virtual>
111           <database>Name_Authority_File</database>
112           <target>sun4.loc.gov:9018/NAF</target>
113         </virtual>
114         <virtual>
115           <database>Subject_Authority_File</database>
116           <target>sun4.loc.gov:9019/SAF</target>
117         </virtual>
118         <virtual>
119           <database>Server_in_the_UK</database>
120           <target>blah.blah.uk:210/Aleph</target>
121         </virtual>
122         <virtual>
123           <database>Server_in_Califorina</database>
124           <target>blah.blah.edu:210/Unicorn</target>
125         </virtual>
126         <virtual>
127           <database>Performing_Arts_Encylopedia</database>
128           <target>sun4.loc.gov:9013/PAE</target>
129         </virtual>
130         <virtual>
131           <database>Veterans_History_Project</database>
132           <target>sun4.loc.gov:9013/VETS</target>
133         </virtual>
134
135         <!-- merged results -->
136         <virtual>
137           <database>AllVoyager</database>
138           <target>z3950.loc.gov:7097/LCDB_UTF8</target>
139           <target>z3950.loc.gov:7999/HLAS_MARC8</target>
140         </virtual>
141
142       </filter>
143       <filter type="multi"/>
144       <filter type="log">
145         <message>C</message>
146         <category apdu="true"/>
147       </filter>
148       <filter type="virt_db">
149         <virtual>
150           <database>LCDB_UTF8</database>
151           <target>z3950.loc.gov:7097/voyager</target>
152           <target>z3950.loc.gov:7098/voyager</target>
153         </virtual>
154
155         <virtual>
156           <database>LCDB_MARC8</database>
157           <target>z3950.loc.gov:7095/voyager</target>
158           <target>z3950.loc.gov:7096/voyager</target>
159         </virtual>
160       </filter>
161       <filter type="load_balance"/>
162
163       <filter type="log">
164         <message>B</message>
165         <category apdu="true"/>
166       </filter>
167       <filter type="z3950_client"/>
168       <filter type="bounce"/>
169     </route>
170   </routes>
171 </metaproxy>
172