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