9a877b692eb3e6880614b1894b1d5e390a60b26b
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                         <field name="debit_card_payment" oils_persist:virtual="true" />
98                 </fields>
99                 <links>
100                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
101                 </links>
102         </class>
103
104         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
105                 <fields>
106                         <field name="id" oils_persist:virtual="true" />
107                         <field name="children" oils_persist:virtual="true" />
108                         <field name="owner_doc" oils_persist:virtual="true" />
109                         <field name="intra_doc_id" oils_persist:virtual="true" />
110                         <field name="parent_node" oils_persist:virtual="true" />
111                         <field name="node_type" oils_persist:virtual="true" />
112                         <field name="namespace_uri" oils_persist:virtual="true" />
113                         <field name="name" oils_persist:virtual="true" />
114                         <field name="value" oils_persist:virtual="true" />
115                 </fields>
116         </class>
117
118         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
119                 <fields>
120                         <field name="title" oils_persist:virtual="true" />
121                         <field name="author" oils_persist:virtual="true" />
122                         <field name="doc_id" oils_persist:virtual="true" />
123                         <field name="doc_type" oils_persist:virtual="true" />
124                         <field name="pubdate" oils_persist:virtual="true" />
125                         <field name="isbn" oils_persist:virtual="true" />
126                         <field name="publisher" oils_persist:virtual="true" />
127                         <field name="tcn" oils_persist:virtual="true" />
128                         <field name="subject" oils_persist:virtual="true" />
129                         <field name="types_of_resource" oils_persist:virtual="true" />
130                         <field name="call_numbers" oils_persist:virtual="true" />
131                         <field name="edition" oils_persist:virtual="true" />
132                         <field name="online_loc" oils_persist:virtual="true" />
133                         <field name="synopsis" oils_persist:virtual="true" />
134                         <field name="physical_description" oils_persist:virtual="true" />
135                         <field name="toc" oils_persist:virtual="true" />
136                         <field name="copy_count" oils_persist:virtual="true" />
137                         <field name="series" oils_persist:virtual="true" />
138                         <field name="serials" oils_persist:virtual="true" />
139                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
140                 </fields>
141         </class>
142
143         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
144                 <fields>
145                         <field name="err_msg" oils_persist:virtual="true" />
146                         <field name="type" oils_persist:virtual="true" />
147                 </fields>
148         </class>
149
150         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
151                 <fields>
152                         <field name="err_msg" oils_persist:virtual="true" />
153                         <field name="type" oils_persist:virtual="true" />
154                 </fields>
155         </class>
156
157         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
158                 <fields oils_persist:primary="matchpoint">
159                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
160                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
161                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
162                 </fields>
163                 <links>
164                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
165                 </links>
166         </class>
167
168         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
169         <!-- when the time is right, turn me into a view.  -->
170                 <fields>
171             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
172             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
174             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
176             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
177             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
179             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
180             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
181                 </fields>
182         </class>
183
184         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
185                 <fields>
186                         <field name="public_name" oils_persist:virtual="true" />
187                         <field name="target_url" oils_persist:virtual="true" />
188                         <field name="target_coverage" oils_persist:virtual="true" />
189                         <field name="target_embargo" oils_persist:virtual="true" />
190                 </fields>
191         </class>
192
193         <!-- Actually in the DB -->
194         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
195                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
196                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
197                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
199                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
200                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
201                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
202                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
203                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
204                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
205                 </fields>
206                 <links>
207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
208                 </links>
209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
210                         <actions>
211                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
212                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
213                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
214                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
215                         </actions>
216                 </permacrud>
217         </class>
218
219         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
220                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
221                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
222                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
223                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
224                 </fields>
225                 <links>
226                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
227                 </links>
228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
229                         <actions>
230                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </create>
233                                 <retrieve/>
234                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </update>
237                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
238                     <context link="grp" field="owner"/>
239                 </delete>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <class  id="rrbs" 
245             controller="open-ils.cstore open-ils.pcrud" 
246             oils_obj:fieldmapper="rating::record_badge_score" 
247             oils_persist:tablename="rating.record_badge_score" 
248             reporter:label="Statistical Popularity Badge">
249                 <fields oils_persist:primary="id" 
250                 oils_persist:sequence="rating.record_badge_score_id_seq">
251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
252                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
253                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
254                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
255                 </fields>
256         <links>
257             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
258             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
259         </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <retrieve/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267         <class  id="rp" 
268             controller="open-ils.cstore open-ils.pcrud" 
269             oils_obj:fieldmapper="rating::popularity_parameter" 
270             oils_persist:tablename="rating.popularity_parameter" 
271             reporter:label="Statistical Popularity Parameter">
272                 <fields oils_persist:primary="id" 
273                 oils_persist:sequence="rating.popularity_parameter_id_seq">
274                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
275                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
276                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
277                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
278                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
279                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
280                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
281                 </fields>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
285                                 <retrieve/>
286                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
287                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <class  id="rb" 
293             controller="open-ils.cstore open-ils.pcrud" 
294             oils_obj:fieldmapper="rating::badge" 
295             oils_persist:tablename="rating.badge" 
296             reporter:label="Statistical Popularity Badge">
297                 <fields oils_persist:primary="id" 
298                 oils_persist:sequence="rating.badge_id_seq">
299                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
303                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
304                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
307                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
308                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
309                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
310                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
311                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
312                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
313                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
314                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
315                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
316                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
317                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
318                 </fields>
319                 <links>
320                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
321                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
322                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
323                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
324                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
329                                 <retrieve/>
330                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
331                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <class  id="vibtg" 
337             controller="open-ils.cstore open-ils.pcrud" 
338             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
339             oils_persist:tablename="vandelay.import_bib_trash_group" 
340             reporter:label="Import/Overlay Field Groups for Removal">
341                 <fields oils_persist:primary="id" 
342                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
346                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
347                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
352                 </links>
353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
354                         <actions>
355                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                                 <retrieve/>
357                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
358                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                         </actions>
360                 </permacrud>
361         </class>
362
363
364         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
366                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
368                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
369                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
370                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
371                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
372                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
373                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
374                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
375                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
376                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
377                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
378                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
379                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
380                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
382                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
383                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
384                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
385                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
386                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
387                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
388                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
389                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
390                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
391                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
392                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
393                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
394                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
395                 </fields>
396                 <links>
397                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
398                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
399                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <create permission="CREATE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </create>
407                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </retrieve>
410                                 <update permission="UPDATE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </update>
413                                 <delete permission="DELETE_IMPORT_ITEM">
414                     <context link="definition" field="owner"/>
415                                 </delete>
416                         </actions>
417                 </permacrud>
418         </class>
419
420         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
421                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
423                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
424                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
425                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
426                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
427                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
428                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
429                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
430                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
431                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
432                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
433                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
434                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
435                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
436                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
437                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
438                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
439                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
440                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
441                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
442                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
443                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
444                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
445                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
446                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
447                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
448                 </fields>
449                 <links>
450                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
451                 </links>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
456                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
457                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
464                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
465                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
467                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
468                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
469                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
470                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
471                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
472                 </fields>
473                 <links>
474                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
475                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
476                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
477                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
478                 </links>
479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
480                         <actions>
481                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
485                         </actions>
486                 </permacrud>
487         </class>
488
489         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
490                 <fields oils_persist:primary="code">
491                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
493                 </fields>
494                 <links>
495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
496                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
497                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
498                 </links>
499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
500                         <actions>
501                                 <retrieve/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
508                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
509                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
510                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
512                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
513                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
514                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
515                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
516                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
517                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
518                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
522                 </fields>
523                 <links>
524                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
525                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
526                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
527                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
528             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
529             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
530             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
531                 </links>
532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
533                         <actions>
534                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
538                         </actions>
539                 </permacrud>
540         </class>
541
542         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
543                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
545                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
546                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
547                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
548                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
549                 </fields>
550                 <links/>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
554                 <retrieve/>
555                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
556                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
563                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
565                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
566                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
567                 </fields>
568                 <links>
569                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
570                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
571                 </links>
572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573                         <actions>
574                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
578                         </actions>
579                 </permacrud>
580         </class>
581
582         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
583                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
584                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
585                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
586                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
587                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
588                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
589                 </fields>
590                 <links>
591                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
592                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
593                 </links>
594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
595                         <actions>
596                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
600                         </actions>
601                 </permacrud>
602         </class>
603
604         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
605                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
606                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
607                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
609                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
610                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
611                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
612                 </fields>
613                 <links>
614                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
615                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
616                 </links>
617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618                         <actions>
619                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                         </actions>
624                 </permacrud>
625         </class>
626
627         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
629                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
630                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
631                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
633                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
634                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
635                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
636                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
637                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
638                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
639                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
641                 </fields>
642                 <links>
643                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
644                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
645                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
646             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
647             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
648                 </links>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
660                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
662                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
665                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
666                 </fields>
667                 <links/>
668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669                         <actions>
670                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                 <retrieve/>
672                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
673                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                         </actions>
675                 </permacrud>
676         </class>
677
678         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
679                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
680                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
681                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
682                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
683                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
684                 </fields>
685                 <links>
686                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
687                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
688                 </links>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
700                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
701                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
703                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
704                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
705                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
706                 </fields>
707                 <links>
708                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
709                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
710                 </links>
711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
712                         <actions>
713                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                         </actions>
718                 </permacrud>
719         </class>
720
721         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
722                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
723                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
724                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
726                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
727                 </fields>
728                 <links>
729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
730                 </links>
731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
732                         <actions>
733                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                         </actions>
738                 </permacrud>
739         </class>
740
741         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
742                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
743                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
744                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
745                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
746                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
747                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
748                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
749                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
750             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
751                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
752                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
753                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
754                 </fields>
755                 <links>
756                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
757                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
758                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
759                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
760                 </links>
761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
762                         <actions>
763                                 <create permission="ADMIN_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </create>
766                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </retrieve>
769                                 <update permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </update>
772                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
773                     <context link="match_set" field="owner"/>
774                                 </delete>
775                         </actions>
776                 </permacrud>
777         </class>
778
779         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
780                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
781                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
782                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
783                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
784                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
785                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
786                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
787                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
788                 </fields>
789                 <links>
790                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
791                 </links>
792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
793                         <actions>
794                                 <create permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </create>
797                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </retrieve>
800                                 <update permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </update>
803                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
804                     <context link="match_set" field="owner"/>
805                                 </delete>
806                         </actions>
807                 </permacrud>
808         </class>
809
810         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
811                 oils_obj:fieldmapper="vandelay::session_tracker" 
812                 oils_persist:tablename="vandelay.session_tracker" 
813                 reporter:label="Vandelay Session Tracker">
814                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
815                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
818                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
819                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
820                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
821                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
822                                          queue or an auth queue and there's no IDL class for vandelay.queue .
823                                          parent table.
824                         -->
825                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
826                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
827                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="State" name="state" reporter:datatype="text"/>
829                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
830                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
831                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
832                 </fields>
833                 <links>
834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
835                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
836                 </links>
837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
838                         <actions>
839                                 <!-- created by the API -->
840                                 <retrieve global_required="true"
841                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
842                                 <update global_required="true"
843                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
844                                         <context link="workstation" field="owning_lib"/>
845                                 </update>
846                                 <delete 
847                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
848                                         <context link="workstation" field="owning_lib"/>
849                                 </delete>
850                         </actions>
851                 </permacrud>
852         </class>
853
854         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
856                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
857                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
858                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
860                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
861                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
862                 </fields>
863                 <links>
864                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
866                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
868                 </links>
869         </class>
870
871     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
872         <fields oils_persist:primary="name">
873             <field reporter:label="Name" name="name" reporter:datatype="text"/>
874             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
875             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
876             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
877         </fields>
878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
879             <actions>
880                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884             </actions>
885         </permacrud>
886     </class>
887
888     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
889         <fields oils_persist:primary="id">
890             <field reporter:label="ID" name="id" reporter:datatype="id"/>
891             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
892             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
894             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
895         </fields>
896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897             <actions>
898                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899                 <retrieve/>
900                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
901                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902             </actions>
903         </permacrud>
904     </class>
905
906         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
907                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
909                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
910                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
911                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
912                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
913                 </fields>
914                 <links>
915                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
916                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921                 <retrieve/>
922                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
923                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924             </actions>
925         </permacrud>
926         </class>
927
928         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
929                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
930                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
931                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
933         </fields>
934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935             <actions>
936                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
937                 <retrieve/>
938                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
939                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
940             </actions>
941         </permacrud>
942         </class>
943
944         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
945                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
946                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
947                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
948                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
949                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
953                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
954                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
955                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
956                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
957         </fields>
958                 <links>
959                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
961         </links>
962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
963             <actions>
964                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
965                 <retrieve/>
966                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
967                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
968             </actions>
969         </permacrud>
970         </class>
971
972         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
973                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
974                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
975                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
976                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
980                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
981                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
982                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
983                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
984         </fields>
985                 <links>
986                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
988         </links>
989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
990             <actions>
991                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
992                 <retrieve/>
993                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
994                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
995             </actions>
996         </permacrud>
997         </class>
998
999         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
1000                 <fields oils_persist:primary="name">
1001                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1002                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1004                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1005                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1006                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1007                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1008                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1009                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1010                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1011                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1012                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1013                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1014                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1015                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1016                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1017                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1018                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1019                 </fields>
1020                 <links>
1021                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1022                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_SVF" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_SVF" global_required="true"/>
1029                 <delete permission="ADMIN_SVF" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1037                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1038                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1039             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1040                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1041                 </fields>
1042                 <links/>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046                 <retrieve/>
1047                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1048                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1054                 <fields oils_persist:primary="coded_value">
1055                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1056                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1057                 </fields>
1058                 <links>
1059                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1060                 </links>
1061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1062             <actions>
1063                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1064                 <retrieve/>
1065                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1066                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1067             </actions>
1068         </permacrud>
1069         </class>
1070
1071         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1073                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1074                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1075                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1076                 </fields>
1077                 <links>
1078                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1079                 </links>
1080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1081             <actions>
1082                 <retrieve/>
1083             </actions>
1084         </permacrud>
1085         </class>
1086
1087
1088         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1090                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1091                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1092                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1093                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1094                 </fields>
1095                 <links>
1096                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1097                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106
1107         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1108                 <fields oils_persist:primary="source">
1109                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1110                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1111                 </fields>
1112                 <links>
1113                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1114                 </links>
1115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116             <actions>
1117                 <retrieve/>
1118             </actions>
1119         </permacrud>
1120         </class>
1121
1122         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1123                 <fields>
1124                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1125                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1126                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1127                 </fields>
1128                 <links>
1129                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1130                 </links>
1131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1132             <actions>
1133                 <retrieve/>
1134             </actions>
1135         </permacrud>
1136         </class>
1137
1138         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1139                 <fields oils_persist:primary="id">
1140                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1141                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1142                 </fields>
1143                 <links>
1144                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <retrieve/>
1149             </actions>
1150         </permacrud>
1151         </class>
1152
1153         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1154                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1156                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1157                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1158                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1159                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1160                 </fields>
1161                 <links>
1162                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1163                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1164                 </links>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1170                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1177                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1178                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1179                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1180                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1181                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1182                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1183                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1185             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1186             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1187                 </fields>
1188                 <links>
1189                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1190                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1191                 </links>
1192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1193             <actions>
1194                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1195                 <retrieve/>
1196                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1197                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1198             </actions>
1199         </permacrud>
1200         </class>
1201
1202         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1203                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1204                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1205                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1206                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1207                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1208                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1209                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1210                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1211                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1212                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1213                 </fields>
1214                 <links>
1215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1216                 </links>
1217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218             <actions>
1219                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223             </actions>
1224         </permacrud>
1225         </class>
1226
1227     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1228         <fields oils_persist:primary="name">
1229             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1230             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1231             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1232             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1233             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1234             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1235             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1236             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1237             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1238             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1239         </fields>
1240         <links>
1241             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1242             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1243         </links>
1244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1245             <actions>
1246                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247                 <retrieve/>
1248                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1249                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250             </actions>
1251         </permacrud>
1252     </class>
1253
1254     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1255         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1256             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1257             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1258             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1259             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1260             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1261             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1262             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1263         </fields>
1264         <links>
1265             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1266         </links>
1267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1268             <actions>
1269                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270                 <retrieve/>
1271                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1272                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273             </actions>
1274         </permacrud>
1275     </class>
1276
1277     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1278                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1279                         oils_persist:tablename="config.z3950_index_field_map" 
1280                         reporter:label="Z39.50 Index Field Map">
1281         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1282             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1283             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1284             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1285             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1286             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1288         </fields>
1289         <links>
1290             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1291             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1292             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1293         </links>
1294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1295             <actions>
1296                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297                 <retrieve/>
1298                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1299                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300             </actions>
1301         </permacrud>
1302     </class>
1303
1304
1305         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1306                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1307                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1308                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1309                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1310                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1311                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1312                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                 </fields>
1314                 <links>
1315             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1316             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1317                 </links>
1318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1319                         <actions>
1320                                 <retrieve/>
1321                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1322                         </actions>
1323                 </permacrud>
1324         </class>
1325
1326         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1327                 <fields oils_persist:primary="key">
1328                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1329                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1330                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1331                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1332                 </fields>
1333                 <links/>
1334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335                         <actions>
1336                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1337                                 <retrieve/>
1338                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1339                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1340                         </actions>
1341                 </permacrud>
1342         </class>
1343
1344         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1345                 <fields oils_persist:primary="module">
1346                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1348                 </fields>
1349                 <links/>
1350         </class>
1351
1352         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1353                 <fields oils_persist:primary="module">
1354                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1355                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359                         <actions>
1360                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1361                                 <retrieve/>
1362                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1363                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1364                         </actions>
1365                 </permacrud>
1366         </class>
1367
1368         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1369                 <fields oils_persist:primary="module">
1370                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375                         <actions>
1376                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1377                                 <retrieve/>
1378                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1379                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1385                 <fields oils_persist:primary="module">
1386                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1387                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391                         <actions>
1392                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1393                                 <retrieve/>
1394                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1395                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1396                         </actions>
1397                 </permacrud>
1398         </class>
1399
1400         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1401                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1402                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1403                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1404                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1405                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1406                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1407                 </fields>
1408                 <links>
1409                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1410                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1411                 </links>
1412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1413                         <actions>
1414                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </create>
1417                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </retrieve>
1420                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </update>
1423                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1424                     <context link="event_def" field="owner"/>
1425                 </delete>
1426                         </actions>
1427                 </permacrud>
1428         </class>
1429
1430         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1431                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1432                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1433                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1434                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1435                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1436                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1437                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1438                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1439                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1440                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1441                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1442                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1443                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1444                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1445                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1446                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1447                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1448                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1449                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1450                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1451                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1452                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1453                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1454                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1455                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1456                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1457                 </fields>
1458                 <links>
1459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1460                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1461                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1462                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1463                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1464                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1465                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1466                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1467                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1468                 </links>
1469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1470                         <actions>
1471                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1473                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1474                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1475                         </actions>
1476                 </permacrud>
1477         </class>
1478
1479         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1481                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1483                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1484                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1487                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1488                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1489                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1490                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1491                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1492                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1493                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1494                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1495                 </fields>
1496                 <links>
1497                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1498                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1499                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1500                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1501                 </links>
1502         </class>
1503
1504         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1505                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1506                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1507                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1508                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1509                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1510                 </fields>
1511                 <links>
1512                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1513                 </links>
1514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1515                         <actions>
1516                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1517                     <context link="event_def" field="owner"/>
1518                 </create>
1519                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1520                     <context link="event_def" field="owner"/>
1521                 </retrieve>
1522                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1523                     <context link="event_def" field="owner"/>
1524                 </update>
1525                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1526                     <context link="event_def" field="owner"/>
1527                 </delete>
1528                         </actions>
1529                 </permacrud>
1530         </class>
1531
1532         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1533                 <oils_persist:source_definition><![CDATA[
1534                 SELECT  atevdef.hook,
1535                         atevdef.name,
1536                         atevdef.reactor,
1537                         atev.id,
1538                         atev.event_def,
1539                         atev.add_time,
1540                         atev.run_time,
1541                         atev.start_time,
1542                         atev.update_time,
1543                         atev.complete_time,
1544                         atev.update_process,
1545                         atev.state,
1546                         atev.user_data,
1547                         atev.template_output,
1548                         atev.error_output,
1549                         atev.async_output,
1550                         targ_circ.id AS target_circ,
1551                         targ_ahr.id AS target_hold,
1552                         COALESCE(
1553                                 targ_circ.circ_lib,
1554                                 targ_ahr.pickup_lib
1555                         ) AS perm_lib
1556                 FROM action_trigger.event atev
1557                 JOIN action_trigger.event_definition atevdef ON
1558                         (atevdef.id = atev.event_def)
1559                 JOIN action_trigger.hook ath ON
1560                         (ath.key = atevdef.hook)
1561                 LEFT JOIN action.circulation targ_circ ON
1562                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1563                 LEFT JOIN action.hold_request targ_ahr ON
1564                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1565                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1566                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1567                                 'circ.staff.max_visible_event_age',
1568                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1569                         ) UNION
1570                         SELECT '1000 YEARS'::INTERVAL AS value
1571                 ) ous)
1572                 ]]></oils_persist:source_definition>
1573                 <fields oils_persist:primary="id">
1574                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1575                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1576                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1577                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1578                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1579                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1582                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1583                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1584                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1585                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1586                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1587                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1588                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1589                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1590                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1591                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1592                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1593                 </fields>
1594                 <links>
1595                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1596                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1597                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1598                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1599                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1600                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1601                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1602                 </links>
1603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1604                         <actions>
1605                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1606                         </actions>
1607                 </permacrud>
1608         </class>
1609
1610         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1611                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1612                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1613                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1614                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1615                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1616                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1617                 </fields>
1618                 <links>
1619                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1620                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1621                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1622                 </links>
1623                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1624                         <actions>
1625                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1626                         </actions>
1627                 </permacrud>
1628         </class>
1629
1630         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1631                 <fields oils_persist:primary="code">
1632                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1633                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1634                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1635                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1636                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1637                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1638                 </fields>
1639                 <links/>
1640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1641             <actions>
1642                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1643                 <retrieve/>
1644                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1645                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1646             </actions>
1647         </permacrud>
1648         </class>
1649
1650         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1651                 <fields oils_persist:primary="code">
1652                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1653                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1654                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1655                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1656                 </fields>
1657                 <links/>
1658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1659             <actions>
1660                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1661                 <retrieve/>
1662                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1663                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1664             </actions>
1665         </permacrud>
1666         </class>
1667
1668         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1669                 <fields oils_persist:primary="code">
1670                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1671                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1672                 </fields>
1673                 <links/>
1674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1675             <actions>
1676                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1677                 <retrieve/>
1678                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1679                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1680             </actions>
1681         </permacrud>
1682         </class>
1683
1684         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1685                 <fields oils_persist:primary="code">
1686                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1687                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1688                 </fields>
1689                 <links/>
1690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1691             <actions>
1692                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1693                 <retrieve/>
1694                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1695                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1696             </actions>
1697         </permacrud>
1698         </class>
1699
1700         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1701                 <fields oils_persist:primary="code">
1702                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1703                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1704                 </fields>
1705                 <links/>
1706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1707             <actions>
1708                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1709                 <retrieve/>
1710                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1711                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1712             </actions>
1713         </permacrud>
1714         </class>
1715
1716         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1717                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1718                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1719                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1720                 </fields>
1721                 <links/>
1722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1723             <actions>
1724                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1725                 <retrieve/>
1726                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1727                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1728             </actions>
1729         </permacrud>
1730         </class>
1731
1732         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1733                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1734                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1735                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1736                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1737                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1738                 </fields>
1739         <links>
1740             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1741             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1742             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1743         </links>
1744         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1745             <actions>
1746                 <create permission="UPDATE_COPY">
1747                     <context link="target_copy" field="circ_lib"/>
1748                 </create>
1749                 <retrieve/>
1750                 <update permission="UPDATE_COPY">
1751                     <context link="target_copy" field="circ_lib"/>
1752                 </update>
1753                 <delete permission="UPDATE_COPY">
1754                     <context link="target_copy" field="circ_lib"/>
1755                 </delete>
1756             </actions>
1757         </permacrud>
1758         </class>
1759
1760         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1761                 <fields oils_persist:primary="code">
1762                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1763                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1764                 </fields>
1765                 <links/>
1766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1767             <actions>
1768                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1769                 <retrieve/>
1770                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1771                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1772             </actions>
1773         </permacrud>
1774         </class>
1775
1776         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1777                 <fields oils_persist:primary="code">
1778                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1779                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1780                 </fields>
1781                 <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1787                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790         </class>
1791
1792         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1793                 <fields oils_persist:primary="code">
1794                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1795                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1796                 </fields>
1797                 <links/>
1798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1799             <actions>
1800                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1801                 <retrieve/>
1802                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1803                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1804             </actions>
1805         </permacrud>
1806         </class>
1807
1808     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1809         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1810             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1811             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1812             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1813             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1814             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1815             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1816             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1817             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1818             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1819             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1823             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1824             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1825             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1826             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1827         </fields>
1828         <links/>
1829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1830             <actions>
1831                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1832                 <retrieve/>
1833                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1834                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1835             </actions>
1836         </permacrud>
1837     </class>
1838
1839     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1840         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1841             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1842             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1843             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1844             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1845             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1846             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1847             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1848             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1849             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1850             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1851             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1852             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1853             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1854             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1855             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1856             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1857             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1858             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1859             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1860         </fields>
1861         <links/>
1862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1863             <actions>
1864                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1865                 <retrieve/>
1866                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1867                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1868             </actions>
1869         </permacrud>
1870     </class>
1871
1872     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1873         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1874             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1875             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1876             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1877             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1878             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1879         </fields>
1880         <links>
1881             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1882             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1883             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1884         </links>
1885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1886             <actions>
1887                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1889                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1890                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1891             </actions>
1892         </permacrud>
1893     </class>
1894
1895         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1896                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1897                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1898                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1899                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1900                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1903                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1904                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1905                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1906                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1907                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1910                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1911                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1913             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1914                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1915                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1916                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1917                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1918                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1919                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1920                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1921                 </fields>
1922                 <links>
1923                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1926                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1927                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1928                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1929                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1930                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1931                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1932                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1933                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1934                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1935                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1936             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1937                 </links>
1938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1939             <actions>
1940                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1942                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1943                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1944             </actions>
1945         </permacrud>
1946         </class>
1947
1948         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1949                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1950                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1951                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1952                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1953                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1954                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1955                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1956                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1957                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1958                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1959                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1960                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1962                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1963                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1964                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1965             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1966                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1967                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1968             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1969                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1970                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1971                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1972                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1973             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1974             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1975             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1976                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1977                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1978                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1979                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1980                 </fields>
1981                 <links>
1982                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1984                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1985                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1986                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1987                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1988                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1989                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1990                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1991                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1992                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1993                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1994                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1995                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1996             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1997                 </links>
1998         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1999             <actions>
2000                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2002                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2003                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2004             </actions>
2005         </permacrud>
2006         </class>
2007
2008     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
2009         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2010             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2011             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2012             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2013         </fields>
2014         <links/>
2015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2016             <actions>
2017                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2020                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2021             </actions>
2022         </permacrud>
2023     </class>
2024
2025     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
2026         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2027             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2028             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2029             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2030             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2031             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2032             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2033             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2034         </fields>
2035         <links>
2036             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2037         </links>
2038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2039             <actions>
2040                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2041                 <retrieve/>
2042                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2043                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2044             </actions>
2045         </permacrud>
2046     </class>
2047
2048     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2049         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2050             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2051             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2052             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2053             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2054             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2055         </fields>
2056         <links>
2057             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2058             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2059         </links>
2060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2061             <actions>
2062                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2063                     <context link="matchpoint" field="org_unit"/>
2064                 </create>
2065                 <retrieve/>
2066                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="matchpoint" field="org_unit"/>
2068                 </update>
2069                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2070                     <context link="matchpoint" field="org_unit"/>
2071                 </delete>
2072             </actions>
2073         </permacrud>
2074     </class>
2075
2076     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2077         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2078             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2079             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2080             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2081         </fields>
2082         <links>
2083             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2084             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2085         </links>
2086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2087             <actions>
2088                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2089                     <context link="limit_set" field="owning_lib"/>
2090                 </create>
2091                 <retrieve/>
2092                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2093                     <context link="limit_set" field="owning_lib"/>
2094                 </update>
2095                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2096                     <context link="limit_set" field="owning_lib"/>
2097                 </delete>
2098             </actions>
2099         </permacrud>
2100     </class>
2101     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2102         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2103             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2104             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2105             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2106         </fields>
2107         <links>
2108             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2109             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2110         </links>
2111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2112             <actions>
2113                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2114                     <context link="limit_set" field="owning_lib"/>
2115                 </create>
2116                 <retrieve/>
2117                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2118                     <context link="limit_set" field="owning_lib"/>
2119                 </update>
2120                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2121                     <context link="limit_set" field="owning_lib"/>
2122                 </delete>
2123             </actions>
2124         </permacrud>
2125     </class>
2126
2127     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2128         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2129             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2130             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2131             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2132             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2133         </fields>
2134         <links>
2135             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2136             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2137         </links>
2138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2139             <actions>
2140                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2141                     <context link="limit_set" field="owning_lib"/>
2142                 </create>
2143                 <retrieve/>
2144                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </update>
2147                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2148                     <context link="limit_set" field="owning_lib"/>
2149                 </delete>
2150             </actions>
2151         </permacrud>
2152     </class>
2153
2154         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2155                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2156                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2157                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2158                 </fields>
2159                 <links/>
2160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2161             <actions>
2162                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2163                 <retrieve/>
2164                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2165                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2166             </actions>
2167         </permacrud>
2168         </class>
2169
2170         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2171                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2172                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2173                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2174                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2175                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2176                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2177                 </fields>
2178                 <links>
2179                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2180                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2181                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2182                 </links>
2183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2184             <actions>
2185                 <create permission="ADMIN_SURVEY">
2186                     <context link="survey" field="owner"/>
2187                 </create>
2188                 <retrieve/>
2189                 <update permission="ADMIN_SURVEY">
2190                     <context link="survey" field="owner"/>
2191                 </update>
2192                 <delete permission="ADMIN_SURVEY">
2193                     <context link="survey" field="owner"/>
2194                 </delete>
2195             </actions>
2196         </permacrud>
2197         </class>
2198         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2199                 <fields oils_persist:primary="id" oils_persist:sequence="">
2200                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2201                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2202                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2203                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2205                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2206                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2207                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2208                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2209                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2210                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2211                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2212                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2213                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2214                 </fields>
2215                 <links>
2216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2217                 </links>
2218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2219                         <actions>
2220                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2221                                         <context link="usr" field="home_ou" />
2222                                 </retrieve>
2223                         </actions>
2224                 </permacrud>
2225         </class>
2226         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="">
2228                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2229                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2230                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2231                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2232                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2233                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2234                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2235                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2236                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2237                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2238                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2239                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2240                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2241                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2242                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2243                 </fields>
2244                 <links>
2245                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2246                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2247                 </links>
2248         </class>
2249         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2250                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2251                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2252                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2253                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2254                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2255                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2256                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2257                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2258                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2259                 </fields>
2260                 <links>
2261                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2262                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2263                 </links>
2264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2265                         <actions> <!-- created magically, so no create action -->
2266                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2267                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2268                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2269                         </actions>
2270                 </permacrud>
2271         </class>
2272         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2273                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2274                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2275                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2276                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2277                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2278                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2279                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2280                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2281                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2282                 </fields>
2283                 <links>
2284                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2285                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2286                 </links>
2287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2288                         <actions> <!-- created magically, so no create action -->
2289                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2290                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2291                         </actions>
2292                 </permacrud>
2293         </class>
2294         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2295                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2296                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2297                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2298                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2299                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2300                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2301                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2302                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2303                 </fields>
2304                 <links>
2305                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2306                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2307                 </links>
2308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2309             <actions>
2310                 <create permission="UPDATE_USER" context_field="owner">
2311                     <context link="usr" field="home_ou"/>
2312                 </create>
2313                                 <!-- note: public notes are still accessible via API -->
2314                 <retrieve permission="UPDATE_USER">
2315                     <context link="usr" field="home_ou"/>
2316                                 </retrieve>
2317                 <update permission="UPDATE_USER">
2318                     <context link="usr" field="home_ou"/>
2319                                 </update>
2320                 <delete permission="UPDATE_USER">
2321                     <context link="usr" field="home_ou"/>
2322                                 </delete>
2323             </actions>
2324         </permacrud>
2325         </class>
2326         <class id="aupw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_privacy_waiver" oils_persist:tablename="actor.usr_privacy_waiver" reporter:label="Privacy Waiver">
2327                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2328                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2329                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2330                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2331                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2332                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2333                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2334                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2335                 </fields>
2336                 <links>
2337                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2338                 </links>
2339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2340                         <actions>
2341                                 <create permission="UPDATE_USER">
2342                                         <context link="usr" field="home_ou"/>
2343                                 </create>
2344                                 <retrieve permission="VIEW_USER">
2345                                         <context link="usr" field="home_ou"/>
2346                                 </retrieve>
2347                                 <update permission="UPDATE_USER">
2348                                         <context link="usr" field="home_ou"/>
2349                                 </update>
2350                                 <delete permission="UPDATE_USER">
2351                                         <context link="usr" field="home_ou"/>
2352                                 </delete>
2353                         </actions>
2354                 </permacrud>
2355         </class>
2356         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2357                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2358                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2360                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2361                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2362                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2363                 </fields>
2364                 <links>
2365                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2366                 </links>
2367         </class>
2368         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2369                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2370                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2371                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2372                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2373                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2374                 </fields>
2375                 <links>
2376                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2377                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2378                 </links>
2379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2380                         <actions>
2381                                 <retrieve permission="VIEW_USER">
2382                                         <context link="usr" field="home_ou" />
2383                                 </retrieve>
2384                         </actions>
2385                 </permacrud>
2386         </class>
2387         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2389                         <field name="field" reporter:datatype="link"/>
2390                         <field name="id" reporter:datatype="id" />
2391                         <field name="source" reporter:datatype="link"/>
2392                         <field name="value" reporter:datatype="text"/>
2393                 </fields>
2394                 <links>
2395                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2396                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2397                 </links>
2398         </class>
2399         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2400                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2401                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2402                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2403                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2404                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2405                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2406                 </fields>
2407                 <links>
2408                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2409                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2410                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2411                 </links>
2412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2413                         <actions>
2414                                 <retrieve/>
2415                         </actions>
2416                 </permacrud>
2417         </class>
2418         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2419                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2420                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2421                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2422                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2423                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2424                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2425                 </fields>
2426                 <links>
2427                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2428                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2429                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2430                 </links>
2431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2432                         <actions>
2433                                 <retrieve/>
2434                         </actions>
2435                 </permacrud>
2436         </class>
2437         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2438                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2439                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2440                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2441                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2442                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2443                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2444                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2445                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2446                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2447                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2448                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2449                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2450                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2451                 </fields>
2452                 <links>
2453                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2454                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2455                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2456                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2457                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2458                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2459                 </links>
2460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2461             <actions>
2462                 <create permission="TRANSIT_COPY" context_field="owner">
2463                     <context link="target_copy" field="circ_lib"/>
2464                 </create>
2465                 <retrieve/>
2466                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2467                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2468             </actions>
2469         </permacrud>
2470         </class>
2471         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2472                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2473                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2474                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2475                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2476                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2477                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2478                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2479                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2480                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2481                 </fields>
2482                 <links>
2483                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2484                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2485                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2486                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2487                 </links>
2488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2489             <actions>
2490                 <create permission="ADMIN_SURVEY">
2491                     <context link="survey" field="owner"/>
2492                 </create>
2493                 <retrieve permission="VIEW_USER">
2494                     <context link="usr" field="home_ou"/>
2495                 </retrieve>
2496                 <update permission="ADMIN_SURVEY">
2497                     <context link="survey" field="owner"/>
2498                 </update>
2499                 <delete permission="ADMIN_SURVEY">
2500                     <context link="survey" field="owner"/>
2501                 </delete>
2502             </actions>
2503         </permacrud>
2504         </class>
2505         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2506                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2507                         <field name="bucket" />
2508                         <field name="id" reporter:datatype="id" />
2509                         <field name="target_copy" reporter:datatype="link"/>
2510                         <field name="create_time" reporter:datatype="timestamp" />
2511                         <field name="pos" reporter:datatype="int" />
2512                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2513                 </fields>
2514                 <links>
2515                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2516                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2517             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2518                 </links>
2519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2520                         <actions>
2521                                 <retrieve permission="ADMIN_COPY_BUCKET">
2522                     <context link="bucket" owning_lib="owning_lib"/>
2523                 </retrieve>
2524             </actions>
2525         </permacrud>
2526         </class>
2527         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2528                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2529                         <field name="id" reporter:datatype="id" />
2530                         <field name="item" reporter:datatype="link"/>
2531                         <field name="note" reporter:datatype="text" />
2532                 </fields>
2533                 <links>
2534                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2535                 </links>
2536         </class>
2537
2538         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2539                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2540                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2541                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2542                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2543                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2544                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2545                 </fields>
2546                 <links>
2547                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2548                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2549                 </links>
2550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2551                         <actions>
2552                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2553                                 <retrieve/>
2554                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2555                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2556                         </actions>
2557                 </permacrud>
2558         </class>
2559
2560         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2561                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2562                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2563                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2564                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2565                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2566                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2567                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2568                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2569                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2570                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2571                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2572                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2573                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2574                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2575                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2576                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2577                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2578                 </fields>
2579                 <links>
2580                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2581                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2582                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2583                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2584                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2585                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2586                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2587                 </links>
2588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2589                         <actions>
2590                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2591                                 <retrieve/>
2592                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2593                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2594                         </actions>
2595                 </permacrud>
2596         </class>
2597
2598         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2599                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2600                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2601                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2602                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2603                 </fields>
2604                 <links>
2605                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2606                 </links>
2607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2608                         <actions>
2609                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2610                                 <retrieve/>
2611                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2613                         </actions>
2614                 </permacrud>
2615         </class>
2616
2617         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2618                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2619                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2620                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2621                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2622                 </fields>
2623                 <links>
2624                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2625                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2626                 </links>
2627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2628                         <actions>
2629                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2630                                 <retrieve/>
2631                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2632                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2633                         </actions>
2634                 </permacrud>
2635         </class>
2636
2637         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2638                 <fields oils_persist:primary="code">
2639                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2640                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2641                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2642                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2643                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2644                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2645                 </fields>
2646                 <links>
2647                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2648                 </links>
2649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2650                         <actions>
2651                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2652                                 <retrieve/>
2653                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2654                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2655                         </actions>
2656                 </permacrud>
2657         </class>
2658
2659         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2660                 <fields oils_persist:primary="code">
2661                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2662                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2663                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2664                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2665                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2666                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2667                 </fields>
2668                 <links>
2669                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2670                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2671                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2672                 </links>
2673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2674                         <actions>
2675                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2676                                 <retrieve/>
2677                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2678                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2679                         </actions>
2680                 </permacrud>
2681         </class>
2682
2683     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2684         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2685             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2686             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2687             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2688         </fields>
2689         <links>
2690             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2691             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2692         </links>
2693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2694             <actions>
2695                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2696                 <retrieve/>
2697                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2698                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2699             </actions>
2700         </permacrud>
2701     </class>
2702
2703         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2704                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2705                         <field name="active" reporter:datatype="bool"/>
2706                         <field name="create_date" reporter:datatype="timestamp"/>
2707                         <field name="creator" />
2708                         <field name="deleted" reporter:datatype="bool"/>
2709                         <field name="edit_date" reporter:datatype="timestamp"/>
2710                         <field name="editor" />
2711                         <field name="id" reporter:datatype="id" />
2712                         <field name="last_xact_id" />
2713                         <field name="marc" />
2714                         <field name="source" />
2715                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2716                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2717                         <field name="heading" />
2718                         <field name="simple_heading" />
2719                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2720                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2721                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2722                 </fields>
2723                 <links>
2724                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2725                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2726                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2727                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2728                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2729                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2730                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2731                 </links>
2732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2733                         <actions>
2734                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2735                                 <retrieve/>
2736                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2737                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2738                         </actions>
2739                 </permacrud>
2740         </class>
2741         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2743                         <field name="char_encoding" />
2744                         <field name="id" />