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