C/W MARS customizations to fm_IDL.xml
authorJim Keenan <jkeenan@cwmars.org>
Fri, 20 May 2016 17:46:16 +0000 (13:46 -0400)
committerJim Keenan <jkeenan@cwmars.org>
Fri, 20 May 2016 17:46:16 +0000 (13:46 -0400)
Open-ILS/examples/fm_IDL.xml

index 8cff802..6456a4f 100644 (file)
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-
-Copyright (C) 2006-2008 Georgia Public Library Service
-Copyright (C) 2008 Equinox Software, Inc
-Author: Mike Rylander <miker@esilibrary.com>
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
-
-############################
-          TEMPLATE
-############################
-
-    <class
-        id=""
-        controller="open-ils.cstore open-ils.pcrud"
-        oils_obj:fieldmapper=""
-        oils_persist:tablename=""
-        reporter:label=""
-        oils_persist:field_safe=""
-        oils_persist:virtual=""
-        oils_persist:readonly=""
-        reporter:core=""
-    >
-
-        <oils_persist:source_definition><![CDATA[
-            SELECT * FROM foo
-        ]]></oils_persist:source_definition>
-
-        <fields oils_persist:primary="" oils_persist:sequence="">
-            <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="" name="" reporter:datatype="org_unit"/>
-            <field reporter:label="" name="" reporter:datatype="text"/>
-            <field reporter:label="" name="" reporter:datatype="link"/>
-            <field reporter:label="" name="" reporter:datatype="timestamp"/>
-            <field reporter:label="" name="" reporter:datatype="money"/>
-            <field reporter:label="" name="" reporter:datatype="bool"/>
-            <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
-            <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
-        </fields>
-
-        <links>
-            <link field="" reltype="has_a" key="" map="" class=""/>
-        </links>
-
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="" gloabl_required="true"/>
-                <retrieve/>
-                <update permission="" context_field=""/>
-                <delete permission="">
-                    <context link="" field=""/>
-                </delete>
-            </actions>
-        </permacrud>
-
-    </class>
-
-
--->
-
-<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">
-
-       <!-- Virtual classes -->
-       <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
-               <fields>
-                       <field name="usr" oils_persist:virtual="true" />
-                       <field name="forgive_payment" oils_persist:virtual="true" />
-                       <field name="work_payment" oils_persist:virtual="true" />
-                       <field name="credit_payment" oils_persist:virtual="true" />
-                       <field name="goods_payment" oils_persist:virtual="true" />
-                       <field name="account_adjustment" oils_persist:virtual="true" />
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-
-       <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
-               <fields>
-                       <field name="workstation" oils_persist:virtual="true" />
-                       <field name="cash_payment" oils_persist:virtual="true" />
-                       <field name="check_payment" oils_persist:virtual="true" />
-                       <field name="credit_card_payment" oils_persist:virtual="true" />
-               </fields>
-               <links>
-                       <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
-               </links>
-       </class>
-
-       <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
-               <fields>
-                       <field name="id" oils_persist:virtual="true" />
-                       <field name="children" oils_persist:virtual="true" />
-                       <field name="owner_doc" oils_persist:virtual="true" />
-                       <field name="intra_doc_id" oils_persist:virtual="true" />
-                       <field name="parent_node" oils_persist:virtual="true" />
-                       <field name="node_type" oils_persist:virtual="true" />
-                       <field name="namespace_uri" oils_persist:virtual="true" />
-                       <field name="name" oils_persist:virtual="true" />
-                       <field name="value" oils_persist:virtual="true" />
-               </fields>
-       </class>
-
-       <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
-               <fields>
-                       <field name="title" oils_persist:virtual="true" />
-                       <field name="author" oils_persist:virtual="true" />
-                       <field name="doc_id" oils_persist:virtual="true" />
-                       <field name="doc_type" oils_persist:virtual="true" />
-                       <field name="pubdate" oils_persist:virtual="true" />
-                       <field name="isbn" oils_persist:virtual="true" />
-                       <field name="publisher" oils_persist:virtual="true" />
-                       <field name="tcn" oils_persist:virtual="true" />
-                       <field name="subject" oils_persist:virtual="true" />
-                       <field name="types_of_resource" oils_persist:virtual="true" />
-                       <field name="call_numbers" oils_persist:virtual="true" />
-                       <field name="edition" oils_persist:virtual="true" />
-                       <field name="online_loc" oils_persist:virtual="true" />
-                       <field name="synopsis" oils_persist:virtual="true" />
-                       <field name="physical_description" oils_persist:virtual="true" />
-                       <field name="toc" oils_persist:virtual="true" />
-                       <field name="copy_count" oils_persist:virtual="true" />
-                       <field name="series" oils_persist:virtual="true" />
-                       <field name="serials" oils_persist:virtual="true" />
-                       <field name="foreign_copy_maps" oils_persist:virtual="true" />
-               </fields>
-       </class>
-
-       <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
-               <fields>
-                       <field name="err_msg" oils_persist:virtual="true" />
-                       <field name="type" oils_persist:virtual="true" />
-               </fields>
-       </class>
-
-       <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
-               <fields>
-                       <field name="err_msg" oils_persist:virtual="true" />
-                       <field name="type" oils_persist:virtual="true" />
-               </fields>
-       </class>
-
-       <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
-               <fields oils_persist:primary="matchpoint">
-                       <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
-                       <field reporter:label="Success" name="success" reporter:datatype="bool"/>
-                       <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
-               </links>
-       </class>
-
-       <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
-        <!-- when the time is right, turn me into a view.  -->
-               <fields>
-            <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
-            <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
-            <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
-            <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
-            <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
-            <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
-            <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
-            <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
-            <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
-            <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
-               </fields>
-       </class>
-
-       <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
-               <fields>
-                       <field name="public_name" oils_persist:virtual="true" />
-                       <field name="target_url" oils_persist:virtual="true" />
-                       <field name="target_coverage" oils_persist:virtual="true" />
-                       <field name="target_embargo" oils_persist:virtual="true" />
-               </fields>
-       </class>
-
-       <!-- Actually in the DB -->
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
-                       <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
-                       <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
-                       <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
-                       <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
-                       <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
-                               <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
-                               <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
-                               <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
-                       <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Group" name="grp" reporter:datatype="link"/>
-                       <field reporter:label="Field" name="field" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_IMPORT_TRASH_FIELD">
-                    <context link="grp" field="owner"/>
-                </create>
-                               <retrieve/>
-                               <update permission="UPDATE_IMPORT_TRASH_FIELD">
-                    <context link="grp" field="owner"/>
-                </update>
-                               <delete permission="DELETE_IMPORT_TRASH_FIELD">
-                    <context link="grp" field="owner"/>
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class  id="vibtg" 
-            controller="open-ils.cstore open-ils.pcrud" 
-            oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
-            oils_persist:tablename="vandelay.import_bib_trash_group" 
-            reporter:label="Import/Overlay Field Groups for Removal">
-               <fields oils_persist:primary="id" 
-                oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-                       <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
-                               <retrieve/>
-                               <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
-                               <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
-                       <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
-                       <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
-                       <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
-                       <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
-                       <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
-                       <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
-                       <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
-                       <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
-                       <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
-                       <field reporter:label="Status" name="status" reporter:datatype="int"/>
-                       <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
-                       <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
-                       <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
-                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
-                       <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
-                       <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
-                       <field reporter:label="Price" name="price" reporter:datatype="money"/>
-                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
-                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
-                       <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
-                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
-                       <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
-                       <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
-                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
-                       <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
-                       <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
-                       <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
-                       <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
-                       <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_IMPORT_ITEM">
-                    <context link="definition" field="owner"/>
-                               </create>
-                               <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
-                    <context link="definition" field="owner"/>
-                               </retrieve>
-                               <update permission="UPDATE_IMPORT_ITEM">
-                    <context link="definition" field="owner"/>
-                               </update>
-                               <delete permission="DELETE_IMPORT_ITEM">
-                    <context link="definition" field="owner"/>
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
-                       <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
-                       <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
-                       <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
-                       <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
-                       <field reporter:label="Status" name="status" reporter:datatype="text"/>
-                       <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
-                       <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
-                       <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
-                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
-                       <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
-                       <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
-                       <field reporter:label="Price" name="price" reporter:datatype="text"/>
-                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
-                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
-                       <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
-                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
-                       <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
-                       <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
-                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
-                       <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
-                       <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
-                       <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
-                               <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"/>
-                               <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
-                               <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
-                       <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
-                       <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
-                       <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
-                       <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
-                       <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
-                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
-                       <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
-                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
-                       <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
-                       <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
-                       <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
-                       <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
-                       <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
-                       <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
-                       <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
-               </fields>
-               <links>
-                       <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
-                       <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
-                       <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
-                       <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
-            <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
-            <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
-            <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Code" name="code" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
-                       <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
-                <retrieve/>
-                               <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
-                               <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
-                       <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Record" name="record" reporter:datatype="link"/>
-                       <field reporter:label="Field" name="field" reporter:datatype="link"/>
-                       <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
-                       <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
-                       <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
-                       <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
-                       <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
-                       <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
-                               <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
-                       <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
-                       <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
-                       <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
-                       <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
-                       <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
-                       <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
-                       <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
-                       <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
-                       <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
-               </fields>
-               <links>
-                       <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
-                       <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
-                       <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
-            <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
-            <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Code" name="code" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
-                       <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
-                <retrieve/>
-                               <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
-                               <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
-                       <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Record" name="record" reporter:datatype="link"/>
-                       <field reporter:label="Field" name="field" reporter:datatype="link"/>
-                       <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
-                       <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
-                       <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
-                       <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
-                       <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
-                       <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                               <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
-                       <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
-                               <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
-                               <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
-                               <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
-                       <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
-                       <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
-                       <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
-                       <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
-                       <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
-                       <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
-            <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
-                       <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
-                       <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
-                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
-                       <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
-                       <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_IMPORT_MATCH_SET">
-                    <context link="match_set" field="owner"/>
-                               </create>
-                               <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
-                    <context link="match_set" field="owner"/>
-                               </retrieve>
-                               <update permission="ADMIN_IMPORT_MATCH_SET">
-                    <context link="match_set" field="owner"/>
-                               </update>
-                               <delete permission="ADMIN_IMPORT_MATCH_SET">
-                    <context link="match_set" field="owner"/>
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
-                       <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
-                       <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
-                       <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
-                       <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"/>
-                       <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
-               </fields>
-               <links>
-                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_IMPORT_MATCH_SET">
-                    <context link="match_set" field="owner"/>
-                               </create>
-                               <retrieve permission="ADMIN_IMPORT_MATCH_SET">
-                    <context link="match_set" field="owner"/>
-                               </retrieve>
-                               <update permission="ADMIN_IMPORT_MATCH_SET">
-                    <context link="match_set" field="owner"/>
-                               </update>
-                               <delete permission="ADMIN_IMPORT_MATCH_SET">
-                    <context link="match_set" field="owner"/>
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
-                       <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
-                       <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
-                       <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
-               </links>
-       </class>
-
-    <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">
-        <fields oils_persist:primary="name">
-            <field reporter:label="Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
-            <field reporter:label="Value" name="value"  reporter:datatype="text"/>
-            <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
-        </fields>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
-                <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
-                <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
-                <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-    <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">
-        <fields oils_persist:primary="id">
-            <field reporter:label="ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-            <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
-            <field reporter:label="Function" name="func"  reporter:datatype="text"/>
-            <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
-        </fields>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
-                       <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
-                       <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
-                       <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
-               </fields>
-               <links>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-                       <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="ID"   name="id" reporter:datatype="id"/>
-                       <field reporter:label="Code" name="code" reporter:datatype="text"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-        </fields>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_TAG_TABLE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_TAG_TABLE" global_required="true"/>
-                <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="ID"   name="id" reporter:datatype="id"/>
-                       <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
-                       <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
-                       <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
-                       <field reporter:label="Repeatabl?" name="repeatable" reporter:datatype="bool"/>
-                       <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
-                       <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-        </fields>
-               <links>
-                       <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
-                <retrieve/>
-                <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
-                <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="ID"   name="id" reporter:datatype="id"/>
-                       <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
-                       <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
-                       <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
-                       <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
-                       <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
-                       <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-        </fields>
-               <links>
-                       <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
-                <retrieve/>
-                <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
-                <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="name">
-                       <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" />
-                       <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
-                       <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
-                       <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
-                       <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
-                       <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
-                       <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
-                       <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
-                       <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
-                       <field reporter:label="Format" name="format" reporter:datatype="link"/>
-                       <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
-                       <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
-                       <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
-                       <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
-                       <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
-                       <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
-               </fields>
-               <links>
-                       <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
-                       <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_SVF" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_SVF" global_required="true"/>
-                <delete permission="ADMIN_SVF" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-            <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
-                       <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
-                <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="coded_value">
-                       <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
-                       <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
-               </fields>
-               <links>
-                       <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CODED_VALUE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_CODED_VALUE" global_required="true"/>
-                <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
-                       <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
-               </fields>
-               <links>
-                       <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve/>
-            </actions>
-        </permacrud>
-       </class>
-
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
-                       <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
-                       <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve/>
-            </actions>
-        </permacrud>
-       </class>
-
-
-       <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">
-               <fields oils_persist:primary="source">
-                       <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
-                       <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 -->
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields>
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
-                       <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
-                       <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
-                       <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
-                       <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
-                       <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
-               </fields>
-               <links>
-                       <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
-                       <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
-                       <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
-                       <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
-                       <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
-            <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
-            <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
-            <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
-                       <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CODED_VALUE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_CODED_VALUE" global_required="true"/>
-                <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
-                       <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
-                       <field name="label"         reporter:datatype="text" reporter:label="Label"/>
-                       <field name="host"          reporter:datatype="text" reporter:label="Host"/>
-                       <field name="username"      reporter:datatype="text" reporter:label="Username"/>
-                       <field name="password"      reporter:datatype="text" reporter:label="Password"/>
-                       <field name="account"       reporter:datatype="text" reporter:label="Account"/>
-                       <field name="path"          reporter:datatype="text" reporter:label="Path"/>
-                       <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
-                       <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
-                <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
-                <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
-                <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-
-    <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">
-        <fields oils_persist:primary="name">
-            <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
-            <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-            <field reporter:label="Host" name="host"  reporter:datatype="text"/>
-            <field reporter:label="Port" name="port"  reporter:datatype="int"/>
-            <field reporter:label="DB" name="db"  reporter:datatype="text"/>
-            <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
-            <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
-            <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
-            <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
-            <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
-        </fields>
-        <links>
-            <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
-            <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-                <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
-            <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
-            <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
-            <field reporter:label="Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-            <field reporter:label="Code" name="code"  reporter:datatype="int"/>
-            <field reporter:label="Format" name="format"  reporter:datatype="int"/>
-            <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
-        </fields>
-        <links>
-            <link field="source" reltype="has_a" key="name" map="" class="czs"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-                <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-    <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
-                       oils_obj:fieldmapper="config::z3950_index_field_map" 
-                       oils_persist:tablename="config.z3950_index_field_map" 
-                       reporter:label="Z39.50 Index Field Map">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
-            <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-            <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
-            <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
-            <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
-            <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
-        </fields>
-        <links>
-            <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
-            <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
-            <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-                <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
-                       <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Data" name="data" reporter:datatype="text"/>
-                       <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
-                       <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
-                       <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
-               </fields>
-               <links>
-            <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
-            <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                               <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="key">
-                       <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
-                       <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
-                               <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
-               <fields oils_persist:primary="module">
-                       <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="module">
-                       <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
-                               <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="module">
-                       <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
-                               <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="module">
-                       <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
-                               <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
-                       <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
-                       <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
-                       <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
-                       <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
-                    <context link="event_def" field="owner"/>
-                </create>
-                               <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
-                    <context link="event_def" field="owner"/>
-                </retrieve>
-                               <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
-                    <context link="event_def" field="owner"/>
-                </update>
-                               <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
-                    <context link="event_def" field="owner"/>
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
-                       <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
-                       <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
-                       <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
-                       <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
-                       <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
-                       <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
-                       <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
-                       <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
-                       <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
-                       <field reporter:label="Template" name="template"  reporter:datatype="text"/>
-                       <field reporter:label="Name" name="name"  reporter:datatype="text"/>
-                       <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
-                       <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
-                       <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
-                       <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
-                       <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
-                       <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
-                       <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
-                       <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
-                       <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
-                       <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
-                       <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
-                       <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
-                       <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
-                       <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
-                       <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
-                       <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
-                       <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
-                               <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
-                               <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
-                               <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
-                       <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
-                       <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
-                       <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="State" name="state" reporter:datatype="text"/>
-                       <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
-                       <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
-                       <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
-                       <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
-                       <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
-               </fields>
-               <links>
-                       <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
-                       <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
-                       <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
-                       <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
-               </links>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
-                       <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
-                       <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
-                       <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
-                    <context link="event_def" field="owner"/>
-                </create>
-                               <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
-                    <context link="event_def" field="owner"/>
-                </retrieve>
-                               <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
-                    <context link="event_def" field="owner"/>
-                </update>
-                               <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
-                    <context link="event_def" field="owner"/>
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <oils_persist:source_definition><![CDATA[
-               SELECT  atevdef.hook,
-                       atevdef.name,
-                       atevdef.reactor,
-                       atev.id,
-                       atev.event_def,
-                       atev.add_time,
-                       atev.run_time,
-                       atev.start_time,
-                       atev.update_time,
-                       atev.complete_time,
-                       atev.update_process,
-                       atev.state,
-                       atev.user_data,
-                       atev.template_output,
-                       atev.error_output,
-                       atev.async_output,
-                       targ_circ.id AS target_circ,
-                       targ_ahr.id AS target_hold,
-                       COALESCE(
-                               targ_circ.circ_lib,
-                               targ_ahr.pickup_lib
-                       ) AS perm_lib
-               FROM action_trigger.event atev
-               JOIN action_trigger.event_definition atevdef ON
-                       (atevdef.id = atev.event_def)
-               JOIN action_trigger.hook ath ON
-                       (ath.key = atevdef.hook)
-               LEFT JOIN action.circulation targ_circ ON
-                       (ath.core_type = 'circ' AND targ_circ.id = atev.target)
-               LEFT JOIN action.hold_request targ_ahr ON
-                       (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
-               WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
-                       SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
-                               'circ.staff.max_visible_event_age',
-                               COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
-                       ) UNION
-                       SELECT '1000 YEARS'::INTERVAL AS value
-               ) ous)
-               ]]></oils_persist:source_definition>
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Hook" name="hook" reporter:datatype="link" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text" />
-                       <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
-                       <field reporter:label="Event ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
-                       <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
-                       <field reporter:label="Event State" name="state" reporter:datatype="text" />
-                       <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
-                       <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
-                       <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
-                       <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
-                       <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
-                       <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
-                       <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
-               </fields>
-               <links>
-                       <link field="hook" reltype="has_a" key="key" map="" class="ath" />
-                       <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
-                       <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
-                       <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
-                       <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
-                       <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
-                       <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
-                       <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
-                       <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
-                       <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MOD" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_CIRC_MOD" global_required="true"/>
-                <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
-                       <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
-                <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
-                <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_COPY_BTYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
-                <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_CN_BTYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_CN_BTYPE" global_required="true"/>
-                <delete permission="DELETE_CN_BTYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
-                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_BIB_PTYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
-                <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
-                       <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
-                       <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
-               </fields>
-        <links>
-            <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
-            <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
-            <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="UPDATE_COPY">
-                    <context link="target_copy" field="circ_lib"/>
-                </create>
-                <retrieve/>
-                <update permission="UPDATE_COPY">
-                    <context link="target_copy" field="circ_lib"/>
-                </update>
-                <delete permission="UPDATE_COPY">
-                    <context link="target_copy" field="circ_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_BIB_BTYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
-                <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_USER_BTYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_USER_BTYPE" global_required="true"/>
-                <delete permission="DELETE_USER_BTYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
-                       <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_MARC_CODE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_MARC_CODE" global_required="true"/>
-                <delete permission="ADMIN_MARC_CODE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
-            <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-            <field reporter:label="Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
-            <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
-            <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
-            <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
-            <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
-            <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
-            <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
-            <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
-            <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
-            <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
-            <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
-            <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
-            <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
-            <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
-            <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
-        </fields>
-        <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
-                <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
-            <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-            <field reporter:label="Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
-            <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
-            <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
-            <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
-            <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
-            <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
-            <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
-            <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
-            <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
-            <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
-            <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
-            <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
-            <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
-            <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
-            <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
-            <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
-            <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
-        </fields>
-        <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
-            <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
-            <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
-            <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
-            <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
-        </fields>
-        <links>
-            <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
-            <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
-                <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
-            </actions>
-        </permacrud>
-    </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
-                       <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
-                       <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
-                       <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
-            <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
-                       <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
-                       <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
-                       <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
-                       <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
-                       <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
-                       <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
-                       <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
-                       <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
-                       <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
-                       <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
-                       <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
-            <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
-                <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
-                <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
-                <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
-                       <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
-                       <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
-                       <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
-                       <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
-                       <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
-            <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
-                       <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
-                       <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
-            <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
-                       <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
-                       <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
-                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
-            <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
-            <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
-            <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
-                       <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
-                       <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
-                       <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
-                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
-                       <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
-                       <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
-                       <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
-                       <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
-                       <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
-                       <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
-            <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
-                <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
-            </actions>
-        </permacrud>
-       </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
-            <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-            <field reporter:label="Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Description" name="description" reporter:datatype="text"/>
-        </fields>
-        <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
-            <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-            <field reporter:label="Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
-            <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
-            <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
-            <field reporter:label="Global" name="global" reporter:datatype="bool"/>
-            <field reporter:label="Description" name="description" reporter:datatype="text"/>
-        </fields>
-        <links>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
-                <retrieve/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
-            </actions>
-        </permacrud>
-    </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
-            <field reporter:label="ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
-            <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
-            <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
-            <field reporter:label="Active" name="active" reporter:datatype="bool"/>
-        </fields>
-        <links>
-            <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
-            <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="matchpoint" field="org_unit"/>
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="matchpoint" field="org_unit"/>
-                </update>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="matchpoint" field="org_unit"/>
-                </delete>
-            </actions>
-        </permacrud>
-    </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
-            <field reporter:label="ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
-            <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
-        </fields>
-        <links>
-            <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
-            <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </update>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-    </class>
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
-            <field reporter:label="ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
-            <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
-        </fields>
-        <links>
-            <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
-            <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </update>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-    </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
-            <field reporter:label="ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
-            <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
-            <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
-        </fields>
-        <links>
-            <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
-            <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </update>
-                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
-                    <context link="limit_set" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-    </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
-                       <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
-                <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
-                       <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Question ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Question" name="question" reporter:datatype="text"/>
-                       <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
-                       <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
-                       <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_SURVEY">
-                    <context link="survey" field="owner"/>
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_SURVEY">
-                    <context link="survey" field="owner"/>
-                </update>
-                <delete permission="ADMIN_SURVEY">
-                    <context link="survey" field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
-                       <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
-                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
-                       <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
-                       <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
-                       <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
-                       <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
-                       <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
-                       <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
-                       <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
-                       <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_USER_TRANSACTIONS">
-                                       <context link="usr" field="home_ou" />
-                               </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
-                       <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
-                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
-                       <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
-                       <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
-                       <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
-                       <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
-                       <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
-                       <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
-                       <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
-                       <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
-                       <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
-                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
-                       <field reporter:label="Message ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
-                       <field reporter:label="Title" name="title" reporter:datatype="text"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link" />
-                       <field reporter:label="Message" name="message" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions> <!-- created magically, so no create action -->
-                               <retrieve permission="VIEW_USER" context_field="sending_lib" />
-                               <update permission="UPDATE_USER" context_field="sending_lib" />
-                               <delete permission="UPDATE_USER" context_field="sending_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-       <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)">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
-                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
-                       <field reporter:label="Message ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
-                       <field reporter:label="Title" name="title" reporter:datatype="text"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link" />
-                       <field reporter:label="Message" name="message" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions> <!-- created magically, so no create action -->
-                               <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
-                               <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
-                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Note ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
-                       <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link" />
-                       <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="UPDATE_USER" context_field="owner">
-                    <context link="usr" field="home_ou"/>
-                </create>
-                               <!-- note: public notes are still accessible via API -->
-                <retrieve permission="UPDATE_USER">
-                    <context link="usr" field="home_ou"/>
-                               </retrieve>
-                <update permission="UPDATE_USER">
-                    <context link="usr" field="home_ou"/>
-                               </update>
-                <delete permission="UPDATE_USER">
-                    <context link="usr" field="home_ou"/>
-                               </delete>
-            </actions>
-        </permacrud>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
-                       <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-       <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
-                       <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Name" name="name" reporter:datatype="link"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="name" reltype="has_a" key="name" map="" class="cust"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
-                       <field name="field" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="source" reporter:datatype="link"/>
-                       <field name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
-                       <field reporter:label="Use ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Item" name="item" reporter:datatype="int" />
-                       <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
-                       <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
-                       <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
-               </fields>
-               <links>
-                       <link field="item" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
-                       <field reporter:label="Use ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
-                       <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
-                       <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
-                       <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
-               </fields>
-               <links>
-                       <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
-                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
-                       <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
-                       <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
-                       <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
-                       <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
-                       <field reporter:label="Source" name="source" reporter:datatype="link"/>
-                       <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
-                       <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
-                       <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
-                       <link field="source" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
-                       <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="TRANSIT_COPY" context_field="owner">
-                    <context link="target_copy" field="circ_lib"/>
-                </create>
-                <retrieve/>
-                <update permission="UPDATE_TRANSIT" context_field="dest source"/>
-                <delete permission="DELETE_TRANSIT" context_field="dest source"/>
-            </actions>
-        </permacrud>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
-                       <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
-                       <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Question" name="question" reporter:datatype="link"/>
-                       <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
-                       <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
-                       <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
-                       <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
-                       <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_SURVEY">
-                    <context link="survey" field="owner"/>
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_SURVEY">
-                    <context link="survey" field="owner"/>
-                </update>
-                <delete permission="ADMIN_SURVEY">
-                    <context link="survey" field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
-                       <field name="bucket" />
-                       <field name="id" reporter:datatype="id" />
-                       <field name="target_copy" reporter:datatype="link"/>
-                       <field name="create_time" reporter:datatype="timestamp" />
-                       <field name="pos" reporter:datatype="int" />
-                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
-            <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
-               </links>
-       </class>
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="item" reporter:datatype="link"/>
-                       <field name="note" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
-               </links>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
-                       <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
-               </fields>
-               <links>
-                       <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
-                       <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <retrieve/>
-                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
-                       <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
-                       <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
-                       <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
-                       <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
-                       <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
-                       <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
-                       <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
-                       <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
-                       <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
-                       <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
-                       <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
-                       <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <retrieve/>
-                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
-                       <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
-                       <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
-               </fields>
-               <links>
-                       <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <retrieve/>
-                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
-                       <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
-                       <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <retrieve/>
-                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-               </fields>
-               <links>
-                       <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <retrieve/>
-                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <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">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
-                       <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text"/>
-                       <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
-               </fields>
-               <links>
-                       <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
-                       <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
-                       <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <retrieve/>
-                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-    <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">
-        <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
-            <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
-            <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
-        </fields>
-        <links>
-            <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
-            <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-                <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-
-       <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">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
-                       <field name="active" reporter:datatype="bool"/>
-                       <field name="create_date" reporter:datatype="timestamp"/>
-                       <field name="creator" />
-                       <field name="deleted" reporter:datatype="bool"/>
-                       <field name="edit_date" reporter:datatype="timestamp"/>
-                       <field name="editor" />
-                       <field name="id" reporter:datatype="id" />
-                       <field name="last_xact_id" />
-                       <field name="marc" />
-                       <field name="source" />
-                       <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
-                       <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
-                       <field name="heading" />
-                       <field name="simple_heading" />
-                       <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
-                       <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
-                       <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
-                               <retrieve/>
-                               <update permission="UPDATE_MARC" global_required="true"/>
-                               <delete permission="UPDATE_MARC" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
-                       <field name="char_encoding" />
-                       <field name="id" />
-                       <field name="record" />
-                       <field name="record_status" />
-                       <field name="thesaurus" />
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="are"/>
-                       <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
-               </links>
-       </class>
-       <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="bib" reporter:datatype="link" />
-                       <field name="authority" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="authority" reltype="has_a" key="id" map="" class="are"/>
-               </links>
-       </class>
-       <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="record" reporter:datatype="link" />
-                       <field name="atag" reporter:datatype="link" />
-                       <field name="value" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="are"/>
-                       <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
-               </links>
-       </class>
-       <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="code" oils_persist:sequence="">
-                       <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
-                       <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_MARC_CODE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_MARC_CODE" global_required="true"/>
-                <delete permission="DELETE_MARC_CODE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
-                       <field name="accepting_usr" />
-                       <field name="amount" reporter:datatype="money" />
-                       <field name="amount_collected" reporter:datatype="money" />
-                       <field name="approval_code" reporter:datatype="text"/>
-                       <field name="cash_drawer" reporter:datatype="link"/>
-                       <field name="cc_first_name" reporter:datatype="text"/>
-                       <field name="cc_last_name" reporter:datatype="text"/>
-                       <field name="cc_number" reporter:datatype="text"/>
-                       <field name="cc_order_number" reporter:datatype="text"/>
-                       <field name="cc_type" reporter:datatype="text"/>
-                       <field name="cc_processor" reporter:datatype="text"/>
-                       <field name="expire_month" reporter:datatype="int" />
-                       <field name="expire_year" reporter:datatype="int" />
-                       <field name="id" reporter:datatype="id" />
-                       <field name="note" reporter:datatype="text"/>
-                       <field name="payment_ts" reporter:datatype="timestamp"/>
-                       <field name="xact" reporter:datatype="link"/>
-                       <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
-                       <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
-               <fields oils_persist:primary="name">
-                       <field reporter:label="Name" name="name" reporter:datatype="text" />
-                       <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
-                       <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
-                       <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
-                <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
-               <fields oils_persist:primary="alias">
-                       <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
-                       <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
-                       <field reporter:label="Field" name="field" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
-                <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
-               <fields oils_persist:primary="name">
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
-                       <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
-                       <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
-                       <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
-                       <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
-                       <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
-                       <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
-                       <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
-               </fields>
-               <links>
-                       <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_METABIB_CLASS" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
-                <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
-                       <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
-                       <field reporter:label="Weight" name="weight" reporter:datatype="int" />
-                       <field reporter:label="Format" name="format" reporter:datatype="link"/>
-                       <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
-                       <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
-                       <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
-                       <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
-                       <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
-                       <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
-               </fields>
-               <links>
-                       <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_METABIB_FIELD" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
-                <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
-                       <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
-                       <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
-                       <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
-                       <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
-                       <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
-                       <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
-                       <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
-                       <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
-                       <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
-               </fields>
-               <links>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
-                               <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
-                               <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
-                               <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="xpath" reporter:datatype="text"/>
-                       <field name="format" reporter:datatype="link"/>
-                       <field name="first_word" reporter:datatype="bool" />
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
-                <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="code" oils_persist:sequence="">
-                       <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_MARC_CODE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_MARC_CODE" global_required="true"/>
-                <delete permission="DELETE_MARC_CODE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="code" oils_persist:sequence="">
-                       <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
-                       <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_MARC_CODE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_MARC_CODE" global_required="true"/>
-                <delete permission="ADMIN_MARC_CODE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-    <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
-        <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
-            <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
-            <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
-        </fields>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve/>
-            </actions>
-        </permacrud>
-    </class>
-       <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-                       <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
-                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
-                <retrieve/>
-                <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
-                <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-                       <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
-                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
-                <retrieve/>
-                <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
-                <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
-                       <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
-                       <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
-                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
-                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
-                       <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
-                       <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
-                       <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
-                       <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
-                       <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
-                       <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
-                       <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
-                       <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
-                       <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_VOLUME" context_field="owning_lib"/>
-                <retrieve/>
-                <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
-                <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
-                       <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="URI" name="href" reporter:datatype="text"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-                       <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
-                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
-                       <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
-        </links>
-       </class>
-       <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="URI" name="uri" reporter:datatype="int"/>
-                       <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
-                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
-               </links>
-       </class>
-       <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="value" oils_persist:i18n="true" />
-               </fields>
-               <links/>
-       </class>
-       <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
-               <fields oils_persist:primary="usr" oils_persist:sequence="">
-                       <field name="balance_owed" reporter:datatype="money" />
-                       <field name="total_owed" reporter:datatype="money" />
-                       <field name="total_paid" reporter:datatype="money" />
-                       <field name="usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER">
-                    <context link="usr" field="home_ou"/>
-                </retrieve>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
-                       <field name="collector" />
-                       <field name="enter_time" reporter:datatype="timestamp"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="location" reporter:datatype="link"/>
-                       <field name="usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="collector" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="location" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="money.collections_tracker.create" context_field="location"/>
-                <retrieve permission="money.collections_tracker.create" context_field="location"/> 
-                <delete permission="money.collections_tracker.create" context_field="location"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
-                       <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
-                       <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
-                       <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
-                       <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
-                       <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
-                       <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
-                       <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
-                       <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
-                       <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
-                       <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
-                       <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
-                       <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
-                       <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
-                       <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
-                       <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
-                       <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
-                       <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
-                       <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
-                       <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
-                       <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
-                       <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
-                       <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
-                       <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
-                       <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
-                       <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_MARC" global_required="true"/>
-               <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
-                <delete permission="DELETE_RECORD" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
-               <fields oils_persist:primary="id">
-                       <field name="dow_0_close" />
-                       <field name="dow_0_open" />
-                       <field name="dow_1_close" />
-                       <field name="dow_1_open" />
-                       <field name="dow_2_close" />
-                       <field name="dow_2_open" />
-                       <field name="dow_3_close" />
-                       <field name="dow_3_open" />
-                       <field name="dow_4_close" />
-                       <field name="dow_4_open" />
-                       <field name="dow_5_close" />
-                       <field name="dow_5_open" />
-                       <field name="dow_6_close" />
-                       <field name="dow_6_open" />
-                       <field name="id" reporter:datatype="id" />
-                       <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="might_have" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
-                <retrieve/>
-                <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
-                <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="record" reporter:datatype="link"/>
-                       <field name="label" reporter:datatype="text"/>
-                       <field name="label_sortkey" reporter:datatype="text"/>
-                       <field name="deleted" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
-                <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="target_copy" reporter:datatype="link" />
-                       <field name="part" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
-                <retrieve/>
-                <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
-                <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
-                       <field name="close_end" reporter:datatype="timestamp" />
-                       <field name="close_start" reporter:datatype="timestamp" />
-                       <field name="id" reporter:datatype="id" />
-                       <field name="org_unit" reporter:datatype="org_unit"/>
-                       <field name="reason" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
-                <retrieve/>
-                <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
-                <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
-                       <field name="extended" reporter:datatype="interval"/>
-                       <field name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field name="max_renewals" reporter:datatype="int" />
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="normal" reporter:datatype="interval"/>
-                       <field name="shrt" reporter:datatype="interval"/>
-               </fields>
-               <links>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_CIRC_DURATION" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
-                <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
-                       <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
-            <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-            <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_CIRC_DURATION" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
-                <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
-            </actions>
-               </permacrud>
-       </class>
-
-       <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
-                       <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
-            <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
-               </fields>
-               <links>
-                       <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_CIRC_DURATION" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
-                <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
-            </actions>
-               </permacrud>
-       </class>
-
-       <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
-                       <field name="balance_owed" reporter:datatype="money"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="last_billing_note" reporter:datatype="text"/>
-                       <field name="last_billing_ts" reporter:datatype="timestamp"/>
-                       <field name="last_billing_type" reporter:datatype="text"/>
-                       <field name="last_payment_note" reporter:datatype="text"/>
-                       <field name="last_payment_ts" reporter:datatype="timestamp"/>
-                       <field name="last_payment_type" reporter:datatype="text"/>
-                       <field name="total_owed" reporter:datatype="money"/>
-                       <field name="total_paid" reporter:datatype="money"/>
-                       <field name="usr" reporter:datatype="link"/>
-                       <field name="xact_finish" reporter:datatype="timestamp" />
-                       <field name="xact_start" reporter:datatype="timestamp" />
-                       <field name="xact_type" reporter:datatype="text"/>
-                       <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="billing_location" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
-                       <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
-                       <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
-                       <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
-                       <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_USER_TRANSACTIONS">
-                                       <context link="usr" field="home_ou" />
-                               </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
-                       <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
-                       <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
-                       <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
-                       <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
-                       <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
-                       <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
-                       <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
-                       <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
-                       <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
-                       <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
-                       <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
-                       <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
-                       <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
-                       <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="User ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
-                       <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
-                       <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
-                       <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
-                       <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
-                       <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
-                       <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
-                       <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
-                       <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
-                       <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
-                       <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
-                       <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
-                       <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
-                       <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
-                       <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
-                       <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
-                       <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
-                       <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
-                       <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
-                       <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
-                       <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
-                       <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
-                       <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
-                       <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
-                       <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
-                       <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
-                       <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
-                       <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
-                       <link field="card" reltype="has_a" key="id" map="" class="ac"/>
-                       <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
-                       <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
-                       <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
-                       <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
-                       <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
-                       <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
-                       <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
-                       <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
-                       <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
-                       <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
-                       <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
-                       <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
-                       <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
-                       <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
-                       <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
-                       <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
-                       <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
-                       <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
-                       <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
-                       <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
-                       <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_USER" context_field="home_ou" />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
-                       <field name="id" reporter:label="ID" reporter:datatype="id" />
-                       <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
-                       <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
-                       <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
-                       <field name="label" reporter:label="Label" reporter:datatype="text"/>
-                       <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
-                       <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
-                       <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
-        </fields>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
-                               <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
-                       <field name="id" reporter:label="ID" reporter:datatype="id" />
-                       <field name="usr" reporter:label="User" reporter:datatype="link" />
-                       <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
-                       <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
-        </fields>
-        <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="RUN_REPORTS">
-                                       <context link="usr" field="home_ou" />
-                               </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
-                       <field name="id" reporter:label="ID" reporter:datatype="id" />
-                       <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
-                       <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
-                       <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
-                       <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field name="layout" reporter:label="Layout" reporter:datatype="text" />
-        </fields>
-        <links>
-                       <link field="usr" reltype="might_have" key="id" map="" class="au"/>
-                       <link field="org" reltype="might_have" key="id" map="" class="aou"/>
-                       <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
-                                       <context link="usr" field="home_ou" />
-                                       <context link="ws" field="owning_lib" />
-                               </retrieve>
-                               <create permission="ADMIN_TOOLBAR" context_field="org">
-                                       <context link="usr" field="home_ou" />
-                                       <context link="ws" field="owning_lib" />
-                               </create>
-                               <update permission="ADMIN_TOOLBAR" context_field="org">
-                                       <context link="usr" field="home_ou" />
-                                       <context link="ws" field="owning_lib" />
-                               </update>
-                               <delete permission="ADMIN_TOOLBAR" context_field="org">
-                                       <context link="usr" field="home_ou" />
-                                       <context link="ws" field="owning_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
-               <fields oils_persist:primary="name">
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
-                               <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
-               <fields oils_persist:primary="name">
-                       <field name="name" reporter:label="Name" reporter:datatype="text"/>
-                       <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
-                       <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
-                       <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
-                       <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
-                       <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="name" reltype="has_many" key="name" map="" class="aus"/>
-                       <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
-                               <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
-               <fields oils_persist:primary="name">
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="datatype" reporter:datatype="text"/>
-                       <field name="view_perm" reporter:datatype="link"/>
-                       <field name="update_perm" reporter:datatype="link"/>
-                       <field name="fm_class" reporter:datatype="text"/>
-                       <field name="grp" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="name" reltype="has_many" key="name" map="" class="aous"/>
-                       <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
-                       <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
-                       <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
-                               <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
-                       <field name="id" />
-                       <field name="name"  reporter:datatype="text"/>
-                       <field name="org_unit" reporter:datatype="org_unit"/>
-                       <field name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="name" reltype="has_a" key="name" map="" class="coust"/>
-               </links>
-       </class>
-       <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
-                       <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Note ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
-                       <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
-                       <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
-                       <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_COPY_NOTE">
-                    <context link="owning_copy" field="circ_lib"/>
-                </create>
-                <retrieve permission="VIEW_COPY_NOTES">
-                    <context link="owning_copy" field="circ_lib"/>
-                </retrieve>
-                <update permission="UPDATE_COPY_NOTE">
-                    <context link="owning_copy" field="circ_lib"/>
-                </update>
-                <delete permission="DELETE_COPY_NOTE">
-                    <context link="owning_copy" field="circ_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
-                       <field reporter:label="Field ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
-                       <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
-                       <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-       </class>
-       <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
-                       <field name="fingerprint"  reporter:datatype="text"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="master_record" reporter:datatype="link"/>
-                       <field name="mods"  reporter:datatype="text"/>
-                       <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
-               </links>
-       </class>
-       <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
-                       <field name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
-                <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
-               <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
-                       <field name="code"  reporter:datatype="text"/>
-                       <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="id" reporter:selector="code" reporter:datatype="id"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_PERM" global_required="true"/>
-                <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
-                <update permission="UPDATE_PERM" global_required="true"/>
-                <delete permission="DELETE_PERM" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="metarecord" reporter:datatype="link"/>
-                       <field name="source" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
-               </links>
-       </class>
-       <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="field" reporter:datatype="link"/>
-                       <field name="source" reporter:datatype="link"/>
-                       <field name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-       </class>
-       <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="value" reporter:datatype="text"/>
-                       <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
-               </links>
-       </class>
-       <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="entry" reporter:datatype="link"/>
-                       <field name="def" reporter:datatype="link"/>
-                       <field name="source" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
-                       <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-       </class>
-       <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="entry" reporter:datatype="link"/>
-                       <field name="simple_heading" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
-                       <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
-               </links>
-       </class>
-       <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
-               <oils_persist:source_definition>
-                       SELECT * FROM metabib.author_field_entry
-                                               UNION ALL
-                       SELECT * FROM metabib.keyword_field_entry
-                                               UNION ALL
-                       SELECT * FROM metabib.identifier_field_entry
-                                               UNION ALL
-                       SELECT * FROM metabib.title_field_entry
-                                               UNION ALL
-                       SELECT * FROM metabib.subject_field_entry
-                                               UNION ALL
-                       SELECT * FROM metabib.series_field_entry
-               </oils_persist:source_definition>
-               <fields>
-                       <field name="field" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="source" reporter:datatype="link"/>
-                       <field name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-       </class>
-       <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
-                       <field name="field" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="source" reporter:datatype="link"/>
-                       <field name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-       </class>
-       <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
-                       <field name="accepting_usr" reporter:datatype="link"/>
-                       <field name="amount" reporter:datatype="money" />
-                       <field name="amount_collected" reporter:datatype="money" />
-                       <field name="cash_drawer" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="note"  reporter:datatype="text"/>
-                       <field name="payment_ts" reporter:datatype="timestamp"/>
-                       <field name="xact" reporter:datatype="link"/>
-                       <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
-                       <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
-                       <field name="accepting_usr" reporter:datatype="link"/>
-                       <field name="amount" reporter:datatype="money" />
-                       <field name="amount_collected" reporter:datatype="money" />
-                       <field name="id" reporter:datatype="id" />
-                       <field name="note"  reporter:datatype="text"/>
-                       <field name="payment_ts" reporter:datatype="timestamp"/>
-                       <field name="xact" reporter:datatype="link"/>
-                       <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
-                       <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
-                       <field name="accepting_usr" reporter:datatype="link"/>
-                       <field name="amount" reporter:datatype="money" />
-                       <field name="amount_collected" reporter:datatype="money" />
-                       <field name="id" reporter:datatype="id" />
-                       <field name="note"  reporter:datatype="text"/>
-                       <field name="payment_ts" reporter:datatype="timestamp"/>
-                       <field name="xact" reporter:datatype="link"/>
-                       <field name="billing" reporter:datatype="link"/>
-                       <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
-                       <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-                       <link field="billing" reltype="might_have" key="id" class="mb"/>
-               </links>
-       </class>
-       <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
-                       <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
-                       <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
-                       <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
-                       <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
-                       <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
-                       <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
-                       <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
-                       <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
-               </links>
-       </class>
-
-       <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
-                       <field name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field name="name"  reporter:datatype="text"/>
-                       <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="block_list" reporter:datatype="text"/>
-                       <field name="staff_alert" reporter:datatype="bool"/>
-                       <field name="org_depth" reporter:datatype="int"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
-                <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
-                <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
-                <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
-               <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
-                       <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
-                       <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
-                       <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
-                       <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
-                       <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
-               </fields>
-               <links>
-                       <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
-                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
-                <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
-                <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
-                <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
-                       <field name="holdable" reporter:datatype="bool"/>
-                       <field name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="opac_visible" reporter:datatype="bool"/>
-            <field name="copy_active" reporter:datatype="bool"/>
-           <field name="restrict_copy_delete" reporter:datatype="bool"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_COPY_STATUS" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_COPY_STATUS" global_required="true"/>
-                <delete permission="DELETE_COPY_STATUS" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
-                       <field name="id" reporter:datatype="id" reporter:label="ID" />
-                       <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
-                       <field name="usr" reporter:datatype="link" reporter:label="User"/>
-                       <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
-                       <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
-                       <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
-                       <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
-                       <field name="note" reporter:datatype="text" reporter:label="Note"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
-                               <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
-                               <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
-                               <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
-                       <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
-                       <field reporter:label="City" name="city"  reporter:datatype="text"/>
-                       <field reporter:label="Country" name="country"  reporter:datatype="text"/>
-                       <field reporter:label="County" name="county"  reporter:datatype="text"/>
-                       <field reporter:label="Address ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
-                       <field reporter:label="State" name="state"  reporter:datatype="text"/>
-                       <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
-                       <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
-                       <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
-                       <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
-                       <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
-               </links>
-       </class>
-       <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
-                       <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
-                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
-                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
-                       <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
-                       <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
-                       <field reporter:label="City" name="city"  reporter:datatype="text"/>
-                       <field reporter:label="County" name="county"  reporter:datatype="text"/>
-                       <field reporter:label="State" name="state"  reporter:datatype="text"/>
-                       <field reporter:label="Country" name="country"  reporter:datatype="text"/>
-                       <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
-                       <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
-                       <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
-                               <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
-                               <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
-                               <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-
-       <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
-                       <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
-                       <field reporter:label="Target" name="target" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-
-       <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
-                       <field name="call_number" />
-                       <field name="create_date" reporter:datatype="timestamp"/>
-                       <field name="creator" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="pub" reporter:datatype="bool"/>
-                       <field name="title"  reporter:datatype="text"/>
-                       <field name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_VOLUME_NOTE">
-                    <context link="call_number" field="owning_lib"/>
-                </create>
-                <retrieve permission="VIEW_VOLUME_NOTES">
-                    <context link="call_number" field="owning_lib"/>
-                </retrieve>
-                <update permission="UPDATE_VOLUME_NOTE">
-                    <context link="call_number" field="owning_lib"/>
-                </update>
-                <delete permission="DELETE_VOLUME_NOTE">
-                    <context link="call_number" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
-                       <field name="create_date" reporter:datatype="timestamp"/>
-                       <field name="creator" reporter:datatype="link"/>
-                       <field name="edit_date" reporter:datatype="timestamp"/>
-                       <field name="editor" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="record" reporter:datatype="link"/>
-                       <field name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="are"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
-                <retrieve/>
-                <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
-                <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
-        <oils_persist:source_definition>
-SELECT  usr,
-        SUM(
-            CASE
-                WHEN (
-                    ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
-                    AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
-                ) THEN 1
-                ELSE 0
-            END
-        ) AS out,
-
-        SUM(
-            CASE
-                WHEN (
-                    ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
-                    AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
-                ) THEN 1
-                ELSE 0
-            END
-        ) AS overdue,
-
-        SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
-        SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
-        SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
-  FROM  action.circulation
-  WHERE checkin_time IS NULL
-  GROUP BY 1
-        </oils_persist:source_definition>
-        <fields oils_persist:primary="usr">
-            <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
-            <field reporter:label="Out" name="out" reporter:datatype="text"/>
-            <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
-            <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
-            <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
-            <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
-        </fields>
-        <links>
-            <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-        </links>
-       </class>
-       <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
-        <oils_persist:source_definition>
-SELECT  usr,
-        STRING_AGG(
-            CASE
-                WHEN (
-                    ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
-                    AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
-                ) THEN id::TEXT
-                ELSE '0'
-            END
-        ,',') AS out,
-
-        STRING_AGG(
-            CASE
-                WHEN (
-                    ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
-                    AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
-                ) THEN id::TEXT
-                ELSE '0'
-            END
-        ,',') AS overdue,
-
-        STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
-        STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
-        STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
-  FROM  action.circulation
-  WHERE checkin_time IS NULL
-  GROUP BY 1
-        </oils_persist:source_definition>
-        <fields oils_persist:primary="usr">
-            <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
-            <field reporter:label="Out" name="out" reporter:datatype="text"/>
-            <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
-            <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
-            <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
-            <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
-        </fields>
-        <links>
-            <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-        </links>
-       </class>
-       <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
-                       <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
-                       <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
-                       <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
-                       <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
-                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
-                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
-                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
-                       <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
-                       <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
-                       <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
-                       <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
-                       <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
-                       <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
-                       <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
-                       <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
-                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
-                       <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
-                       <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
-                       <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
-                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
-                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
-                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
-                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
-                       <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
-                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
-                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
-                       <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
-                       <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
-                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
-                       <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
-                       <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
-                       <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
-                       <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
-                       <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
-                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
-                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
-                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
-                       <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
-                       <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
-                       <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
-                       <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
-                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
-                       <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
-                       <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
-                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
-                       <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
-                       <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
-                       <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
-                       <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
-                       <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
-                       <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
-                       <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
-                       <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
-                       <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
-                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
-                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
-                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
-                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
-                       <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
-                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
-                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
-                       <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
-                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
-                       <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
-               </links>
-       </class>
-       <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
-                       <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
-                       <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
-                       <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
-                       <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
-                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
-                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
-                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
-                       <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
-                       <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
-                       <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
-                       <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
-                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
-                       <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
-                       <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
-                       <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
-                       <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
-                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
-                       <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
-                       <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
-                       <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
-                       <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
-                       <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
-                       <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
-                       <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
-                       <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
-                       <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
-                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
-                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
-                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
-                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
-                       <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
-                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
-                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
-                       <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
-                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
-                       <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
-                       <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
-                       <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
-               </links>
-       </class>
-
-       <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">
-               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
-                       <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
-                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
-                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
-                       <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
-                       <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
-                       <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
-                       <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
-                       <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
-                       <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
-                               <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
-                               <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
-                               <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
-               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
-                       <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
-                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
-                       <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
-                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
-                       <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
-                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
-                       <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
-                       <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="type" reltype="has_a" key="id" map="" class="brt"/>
-                       <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
-                       <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
-                       <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
-                               <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
-                               <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
-                               <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
-                       </actions>
-               </permacrud>
-       </class>
-       
-       <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">
-               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
-                       <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
-                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
-                       <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
-                       <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
-                       <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
-                       <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
-                               <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
-                               <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
-                               <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
-                       </actions>
-               </permacrud>
-       </class>
-       
-       <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">
-               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
-                       <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
-                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
-                       <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
-                       <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
-                       <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
-                       <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
-                               <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
-                               <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
-                               <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
-                       </actions>
-               </permacrud>
-       </class>
-       
-       <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
-                       <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
-                       <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
-                       <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
-                       <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
-                       <link field="value" reltype="has_a" key="id" map="" class="brav"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
-                    <context link="resource" field="owner" />
-                </create>
-                               <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
-                    <context link="resource" field="owner" />
-                </retrieve>
-                               <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
-                    <context link="resource" field="owner" />
-                </update>
-                               <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
-                    <context link="resource" field="owner" />
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-       
-       <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
-                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
-                       <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
-                       <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
-                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
-                       <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
-                       <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
-                       <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
-                       <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
-                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
-                       <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
-                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
-                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
-                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
-                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
-                       <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
-                       <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
-                       <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
-                       <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
-                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
-                       <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
-                       <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
-                               <retrieve permission="STAFF_LOGIN" global_required='true'/>
-                               <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
-                               <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
-                       </actions>
-               </permacrud>
-       </class>
-       
-       <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
-                       <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
-                       <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
-                       <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
-                               <retrieve permission="STAFF_LOGIN" global_required='true'/>
-                               <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
-                               <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
-                       <field name="bucket" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="target_call_number" reporter:datatype="link" />
-                       <field name="create_time" reporter:datatype="timestamp" />
-                       <field name="pos" reporter:datatype="int" />
-                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
-                       <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
-            <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
-               </links>
-       </class>
-       <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="item" reporter:datatype="link"/>
-                       <field name="note" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
-               </links>
-       </class>
-       <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
-                       <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="btype" reporter:datatype="text"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="description" reporter:datatype="text"/>
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="pub" reporter:datatype="bool"/>
-                       <field name="create_time" reporter:datatype="timestamp" />
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
-               </links>
-       </class>
-       <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="bucket" reporter:datatype="link"/>
-                       <field name="note" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
-               </links>
-       </class>
-       <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
-                       <field name="hold" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="target_copy" reporter:datatype="link"/>
-                       <field name="proximity" reporter:datatype="number"/>
-               </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-               </links>
-       </class>
-       <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
-                       <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
-                       <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
-                       <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
-                       <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
-                       <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
-               </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-                       <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_HOLD_NOTIFICATION">
-                                       <context link="hold" jump="usr" field="home_ou" />
-                               </create>
-                <retrieve permission="VIEW_HOLD_NOTIFICATION">
-                                       <context link="hold" jump="usr" field="home_ou" />
-                               </retrieve>
-                <update permission="CREATE_HOLD_NOTIFICATION">
-                                       <context link="hold" jump="usr" field="home_ou" />
-                               </update>
-                <delete permission="CREATE_HOLD_NOTIFICATION">
-                                       <context link="hold" jump="usr" field="home_ou" />
-                               </delete>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
-                       <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
-                       <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
-                       <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
-                       <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
-                       <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
-                       <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
-                       <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
-                       <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
-                <retrieve/>
-                <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
-                <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
-                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
-                       <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
-            <field reporter:label="Position" name="pos" reporter:datatype="int"/>
-            <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
-            <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
-                <retrieve/>
-                <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
-                <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-            <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
-            <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
-                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_COPY_LOCATION_GROUP">
-                                       <context link="lgroup" field="owner" />
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_COPY_LOCATION_GROUP">
-                                       <context link="lgroup" field="owner" />
-                </update>
-                <delete permission="ADMIN_COPY_LOCATION_GROUP">
-                                       <context link="lgroup" field="owner" />
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-    <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
-        <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
-            <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
-            <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
-            <field reporter:label="Position" name="position" reporter:datatype="int"/>
-        </fields>
-        <links>
-            <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
-            <link field="org" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                               <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
-                <retrieve/>
-                               <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
-                               <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
-            </actions>
-        </permacrud>
-    </class>
-
-       <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
-               <fields>
-                       <field name="sre_id" oils_persist:virtual="true" />
-                       <field name="location" oils_persist:virtual="true" />
-                       <field name="owning_lib" oils_persist:virtual="true" />
-                       <field name="basic_holdings" oils_persist:virtual="true" />
-                       <field name="basic_holdings_add" oils_persist:virtual="true" />
-                       <field name="supplement_holdings" oils_persist:virtual="true" />
-                       <field name="supplement_holdings_add" oils_persist:virtual="true" />
-                       <field name="index_holdings" oils_persist:virtual="true" />
-                       <field name="index_holdings_add" oils_persist:virtual="true" />
-                       <field name="online" oils_persist:virtual="true" />
-                       <field name="missing" oils_persist:virtual="true" />
-                       <field name="incomplete" oils_persist:virtual="true" />
-               </fields>
-       </class>
-
-       <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
-                       <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
-                       <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
-                       <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
-                       <field reporter:label="Source" name="source" reporter:datatype="int"/>
-                       <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
-                               <retrieve/>
-                               <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
-                               <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
-                       <field reporter:label="Type" name="type" reporter:datatype="text"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
-                       <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
-                       <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
-                       <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
-                       <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
-                       <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
-                       <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
-                       <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
-                       <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
-                       <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
-                       <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
-                       <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
-                                       <context link="subscription" field="owning_lib" />
-                               </create>
-                               <retrieve />
-                               <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
-                                       <context link="subscription" field="owning_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
-                                       <context link="subscription" field="owning_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
-                       <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
-                       <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
-                       <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
-                       <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
-                       <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
-                               <retrieve />
-                               <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
-                               <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
-                       <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
-                       <field reporter:label="Title" name="title" reporter:datatype="text"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-
-       <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
-                       <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
-                       <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
-                       <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-                       <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
-                       <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
-                       <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
-                       <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
-                       <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
-                       <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
-                       <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
-                       <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
-                       <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
-                       <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
-                       <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
-                       <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
-                       <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
-                       <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
-                       <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
-                       <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
-                       <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
-                       <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
-                               <retrieve />
-                               <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
-                               <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
-                       <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
-                       <field reporter:label="Title" name="title" reporter:datatype="text"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </create>
-                               <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </retrieve>
-                               <update permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
-                       <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
-                       <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
-                       <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
-                       <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_STREAM">
-                                       <context link="distribution" field="holding_lib" />
-                               </create>
-                               <retrieve />
-                               <update permission="ADMIN_SERIAL_STREAM">
-                                       <context link="distribution" field="holding_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_STREAM">
-                                       <context link="distribution" field="holding_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
-                       <field reporter:label="Position" name="pos" reporter:datatype="int"/>
-                       <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
-                       <field reporter:label="Department" name="department" reporter:datatype="text"/>
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
-                       <link field="reader" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_STREAM">
-                                       <context link="stream" jump="distribution" field="holding_lib" />
-                               </create>
-                               <retrieve permission="RECEIVE_SERIAL">
-                                       <context link="stream" jump="distribution" field="holding_lib" />
-                               </retrieve>
-                               <update permission="ADMIN_SERIAL_STREAM">
-                                       <context link="stream" jump="distribution" field="holding_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_STREAM">
-                                       <context link="stream" jump="distribution" field="holding_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
-                       <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-                       <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
-                       <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
-                       <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
-                       <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
-                       <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
-                       <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
-                       <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_SUBSCRIPTION">
-                                       <context link="subscription" field="owning_lib" />
-                               </create>
-                               <retrieve/>
-                               <update permission="ADMIN_SERIAL_SUBSCRIPTION">
-                                       <context link="subscription" field="owning_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
-                                       <context link="subscription" field="owning_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
-                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
-                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
-                       <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
-                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
-                       <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
-                       <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
-                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
-                       <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
-                       <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
-                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
-                       <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
-                       <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
-                       <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
-                       <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
-                       <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
-                       <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
-                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
-                       <field reporter:label="Price" name="price" reporter:datatype="money" />
-                       <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
-                       <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
-                       <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
-                       <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
-                       <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
-                       <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
-                       <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
-                       <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
-                       <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
-                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
-                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
-                       <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
-                       <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
-                       <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
-                       <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
-                       <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
-                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
-                       <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
-                               <retrieve/>
-                               <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
-                               <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
-                       <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
-                       <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
-                       <field reporter:label="URI" name="uri" reporter:datatype="link"/>
-                       <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
-                       <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
-                       <field reporter:label="Status" name="status" reporter:datatype="text"/>
-                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
-                       <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
-                       <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
-                       <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
-                       <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_ITEM">
-                                       <context link="stream" jump="distribution" field="holding_lib" />
-                               </create>
-                               <retrieve permission="ADMIN_SERIAL_ITEM">
-                                       <context link="stream" jump="distribution" field="holding_lib" />
-                               </retrieve>
-                               <update permission="ADMIN_SERIAL_ITEM">
-                                       <context link="stream" jump="distribution" field="holding_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_ITEM">
-                                       <context link="stream" jump="distribution" field="holding_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Item" name="item" reporter:datatype="link"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
-                       <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
-                       <field reporter:label="Title" name="title" reporter:datatype="text"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-               <!-- Not available via PCRUD at this time -->
-       </class>
-       <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
-               <fields>
-                       <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
-                       <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
-                       <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
-                       <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
-                       <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
-               </fields>
-               <links>
-                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
-               </links>
-       </class>
-       <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
-                       <field name="id" reporter:label="ID" reporter:datatype="id" />
-                       <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
-                       <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
-                       <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
-                       <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
-                       <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
-                       <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
-               </fields>
-               <links>
-                       <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
-               </links>
-       </class>
-       <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
-                       <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
-                       <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
-                       <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </create>
-                               <retrieve/>
-                               <update permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
-                       <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
-                       <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
-                       <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </create>
-                               <retrieve/>
-                               <update permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
-               <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
-                       <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
-                       <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
-                       <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </create>
-                               <retrieve/>
-                               <update permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </update>
-                               <delete permission="ADMIN_SERIAL_DISTRIBUTION">
-                                       <context link="distribution" field="holding_lib" />
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="owning_copy" reporter:datatype="link"/>
-                       <field name="stat_cat" reporter:datatype="link"/>
-                       <field name="stat_cat_entry" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
-                       <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
-               </links>
-       </class>
-       <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
-                       <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_MARC_CODE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_MARC_CODE" global_required="true"/>
-                <delete permission="ADMIN_MARC_CODE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
-                       <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_MARC_CODE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_MARC_CODE" global_required="true"/>
-                <delete permission="DELETE_MARC_CODE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">
-               <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
-                       <field reporter:label="ID" name="id"  reporter:datatype="id"/>
-                       <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
-                       <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
-                       <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
-                       <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
-               </fields>
-               <links>
-            <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
-                <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
-                <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
-                <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="name" reporter:datatype="text"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_LASSO" global_required="true"/>
-                <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
-                <update permission="UPDATE_LASSO" global_required="true"/>
-                <delete permission="DELETE_LASSO" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="lasso" reporter:datatype="link"/>
-                       <field name="org_unit" reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_LASSO_MAP" global_required="true"/>
-                <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
-                <update permission="UPDATE_LASSO_MAP" global_required="true"/>
-                <delete permission="DELETE_LASSO_MAP" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
-                       <field name="id" reporter:label="ID" reporter:datatype="id" />
-                       <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
-                       <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
-                       <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
-                       <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
-                       <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
-                       <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
-                       <field name="pos" reporter:label="Position" reporter:datatype="int" />
-                       <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
-                       <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
-               </fields>
-               <links>
-                       <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
-                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
-                <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
-                <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
-                <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="from_org" reporter:datatype="org_unit"/>
-                       <field name="to_org" reporter:datatype="org_unit"/>
-                       <field name="prox" reporter:datatype="int" />
-               </fields>
-               <links>
-                       <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-       <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
-                       <field reporter:label="Record" name="record" reporter:datatype="link"/>
-                       <field reporter:label="Total Results" name="total" reporter:datatype="int" />
-                       <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
-                       <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
-                       <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
-                       <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
-               </fields>
-               <links/>
-       </class>
-       <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
-                       <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text"/>
-                       <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
-                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
-                       <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
-                       <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
-                       <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_SURVEY" context_field="owner"/>
-                <retrieve/>
-                <update permission="ADMIN_SURVEY" context_field="owner"/>
-                <delete permission="ADMIN_SURVEY" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
-                       <field name="address_type"  reporter:datatype="text"/>
-                       <field name="city"  reporter:datatype="text"/>
-                       <field name="country"  reporter:datatype="text"/>
-                       <field name="county"  reporter:datatype="text"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="org_unit" reporter:datatype="org_unit"/>
-                       <field name="post_code"  reporter:datatype="text"/>
-                       <field name="state"  reporter:datatype="text"/>
-                       <field name="street1"  reporter:datatype="text"/>
-                       <field name="street2"  reporter:datatype="text"/>
-                       <field name="valid" reporter:datatype="bool"/>
-                       <field name="san" reporter:datatype="text" reporter:label="SAN"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
-                <retrieve/>
-                <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
-                <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
-                       <field name="id" reporter:datatype="id" reporter:selector="label"/>
-                       <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="query_text" reporter:datatype="text"/>
-               </fields>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
-                       <field name="id" reporter:datatype="id" reporter:selector="label"/>
-                       <field name="owner" reporter:datatype="org_unit"/>
-                       <field name="code" reporter:datatype="text"/>
-                       <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="create_date" reporter:datatype="timestamp"/>
-                       <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
-                <retrieve/>
-                <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
-                <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
-                       <field name="id" reporter:datatype="id"/>
-                       <field name="grp" reporter:datatype="link"/>
-                       <field name="pos" reporter:datatype="int"/>
-                       <field name="query" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
-                       <link field="query" reltype="has_a" key="id" map="" class="asq"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_SEARCH_FILTER_GROUP">
-                    <context link="grp" field="owner"/>
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_SEARCH_FILTER_GROUP">
-                    <context link="grp" field="owner"/>
-                </update>
-                <delete permission="ADMIN_SEARCH_FILTER_GROUP">
-                    <context link="grp" field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <!-- A note: Please update alhr and ahopl when updating ahr -->
-       <class id="ahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
-                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />
-                       <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
-                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Currently Targeted Copy" name="current_copy" />
-                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
-                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
-                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
-                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
-                       <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
-                       <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
-                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
-                       <field reporter:label="Item Selection Depth" name="selection_depth" />
-                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
-                       <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
-                       <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
-                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
-                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
-                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
-                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
-                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
-                       <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
-                       <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
-                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
-                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
-                       <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
-                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
-               <oils_persist:source_definition><![CDATA[
-               SELECT
-                       ahr.*,
-                       COALESCE(acplo.position, acpl_ordered.fallback_position) AS
-                               copy_location_order_position,
-                       CASE WHEN au.alias IS NOT NULL THEN
-                               au.alias
-                       ELSE
-                               au.first_given_name
-                       END AS usr_alias_or_first_given_name,
-                       au.first_given_name AS usr_first_given_name,
-                       au.second_given_name AS usr_second_given_name,
-                       au.family_name AS usr_family_name,
-                       au.prefix AS usr_prefix,
-                       au.suffix AS usr_suffix,
-                       au.alias AS usr_alias,
-                       CASE WHEN au.alias IS NOT NULL THEN
-                               au.alias
-                       ELSE
-                               REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
-                                       COALESCE(au.family_name, ''),
-                                       COALESCE(au.suffix, ''),
-                                       ', ',
-                                       COALESCE(au.prefix, ''),
-                                       COALESCE(au.first_given_name, ''),
-                                       COALESCE(au.second_given_name, '')
-                               ], ' '), E'\\s+,', ',')
-                       END AS usr_alias_or_display_name,
-                       REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
-                               COALESCE(au.family_name, ''),
-                               COALESCE(au.suffix, ''),
-                               ', ',
-                               COALESCE(au.prefix, ''),
-                               COALESCE(au.first_given_name, ''),
-                               COALESCE(au.second_given_name, '')
-                       ], ' '), E'\\s+,', ',') AS usr_display_name,
-                       TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
-                               AS call_number_label,
-                       siss.label AS issuance_label,
-                       (ahr.usr <> ahr.requestor) AS is_staff_hold,
-                       ahcm_1.copy_count AS potential_copies
-               FROM action.hold_request ahr
-               JOIN asset.copy acp ON (acp.id = ahr.current_copy)
-               JOIN asset.call_number acn ON (acp.call_number = acn.id)
-               JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
-               JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
-               JOIN actor.usr au ON (au.id = ahr.usr)
-               JOIN (
-                       SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
-                       FROM asset.copy_location
-               ) acpl_ordered ON (acpl_ordered.id = acp.location)
-               LEFT JOIN actor.usr_standing_penalty ausp 
-                       ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
-               LEFT JOIN config.standing_penalty csp
-                       ON (
-                               csp.id = ausp.standing_penalty AND 
-                               csp.block_list LIKE '%CAPTURE%' AND (
-                                       (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
-                                       (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
-                                               SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
-                                       )
-                               )
-                       )
-               JOIN (
-                       SELECT COUNT(target_copy) AS copy_count, hold
-                       FROM action.hold_copy_map
-                       GROUP BY 2
-               ) ahcm_1 ON (ahcm_1.hold = ahr.id)
-               LEFT JOIN serial.issuance siss
-                       ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
-               LEFT JOIN asset.copy_location_order acplo
-                       ON (acp.location = acplo.location AND
-                               acp.circ_lib = acplo.org)
-               WHERE
-                       ahr.capture_time IS NULL AND
-                       ahr.cancel_time IS NULL AND
-                       csp.id IS NULL AND
-                       (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
-                       acp.status IN (0,7)
-               ]]></oils_persist:source_definition>
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />
-                       <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
-                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Currently Targeted Copy" name="current_copy" />
-                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
-                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
-                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
-                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
-                       <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
-                       <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
-                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
-                       <field reporter:label="Item Selection Depth" name="selection_depth" />
-                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
-                       <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
-                       <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
-                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
-                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
-                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
-                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
-                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
-                       <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
-                       <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
-                       <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
-                       <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
-                       <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
-                       <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
-                       <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
-                       <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
-                       <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
-                       <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
-                       <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
-                       <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
-                       <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
-                       <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
-                       <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
-                       <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
-                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
-                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
-                       <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
-                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
-               <oils_persist:source_definition>
-                       SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
-               </oils_persist:source_definition>
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />
-                       <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
-                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Currently Targeted Copy" name="current_copy" />
-                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
-                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
-                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
-                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
-                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
-                       <field reporter:label="Item Selection Depth" name="selection_depth" />
-                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
-                       <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
-                       <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
-                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
-                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
-                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
-                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
-                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
-                       <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
-                       <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
-                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
-                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
-                       <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
-                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-
-       <class id="ahrn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_note" oils_persist:tablename="action.hold_request_note" reporter:label="Hold Request Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
-                       <field reporter:label="Title" name="title" reporter:datatype="text"/>
-                       <field reporter:label="Body" name="body" reporter:datatype="text"/>
-                       <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
-                       <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
-                       <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
-                               <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
-                               <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
-                               <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
-                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />
-                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Currently Targeted Copy" name="current_copy" />
-                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
-                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
-                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
-                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
-                       <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
-                       <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
-                       <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
-                       <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
-                       <field reporter:label="Item Selection Depth" name="selection_depth" />
-                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
-                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
-                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
-                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
-                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
-                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
-                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
-                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
-                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
-                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />
-                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Currently Targeted Copy" name="current_copy" />
-                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
-                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
-                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
-                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
-                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
-                       <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
-                       <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
-                       <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
-                       <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
-                       <field reporter:label="Item Selection Depth" name="selection_depth" />
-                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
-                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
-                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
-                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
-                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
-                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
-                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
-                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
-                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
-                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="aou" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit" oils_persist:tablename="actor.org_unit" reporter:label="Organizational Unit" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
-                       <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
-                       <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
-                       <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
-                       <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
-                       <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
-                       <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
-                       <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
-                       <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
-                       <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
-                       <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
-                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
-                       <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
-                       <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
-                       <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
-                       <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
-                       <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
-                       <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
-                       <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
-                       <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
-                       <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
-                       <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
-                       <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
-                       <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
-                       <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
-                       <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
-                       <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
-                       <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
-                       <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
-                       <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
-                       <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
-                       <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
-                       <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
-                       <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
-                       <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
-                       <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
-                       <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
-                <retrieve />
-                <update permission="UPDATE_ORG_UNIT" context_field="id"/>
-                <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="aouct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree" oils_persist:tablename="actor.org_unit_custom_tree" reporter:label="Org Unit Custom Tree">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
-               </fields>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
-                               <retrieve/>
-                               <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
-                               <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="aouctn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree_node" oils_persist:tablename="actor.org_unit_custom_tree_node" reporter:label="Org Unit Custom Tree Node">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
-                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
-                       <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
-                       <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
-                       <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
-               </fields>
-               <links>
-                       <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
-                       <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
-                               <retrieve/>
-                               <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
-                               <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
-                       <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="btype" reporter:datatype="text"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="name"  reporter:datatype="text"/>
-                       <field name="description" reporter:datatype="text"/>
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="pub" reporter:datatype="bool"/>
-                       <field name="create_time" reporter:datatype="timestamp" />
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
-               </links>
-       </class>
-       <class id="ccnbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_note" oils_persist:tablename="container.call_number_bucket_note" reporter:label="Call Number Bucket Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="bucket" reporter:datatype="link"/>
-                       <field name="note" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
-               </links>
-       </class>
-       <class id="asc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
-                       <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
-                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
-                       <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
-                       <field reporter:label="Required" name="required" reporter:datatype="bool"/>
-                       <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
-                       <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="STAFF_LOGIN" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
-                       <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
-                       <field reporter:label="Card ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_USER">
-                                       <context link="usr" field="home_ou" />
-                               </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-    <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
-        <fields oils_persist:primary="field">
-            <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
-            <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
-        </fields>
-        <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
-                <retrieve />
-                <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
-                <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-       <class id="actsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
-                       <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
-                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
-                       <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
-                       <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
-                       <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
-                       <field reporter:label="Required" name="required" reporter:datatype="bool"/>
-                       <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
-                       <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
-                       <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
-                <retrieve />
-                <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
-                <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="msefe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::series_field_entry" oils_persist:tablename="metabib.series_field_entry" reporter:label="Series Field Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
-                       <field name="field" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="source" reporter:datatype="link"/>
-                       <field name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-       </class>
-       <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
-                       <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="btype" reporter:datatype="text"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="name"  reporter:datatype="text"/>
-                       <field name="description" reporter:datatype="text"/>
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="pub" reporter:datatype="bool"/>
-                       <field name="create_time" reporter:datatype="timestamp" />
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
-               </links>
-       </class>
-       <class id="cubn" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_note" oils_persist:tablename="container.user_bucket_note" reporter:label="User Bucket Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="bucket" reporter:datatype="link"/>
-                       <field name="note" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
-               </links>
-       </class>
-       <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
-                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
-                       <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
-                       <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
-                       <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="ind1" />
-                       <field name="ind2" />
-                       <field name="record" />
-                       <field name="subfield" />
-                       <field name="tag" />
-                       <field name="value" />
-               </fields>
-               <links>
-                       <link field="record" reltype="has_a" key="id" map="" class="are"/>
-               </links>
-       </class>
-       <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
-               <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
-                       <field name="id" reporter:label="ID" reporter:datatype="id" />
-                       <field name="source" reporter:label="Source Record" reporter:datatype="link" />
-                       <field name="target" reporter:label="Target Record" reporter:datatype="link" />
-                       <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="are"/>
-                       <link field="target" reltype="has_a" key="id" map="" class="are"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
-               </links>
-       </class>
-       <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
-                       <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
-                       <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
-                       <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
-                <retrieve/>
-                <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
-                <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
-            </actions>
-        </permacrud>
-
-       </class>
-       <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
-                       <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
-                       <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
-                       <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
-                       <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
-                       <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
-                       <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
-                       <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_ORG_TYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_ORG_TYPE" global_required="true"/>
-                <delete permission="DELETE_ORG_TYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
-                       <field name="create_date" reporter:datatype="timestamp"/>
-                       <field name="creator" reporter:datatype="link"/>
-                       <field name="edit_date" reporter:datatype="timestamp"/>
-                       <field name="editor" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="pub" reporter:datatype="bool"/>
-                       <field name="record" reporter:datatype="link"/>
-                       <field name="value"  reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-       </class>
-       <class id="mucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_circulation_summary" oils_persist:tablename="money.usr_circulation_summary" reporter:label="User Circulation Summary">
-               <fields oils_persist:primary="usr" oils_persist:sequence="">
-                       <field name="balance_owed" reporter:datatype="money" />
-                       <field name="total_owed" reporter:datatype="money" />
-                       <field name="total_paid" reporter:datatype="money" />
-                       <field name="usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-       <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
-                       <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
-                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note"  reporter:datatype="text"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
-                       <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
-                       <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
-                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
-                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
-                       <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
-                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
-               </links>
-       </class>
-       <class id="cbs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_source" oils_persist:tablename="config.bib_source" reporter:label="Bib Source">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
-                       <field name="id" reporter:selector="source" reporter:datatype="id"/>
-                       <field name="quality" reporter:datatype="int" />
-                       <field name="source" reporter:datatype="text"/>
-                       <field name="transcendant" reporter:datatype="bool"/>
-                       <field name="can_have_copies" reporter:datatype="bool"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_BIB_SOURCE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
-                <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
-                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
-                       <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
-                       <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
-                       <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
-                       <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
-                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
-                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
-                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
-                       <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_USER_TRANSACTIONS">
-                                       <context link="usr" field="home_ou" />
-                               </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="actsce" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry" oils_persist:tablename="actor.stat_cat_entry" reporter:label="User Stat Cat Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
-                       <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
-                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
-                       <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
-               </links>
-       </class>
-       <class id="actsced" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_default" oils_persist:tablename="actor.stat_cat_entry_default" reporter:label="User Stat Cat Default Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
-                       <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
-                       <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
-                       <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
-               </links>
-       </class>
-       <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
-                       <field name="bucket" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="target_user" reporter:datatype="link"/>
-                       <field name="create_time" reporter:datatype="timestamp" />
-                       <field name="pos" reporter:datatype="int" />
-                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
-            <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
-               </links>
-       </class>
-       <class id="cubin" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item_note" oils_persist:tablename="container.user_bucket_item_note" reporter:label="User Bucket Item Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="item" reporter:datatype="link"/>
-                       <field name="note" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
-               </links>
-       </class>
-       <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
-               <fields oils_persist:primary="usr" oils_persist:sequence="">
-                       <field name="balance_owed" reporter:datatype="money" />
-                       <field name="total_owed" reporter:datatype="money" />
-                       <field name="total_paid" reporter:datatype="money" />
-                       <field name="usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-       <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">
-               <fields oils_persist:primary="code" oils_persist:sequence="">
-                       <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
-                       <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_MARC_CODE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_MARC_CODE" global_required="true"/>
-                <delete permission="DELETE_MARC_CODE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
-                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
-                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
-                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
-                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
-                       <field name="checkin_lib" reporter:datatype="link"/>
-                       <field name="checkin_staff" reporter:datatype="link"/>
-                       <field name="checkin_time" reporter:datatype="timestamp"/>
-                       <field name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field name="circ_staff" reporter:datatype="link"/>
-                       <field name="desk_renewal" reporter:datatype="bool"/>
-                       <field name="due_date" reporter:datatype="timestamp"/>
-                       <field name="duration" reporter:datatype="interval"/>
-                       <field name="duration_rule" reporter:datatype="link"/>
-                       <field name="fine_interval" reporter:datatype="interval"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="max_fine" reporter:datatype="money" />
-                       <field name="max_fine_rule" reporter:datatype="link"/>
-                       <field name="opac_renewal" reporter:datatype="bool"/>
-                       <field name="phone_renewal" reporter:datatype="bool"/>
-                       <field name="recurring_fine" reporter:datatype="money" />
-                       <field name="recurring_fine_rule" reporter:datatype="link"/>
-                       <field name="renewal_remaining" reporter:datatype="int" />
-            <field name="grace_period" reporter:datatype="interval" />
-                       <field name="stop_fines" reporter:datatype="text"/>
-                       <field name="stop_fines_time" reporter:datatype="timestamp"/>
-                       <field name="target_copy" reporter:datatype="link"/>
-                       <field name="usr" reporter:datatype="link"/>
-                       <field name="xact_finish" reporter:datatype="timestamp" />
-                       <field name="xact_start" reporter:datatype="timestamp" />
-                       <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
-                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
-                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
-                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
-               </links>
-       </class>
-       <class id="msfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::subject_field_entry" oils_persist:tablename="metabib.subject_field_entry" reporter:label="Subject Field Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
-                       <field name="field" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="source" reporter:datatype="link"/>
-                       <field name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-       </class>
-       <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recurring_fine" oils_persist:tablename="config.rule_recurring_fine" reporter:label="Recurring Fine Rule">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
-                       <field name="high" reporter:datatype="money" />
-                       <field name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field name="low" reporter:datatype="money" />
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="normal" reporter:datatype="money" />
-                       <field name="recurrence_interval" reporter:datatype="interval"/>
-            <field name="grace_period" reporter:datatype="interval" />
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
-                <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
-                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
-                       <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
-                       <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
-                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="acp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy" oils_persist:tablename="asset.copy" reporter:core="true" reporter:label="Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
-                       <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
-                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
-                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
-                       <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
-                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
-                       <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
-                       <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
-                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
-                       <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
-                       <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
-                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
-                       <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
-                       <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
-                       <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
-                       <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
-                       <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
-                       <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
-                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
-                       <field reporter:label="Price" name="price" reporter:datatype="money" />
-                       <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
-                       <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
-                       <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
-                       <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
-                       <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
-                       <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
-                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
-                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
-                       <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
-                       <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
-                       <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
-                       <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
-                       <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
-                       <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
-                       <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
-                       <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
-                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
-                       <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
-                       <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
-                       <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
-                       <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
-                       <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_COPY">
-                    <context link="call_number" field="owning_lib"/>
-                </create>
-                <retrieve/>
-                <update permission="UPDATE_COPY">
-                    <context link="call_number" field="owning_lib"/>
-                </update>
-                <delete permission="DELETE_COPY">
-                    <context link="call_number" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
-                       <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
-                       <field reporter:label="Status" name="status" reporter:datatype="link"/>
-                       <field reporter:label="Location" name="location" reporter:datatype="link"/>
-                       <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
-                       <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
-                       <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
-                       <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
-                       <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
-                       <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
-                       <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
-                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
-                       <field reporter:label="Price" name="price" reporter:datatype="money"/>
-                       <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
-                       <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
-                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
-                       <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
-                       <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
-                       <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
-                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
-                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
-                               <retrieve />
-                               <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
-                               <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
-                       <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
-                       <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
-                <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="crmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::max_fine" oils_persist:tablename="config.rule_max_fine" reporter:label="Max Fine Rule">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
-                       <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
-                <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="pgt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree" oils_persist:tablename="permission.grp_tree" reporter:label="Permission Group">
-               <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
-                       <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
-                       <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
-                       <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
-                       <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
-                       <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
-               </fields>
-               <links>
-                       <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_PERM" global_required="true"/>
-                <retrieve permission="STAFF_LOGIN" global_required="true"/>
-                <update permission="UPDATE_PERM" global_required="true"/>
-                <delete permission="DELETE_PERM" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="asva" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_answer" oils_persist:tablename="action.survey_answer" reporter:label="Survey Answer">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
-                       <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
-                       <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Question" name="question" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
-                       <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_SURVEY">
-                    <context link="question" jump="survey" field="owner"/>
-                </create>
-                <retrieve/>
-                <update permission="ADMIN_SURVEY">
-                    <context link="question" jump="survey" field="owner"/>
-                </update>
-                <delete permission="ADMIN_SURVEY">
-                    <context link="question" jump="survey" field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
-                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
-                       <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
-                       <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
-                       <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
-               </fields>
-               <links>
-                       <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
-                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="patron" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="moucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_circulation_summary" oils_persist:tablename="money.open_usr_circulation_summary" reporter:label="Open User Circulation Summary">
-               <fields oils_persist:primary="usr" oils_persist:sequence="">
-                       <field name="balance_owed" reporter:datatype="money" />
-                       <field name="total_owed" reporter:datatype="money" />
-                       <field name="total_paid" reporter:datatype="money" />
-                       <field name="usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-       <class id="aufh" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_list" oils_persist:tablename="action.unfulfilled_hold_list" reporter:label="Unfulfilled Hold Targets">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
-                       <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
-                       <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />
-               </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-       <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
-                       <field name="field" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="source" reporter:datatype="link"/>
-                       <field name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-       </class>
-       <class id="mtfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::title_field_entry" oils_persist:tablename="metabib.title_field_entry" reporter:label="Title Field Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
-                       <field name="field" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="source" reporter:datatype="link"/>
-                       <field name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
-               </links>
-       </class>
-       <class id="actscecm" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_user_map" oils_persist:tablename="actor.stat_cat_entry_usr_map"  reporter:label="User Statistical Category Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
-                       <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
-                       <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
-                       <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
-               </links>
-       </class>
-       <class id="pgpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_perm_map" oils_persist:tablename="permission.grp_perm_map" reporter:label="Group Permission Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
-                       <field name="depth" reporter:datatype="int" />
-                       <field name="grantable" reporter:datatype="bool"/>
-                       <field name="grp" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="perm" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
-                <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
-                <update permission="UPDATE_GROUP_PERM" global_required="true"/>
-                <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
-                       <field name="items" oils_persist:virtual="true" />
-                       <field name="btype" reporter:datatype="text"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="description" reporter:datatype="text"/>
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="pub" reporter:datatype="bool"/>
-                       <field name="create_time" reporter:datatype="timestamp" />
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
-               </links>
-       </class>
-       <class id="ccbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_note" oils_persist:tablename="container.copy_bucket_note" reporter:label="Copy Bucket Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="bucket" reporter:datatype="link"/>
-                       <field name="note" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
-               </links>
-       </class>
-       <class id="puwoum" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_work_ou_map" oils_persist:tablename="permission.usr_work_ou_map" reporter:label="User Work Org Unit Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
-                       <field name="id" reporter:datatype="int" />
-                       <field name="usr" reporter:datatype="link"/>
-                       <field name="work_ou" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-       <class id="pupm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_perm_map" oils_persist:tablename="permission.usr_perm_map" reporter:label="User Permission Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
-                       <field name="depth" reporter:datatype="int"/>
-                       <field name="grantable" reporter:datatype="bool"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="perm" reporter:datatype="link"/>
-                       <field name="usr" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
-               </links>
-       </class>
-       <class id="puopm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_object_perm_map" oils_persist:tablename="permission.usr_object_perm_map" reporter:label="User Object Permission Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
-                       <field name="object_id" reporter:datatype="text"/>
-                       <field name="grantable" reporter:datatype="bool"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="perm" reporter:datatype="link"/>
-                       <field name="usr" reporter:datatype="link"/>
-                       <field name="object_type" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
-               </links>
-       </class>
-       <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
-                       <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
-                       <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
-                       <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
-                       <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
-                       <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
-                       <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
-                       <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
-                       <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
-                       <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
-                       <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
-                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
-                       <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
-                       <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
-                       <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
-                       <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
-                       <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
-                       <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
-                       <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
-                       <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-       <class id="mndp" controller="open-ils.reporter" oils_obj:fieldmapper="money::non_drawer_payment" oils_persist:tablename="money.non_drawer_payment_view" reporter:core="true" reporter:label="Payments: Non-drawer Staff">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
-                       <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
-                       <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
-                       <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
-                       <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
-                       <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
-                       <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-               </links>
-       </class>
-       <class id="mdp" controller="open-ils.cstore" oils_obj:fieldmapper="money::desk_payment" oils_persist:tablename="money.desk_payment_view" reporter:core="true" reporter:label="Payments: Desk">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
-                       <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
-                       <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
-                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
-                       <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
-                       <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
-                       <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
-               </links>
-       </class>
-       <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
-                       <field name="bucket" reporter:datatype="link"/>
-                       <field name="id" reporter:datatype="id" />
-                       <field name="target_biblio_record_entry" reporter:datatype="link"/>
-                       <field name="create_time" reporter:datatype="timestamp" />
-                       <field name="pos" reporter:datatype="int" />
-                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
-            <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
-               </links>
-       </class>
-       <class id="cbrebin" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item_note" oils_persist:tablename="container.biblio_record_entry_bucket_item_note" reporter:label="Biblio Record Entry Bucket Item Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="item" reporter:datatype="link"/>
-                       <field name="note" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
-               </links>
-       </class>
-       <class id="asce" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
-                       <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
-                       <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links>
-                       <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="STAFF_LOGIN" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-    <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
-        <fields oils_persist:primary="field">
-            <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
-            <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
-            <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
-        </fields>
-        <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
-                <retrieve />
-                <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
-                <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
-            </actions>
-        </permacrud>
-    </class>
-       <class id="ahrcc" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_cancel_cause" oils_persist:tablename="action.hold_request_cancel_cause" oils_persist:restrict_primary="100" reporter:label="Hold Request Cancel Cause">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
-                       <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
-                <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-
-       <class id="artc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::reservation_transit_copy" oils_persist:tablename="action.reservation_transit_copy" reporter:core="true" reporter:label="Reservation Transit">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
-                       <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
-                       <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
-                       <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
-                       <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
-                       <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
-                       <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
-                       <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
-                       <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
-                       <link field="source" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
-                       <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="TRANSIT_COPY">
-                    <context link="target_copy" field="owner"/>
-                </create>
-                <retrieve/>
-                <update permission="UPDATE_TRANSIT" context_field="dest source"/>
-                <delete permission="DELETE_TRANSIT" context_field="dest source"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="ahtc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_transit_copy" oils_persist:tablename="action.hold_transit_copy" reporter:core="true" reporter:label="Hold Transit">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
-                       <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
-                       <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
-                       <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
-                       <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
-                       <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
-                       <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
-                       <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
-                       <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
-               </fields>
-               <links>
-                       <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="source" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
-                       <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="TRANSIT_COPY" context_field="owner">
-                    <context link="target_copy" field="circ_lib"/>
-                </create>
-                <retrieve/>
-                <update permission="UPDATE_TRANSIT" context_field="dest source"/>
-                <delete permission="DELETE_TRANSIT" context_field="dest source"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
-                       <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
-                       <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
-                       <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Type" name="btype" reporter:datatype="link"/>
-                       <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-                       <link field="voider" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
-                       <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER_TRANSACTIONS">
-                    <context link="xact" jump="usr" field="home_ou"/>
-                </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="pugm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_grp_map" oils_persist:tablename="permission.usr_grp_map" reporter:label="User Group Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
-                       <field name="grp" />
-                       <field name="id" reporter:datatype="id" />
-                       <field name="usr" />
-               </fields>
-               <links>
-                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-       <class id="i18n" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_core" oils_persist:tablename="config.i18n_core" oils_persist:field_safe="true" reporter:label="i18n Core">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="fq_field" reporter:datatype="text"/>
-                       <field name="identity_value" reporter:datatype="text"/>
-                       <field name="translation" reporter:datatype="text"/>
-                       <field name="string" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_TRANSLATION" global_required="true"/>
-                <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
-                <update permission="UPDATE_TRANSLATION" global_required="true"/>
-                <delete permission="DELETE_TRANSLATION" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="fdoc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::idl_field_doc" oils_persist:tablename="config.idl_field_doc" oils_persist:field_safe="true" reporter:label="IDL Field Doc">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="fm_class" reporter:datatype="text"/>
-                       <field name="field" reporter:datatype="text"/>
-                       <field name="owner" reporter:datatype="org_unit"/>
-                       <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
-                <retrieve/>
-                <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
-                <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="i18n_l" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_locale" oils_persist:tablename="config.i18n_locale" oils_persist:field_safe="true" reporter:label="Locale">
-               <fields oils_persist:primary="code">
-                       <field name="code" reporter:datatype="id" />
-                       <field name="marc_code" reporter:datatype="text"/>
-                       <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_LOCALE" global_required="true"/>
-                <retrieve/>
-                <update permission="UPDATE_LOCALE" global_required="true"/>
-                <delete permission="DELETE_LOCALE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="cbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::billing_type" oils_persist:tablename="config.billing_type" oils_persist:restrict_primary="100" reporter:label="Billing Type">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
-                       <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
-                       <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
-                       <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
-            <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
-                <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
-                <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
-                <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="aurt" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_type" oils_persist:tablename="acq.user_request_type" reporter:label="User Purchase Request Type">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
-                       <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
-                <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="aur" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request" oils_persist:tablename="acq.user_request" reporter:label="User Purchase Request">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link" />
-                       <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
-                       <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
-                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
-                       <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
-                       <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
-                       <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
-                       <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
-                       <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
-                       <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
-                       <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
-                       <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
-                       <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
-                       <field reporter:label="Title" name="title" reporter:datatype="text" />
-                       <field reporter:label="Volume" name="volume" reporter:datatype="text" />
-                       <field reporter:label="Author" name="author" reporter:datatype="text" />
-                       <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
-                       <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
-                       <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
-                       <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
-                       <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
-                       <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
-                       <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
-                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-                       <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
-                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="user_request.create">
-                    <context link="usr" field="home_ou"/>
-                               </create>
-                <retrieve permission="user_request.view">
-                    <context link="usr" field="home_ou"/>
-                               </retrieve>
-                <update permission="user_request.update">
-                    <context link="usr" field="home_ou"/>
-                               </update>
-                <delete permission="user_request.delete">
-                    <context link="usr" field="home_ou"/>
-                               </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqct" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::currency_type" oils_persist:tablename="acq.currency_type" reporter:label="Currency Type">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
-                       <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
-                <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqexr" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::exchange_rate" oils_persist:tablename="acq.exchange_rate" reporter:label="Exchange Rate">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
-                       <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
-                       <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
-                       <field reporter:label="Ratio" name="ratio" />
-               </fields>
-               <links>
-                       <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
-                       <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
-                               <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
-                       <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
-                       <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
-                       <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
-                       <field reporter:label="Code" name="code" reporter:datatype="text" />
-                       <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
-                       <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="SAN" name="san" reporter:datatype="text" />
-                       <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
-                       <field reporter:label="Active" name="active" reporter:datatype="bool" />
-                       <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
-                       <field reporter:label="URL" name="url" reporter:datatype="text" />
-                       <field reporter:label="Email" name="email" reporter:datatype="text" />
-                       <field reporter:label="Phone" name="phone" reporter:datatype="text" />
-                       <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
-                       <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
-                       <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
-               </fields>
-               <links>
-                       <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
-            <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
-            <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="ADMIN_PROVIDER" context_field="owner"/>
-                <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
-                <update   permission="ADMIN_PROVIDER" context_field="owner"/>
-                <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqpron" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::provider_note" oils_persist:tablename="acq.provider_note" reporter:label="Provider Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
-                       <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Provider" name="provider" reporter:datatype="link" />
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />
-                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />
-                       <field reporter:label="Note Value" name="value" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-               </links>
-       </class>
-
-       <class id="acqipm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_payment_method" oils_persist:tablename="acq.invoice_payment_method" reporter:label="Invoice Payment Method">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-               </fields>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
-                <retrieve/>
-                <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
-                <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
-            </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
-                       <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
-                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
-                       <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
-                       <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
-                       <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
-                       <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
-                       <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
-                       <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
-                       <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text" />
-                       <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
-                       <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
-                       <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
-               </fields>
-               <links>
-                       <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-                       <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
-                       <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
-                       <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
-                       <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
-                       <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="CREATE_INVOICE" context_field="receiver"/>
-                <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
-                <update   permission="CREATE_INVOICE" context_field="receiver"/>
-                <delete   permission="CREATE_INVOICE" context_field="receiver"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_entry" oils_persist:tablename="acq.invoice_entry" reporter:label="Invoice Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
-                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
-                       <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
-                       <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
-                       <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text" />
-                       <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
-                       <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
-                       <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
-                       <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="ADMIN_INVOICE">
-                                       <context link="invoice" field="receiver"/>
-                               </create>
-                <retrieve permission="ADMIN_INVOICE">
-                                       <context link="invoice" field="receiver"/>
-                               </retrieve>
-                <update   permission="ADMIN_INVOICE">
-                                       <context link="invoice" field="receiver"/>
-                               </update>
-                               <delete   permission="ADMIN_INVOICE">
-                                       <context link="invoice" field="receiver"/>
-                               </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item" oils_persist:tablename="acq.invoice_item" reporter:label="Non-bibliographic Invoice Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
-                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
-                       <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
-                       <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
-                       <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
-                       <field reporter:label="Author" name="author" reporter:datatype="text" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text" />
-                       <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
-                       <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
-                       <field reporter:label="Fund" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
-                       <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
-                       <field reporter:label="Target" name="target" reporter:datatype="int" />
-               </fields>
-               <links>
-                       <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
-                       <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
-                       <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="ADMIN_INVOICE">
-                                       <context link="invoice" field="receiver"/>
-                               </create>
-                <retrieve permission="ADMIN_INVOICE">
-                                       <context link="invoice" field="receiver"/>
-                               </retrieve>
-                <update   permission="ADMIN_INVOICE">
-                                       <context link="invoice" field="receiver"/>
-                               </update>
-                               <delete   permission="ADMIN_INVOICE">
-                                       <context link="invoice" field="receiver"/>
-                               </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_address" oils_persist:tablename="acq.provider_address" reporter:label="Provider Address">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
-                       <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
-                       <field reporter:label="City" name="city"  reporter:datatype="text"/>
-                       <field reporter:label="Country" name="country"  reporter:datatype="text"/>
-                       <field reporter:label="County" name="county"  reporter:datatype="text"/>
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
-                       <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
-                       <field reporter:label="State" name="state"  reporter:datatype="text"/>
-                       <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
-                       <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
-                       <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
-                       <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </create>
-                <retrieve permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </retrieve>
-                <update permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </update>
-                <delete permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqpc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact" oils_persist:tablename="acq.provider_contact" reporter:label="Provider Contact">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Role" name="role" reporter:datatype="text"/>
-                       <field reporter:label="Email" name="email" reporter:datatype="text"/>
-                       <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
-        </fields>
-               <links>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </create>
-                <retrieve permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </retrieve>
-                <update permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </update>
-                <delete permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-    </class>
-       <class id="acqpca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact_address" oils_persist:tablename="acq.provider_contact_address" reporter:label="Provider Contact Address">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
-                       <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
-                       <field reporter:label="City" name="city"  reporter:datatype="text"/>
-                       <field reporter:label="Country" name="country"  reporter:datatype="text"/>
-                       <field reporter:label="County" name="county"  reporter:datatype="text"/>
-                       <field reporter:label="Address ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
-                       <field reporter:label="State" name="state"  reporter:datatype="text"/>
-                       <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
-                       <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
-                       <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
-                       <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
-                       <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_PROVIDER">
-                    <context link="contact" jump='provider' field="owner"/>
-                </create>
-                <retrieve permission="ADMIN_PROVIDER">
-                    <context link="contact" jump='provider' field="owner"/>
-                </retrieve>
-                <update permission="ADMIN_PROVIDER">
-                    <context link="contact" jump='provider' field="owner"/>
-                </update>
-                <delete permission="ADMIN_PROVIDER">
-                    <context link="contact" jump='provider' field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
-                       <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
-                       <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
-                       <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
-                       <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
-                       <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
-               </links>
-       </class>
-
-       <class id="acqfc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
-                       <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
-                       <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-            <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
-                               <retrieve permission="STAFF_LOGIN" global_required="true"/>
-                               <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
-                               <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqfy" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
-                       <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
-                       <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
-                       <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
-                       <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
-                       <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
-               </fields>
-               <links>
-                       <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
-                               <retrieve permission="STAFF_LOGIN" global_required="true"/>
-                               <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
-                               <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqfs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source" oils_persist:tablename="acq.funding_source" reporter:label="Funding Source">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
-                       <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
-                       <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
-                       <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
-                       <field reporter:label="Code" name="code" reporter:datatype="text" />
-                       <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
-                       <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
-            <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
-                       <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
-                <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
-                <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
-                <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqfscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
-                       <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text" />
-                       <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
-                       <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
-               </fields>
-               <links>
-                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_FUNDING_SOURCE">
-                    <context link="funding_source" field="owner"/>
-                </create>
-                               <retrieve permission="ADMIN_FUNDING_SOURCE">
-                    <context link="funding_source" field="owner"/>
-                </retrieve>
-                               <update permission="ADMIN_FUNDING_SOURCE">
-                    <context link="funding_source" field="owner"/>
-                </update>
-                               <delete permission="ADMIN_FUNDING_SOURCE">
-                    <context link="funding_source" field="owner"/>
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
-                       <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
-               </links>
-       </class>
-
-       <class id="acqfdeb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
-                       <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
-                       <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
-                       <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
-               </fields>
-               <links>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_FUND">
-                    <context link="fund" field="org"/>
-                </create>
-                               <retrieve permission="ADMIN_ACQ_FUND">
-                    <context link="fund" field="org"/>
-                </retrieve>
-                               <update permission="ADMIN_ACQ_FUND">
-                    <context link="fund" field="org"/>
-                </update>
-                               <delete permission="ADMIN_ACQ_FUND">
-                    <context link="fund" field="org"/>
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
-                       <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
-                       <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text" />
-                       <field reporter:label="Year" name="year" reporter:datatype="int" />
-                       <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
-                       <field reporter:label="Code" name="code" reporter:datatype="text" />
-                       <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
-                       <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
-                       <field reporter:label="Active" name="active" reporter:datatype="bool" />
-                       <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
-                       <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
-                       <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
-                       <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="org" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
-            <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
-            <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
-            <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
-            <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
-            <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
-            <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
-            <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
-            <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
-            <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
-            <actions>
-                <create permission="ADMIN_ACQ_FUND" context_field="org"/>
-                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
-                <update permission="ADMIN_ACQ_FUND" context_field="org"/>
-                <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqfat" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">
-               <fields oils_persist:primary="fund">
-                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
-                                       <context link="fund" field="org" />
-                </retrieve>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqfdt" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">
-               <fields oils_persist:primary="fund">
-                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
-                                       <context link="fund" field="org" />
-                </retrieve>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqfet" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">
-               <fields oils_persist:primary="fund">
-                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
-                                       <context link="fund" field="org" />
-                </retrieve>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqfst" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">
-               <fields oils_persist:primary="fund">
-                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
-                                       <context link="fund" field="org" />
-                </retrieve>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqfcb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">
-               <fields oils_persist:primary="fund">
-                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
-                                       <context link="fund" field="org" />
-                </retrieve>
-            </actions>
-        </permacrud>
-       </class>
-
-   <class id="acqafat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_allocation_total" reporter:label="All Fund Allocation Total">
-        <fields oils_persist:primary="fund">
-            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-            <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
-        </fields>
-        <links>
-            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-        </links>
-    </class>
-
-   <class id="acqafet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_encumbrance_total" reporter:label="All Fund Encumbrance Total">
-        <fields oils_persist:primary="fund">
-            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-            <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
-        </fields>
-        <links>
-            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-        </links>
-    </class>
-
-   <class id="acqafst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_total" reporter:label="All Fund Spent Total">
-        <fields oils_persist:primary="fund">
-            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-            <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
-        </fields>
-        <links>
-            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-        </links>
-    </class>
-
-   <class id="acqafsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_balance" reporter:label="All Fund Spent Balance">
-        <fields oils_persist:primary="fund">
-            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-            <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
-        </fields>
-        <links>
-            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-        </links>
-    </class>
-
-   <class id="acqafcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_combined_balance" reporter:label="All Fund Combined Total">
-        <fields oils_persist:primary="fund">
-            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-            <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
-        </fields>
-        <links>
-            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-        </links>
-    </class>
-
-       <class id="acqfsrcct" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_credit_total" reporter:label="Total Credit to Funding Source">
-               <fields oils_persist:primary="funding_source">
-                       <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
-                       <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
-               </links>
-       </class>
-
-       <class id="acqfsrcat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_allocation_total" reporter:label="Total Allocation to Funding Source">
-               <fields oils_persist:primary="funding_source">
-                       <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
-                       <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
-               </links>
-       </class>
-
-       <class id="acqfsrcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_balance" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_balance" reporter:label="Funding Source Balance">
-               <fields oils_persist:primary="funding_source">
-                       <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
-                       <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
-               </links>
-       </class>
-
-       <class id="acqfsb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">
-               <fields oils_persist:primary="fund">
-                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
-               </fields>
-               <links>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
-                                       <context link="fund" field="org" />
-                </retrieve>
-            </actions>
-        </permacrud>
-    </class>
-    <class id="acqfsum" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_summary" reporter:label="Fund Summary" reporter:core="true" oils_persist:readonly="true">
-        <oils_persist:source_definition><![CDATA[
-            SELECT
-                acqf.*,
-                COALESCE(acqfat.amount, 0.00) AS allocated_total,
-                COALESCE(acqfst.amount, 0.00) AS spent_total,
-                COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
-                COALESCE(acqfcb.amount, 0.00) AS combined_balance
-            FROM
-                acq.fund acqf
-                LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
-                LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
-                LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
-                LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
-        ]]></oils_persist:source_definition>
-        <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
-            <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
-            <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
-            <field reporter:label="Name" name="name" reporter:datatype="text" />
-            <field reporter:label="Year" name="year" reporter:datatype="int" />
-            <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
-            <field reporter:label="Code" name="code" reporter:datatype="text" />
-            <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
-            <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
-            <field reporter:label="Active" name="active" reporter:datatype="bool" />
-            <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
-            <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
-
-            <!-- non fund-native fields -->
-            <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
-            <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
-            <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
-            <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
-        </fields>
-        <links>
-            <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
-            <link field="org" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
-            </actions>
-        </permacrud>
-       </class>
-       <class id="acqfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
-                       <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Fund" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
-                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />
-                       <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text" />
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
-               </fields>
-               <links>
-                       <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_FUND">
-                    <context link="fund" field="org"/>
-                </create>
-                               <retrieve permission="ADMIN_ACQ_FUND">
-                    <context link="fund" field="org"/>
-                </retrieve>
-                               <update permission="ADMIN_ACQ_FUND">
-                    <context link="fund" field="org"/>
-                </update>
-                               <delete permission="ADMIN_ACQ_FUND">
-                    <context link="fund" field="org"/>
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-    <class id="acqfap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation_percent" oils_persist:tablename="acq.fund_allocation_percent" reporter:label="Fund Allocation Percent">
-        <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
-            <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
-            <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
-            <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
-            <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
-            <field reporter:label="Percent" name="percent" reporter:datatype="float" />
-            <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
-            <field reporter:label="Note" name="note" reporter:datatype="text" />
-            <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
-        </fields>
-        <links>
-            <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
-            <link field="org" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
-        </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
-                               <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
-                               <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
-                               <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
-                       </actions>
-               </permacrud>
-    </class>
-
-       <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
-                       <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link" />
-                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqcr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::cancel_reason" oils_persist:tablename="acq.cancel_reason" reporter:label="Cancel Reason">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
-                       <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
-                               <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
-                               <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
-                               <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqpo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::purchase_order" oils_persist:tablename="acq.purchase_order" reporter:label="Purchase Order">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
-                       <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link" />
-                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Provider" name="provider" reporter:datatype="link" />
-                       <field reporter:label="State" name="state" reporter:datatype="text" />
-                       <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />
-                       <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text" />
-                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
-                       <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
-                       <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
-                       <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
-                       <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
-                       <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
-                       <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-                       <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
-                       <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
-                       <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
-                       <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
-                               <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
-                               <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
-                               <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqpoh" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_purchase_order_history" oils_persist:tablename="acq.acq_purchase_order_history" reporter:label="Purchase Order History">
-               <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
-                       <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
-                       <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
-                       <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
-                       <field reporter:label="State" name="state" reporter:datatype="text"/>
-                       <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
-                       <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
-            </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqpon" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
-                       <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />
-                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />
-                       <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
-                       <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
-               </fields>
-               <links>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_PURCHASE_ORDER">
-                    <context link="purchase_order" field="ordering_agency"/>
-                </create>
-                <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
-                    <context link="purchase_order" field="ordering_agency"/>
-                </retrieve>
-                <update permission="CREATE_PURCHASE_ORDER">
-                    <context link="purchase_order" field="ordering_agency"/>
-                </update>
-                <delete permission="CREATE_PURCHASE_ORDER">
-                    <context link="purchase_order" field="ordering_agency"/>
-                </delete>
-            </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqpoi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_item" oils_persist:tablename="acq.po_item" reporter:label="Purchase Order Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
-                       <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
-                       <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
-                       <field reporter:label="Title" name="title" reporter:datatype="text"/>
-                       <field reporter:label="Author" name="author" reporter:datatype="text"/>
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-                       <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
-                       <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
-                       <field reporter:label="Target" name="target" reporter:datatype="int" />
-               </fields>
-               <links>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
-                       <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
-                       <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="CREATE_PURCHASE_ORDER">
-                    <context link="purchase_order" field="ordering_agency"/>
-                </create>
-                <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
-                    <context link="purchase_order" field="ordering_agency"/>
-                </retrieve>
-                <update permission="CREATE_PURCHASE_ORDER">
-                    <context link="purchase_order" field="ordering_agency"/>
-                </update>
-                <delete permission="CREATE_PURCHASE_ORDER">
-                    <context link="purchase_order" field="ordering_agency"/>
-                </delete>
-            </actions>
-               </permacrud>
-       </class>
-
-       <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
-                       <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
-                       <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
-                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
-                       <field reporter:label="Provider" name="provider" reporter:datatype="link" />
-                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
-                       <field reporter:label="MARC" name="marc" reporter:datatype="text" />
-                       <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
-                       <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
-                       <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
-                       <field reporter:label="State" name="state" reporter:datatype="text" />
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />
-                       <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
-                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
-                       <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
-                       <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
-                       <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
-                       <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
-                       <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="selector" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
-                       <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
-                       <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
-                       <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
-                       <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
-                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
-                       <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
-                       <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
-                       <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
-                       <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
-                       <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
-                                       <context link="purchase_order" field="ordering_agency"/>
-                                       <context link="picklist" field="org_unit"/>
-                               </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqlih" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_lineitem_history" oils_persist:tablename="acq.acq_lineitem_history" reporter:label="Line Item History">
-               <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
-                       <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
-                       <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
-                       <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
-                       <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
-                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
-                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
-                       <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
-                       <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
-                       <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
-                       <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
-                       <field reporter:label="State" name="state" reporter:datatype="text"/>
-                       <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
-                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
-                       <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
-                       <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="jub"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="selector" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
-                       <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
-                       <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
-                       <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
-                       <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
-                                       <context link="purchase_order" field="ordering_agency"/>
-                                       <context link="picklist" field="org_unit"/>
-                               </retrieve>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqliat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_alert_text" oils_persist:tablename="acq.lineitem_alert_text" reporter:label="Line Item Alert Text">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
-                       <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Code" name="code" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text"/>
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
-                               <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
-                               <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
-                               <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqlin" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_note" oils_persist:tablename="acq.lineitem_note" reporter:label="Line Item Note">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
-                       <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />
-                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />
-                       <field reporter:label="Note Value" name="value" reporter:datatype="text" />
-                       <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
-                       <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
-               </fields>
-               <links>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-                       <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
-               </links>
-       </class>
-
-       <class id="acqlia" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr" oils_persist:tablename="acq.lineitem_attr" reporter:label="Line Item Attribute">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
-                       <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
-                       <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
-                       <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
-                       <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
-                       <field reporter:label="Definition" name="definition" reporter:datatype="text" />
-                       <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
-               </fields>
-               <links>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-                       <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
-               </links>
-       </class>
-
-       <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
-                       <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
-                       <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
-                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
-                       <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
-                       <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
-                       <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
-                       <field reporter:label="Fund" name="fund" reporter:datatype="link" />
-                       <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
-                       <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
-                       <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
-                       <field reporter:label="Note" name="note" reporter:datatype="text" />
-                       <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
-                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
-                       <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
-               </fields>
-               <links>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-                       <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
-                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
-                       <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
-                       <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-
-       <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
-                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Code" name="code" reporter:datatype="text" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve />
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqlimad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
-                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Code" name="code" reporter:datatype="text" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
-                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
-            <field reporter:label="Remove" name="remove" reporter:datatype="text" />
-               </fields>
-               <links/>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
-                <retrieve />
-                <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
-                <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqligad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_generated_attr_definition" oils_persist:tablename="acq.lineitem_generated_attr_definition" reporter:label="Line Item Generated Attribute Definition">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
-                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Code" name="code" reporter:datatype="text" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
-                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
-               </fields>
-               <links/>
-       </class>
-       <class id="acqliuad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_usr_attr_definition" oils_persist:tablename="acq.lineitem_usr_attr_definition" reporter:label="Line Item User Attribute Definition">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
-                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Code" name="code" reporter:datatype="text" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="User" name="usr" reporter:datatype="link" />
-                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-
-       <class id="acqlipad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_provider_attr_definition" oils_persist:tablename="acq.lineitem_provider_attr_definition" reporter:label="Line Item Provider Attribute Definition">
-           <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
-               <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
-               <field reporter:label="Code" name="code" reporter:datatype="text" />
-               <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-               <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
-               <field reporter:label="Provider" name="provider" reporter:datatype="link" />
-               <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
-        <field reporter:label="Remove" name="remove" reporter:datatype="text" />
-
-           </fields>
-           <links>
-               <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-           </links>
-            <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                <actions>
-                    <create permission="ADMIN_PROVIDER">
-                        <context link="provider" field="owner"/>
-                    </create>
-                    <retrieve permission="ADMIN_PROVIDER">
-                        <context link="provider" field="owner"/>
-                    </retrieve>
-                    <update permission="ADMIN_PROVIDER">
-                        <context link="provider" field="owner"/>
-                    </update>
-                    <delete permission="ADMIN_PROVIDER">
-                        <context link="provider" field="owner"/>
-                    </delete>
-                </actions>
-            </permacrud>
-       </class>
-        
-       <class id="acqphsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_holding_subfield_map" oils_persist:tablename="acq.provider_holding_subfield_map" reporter:label="Provider Holding Subfield Map">
-           <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
-               <field reporter:label="ID" name="id" reporter:datatype="id" />
-               <field reporter:label="Provider" name="provider" reporter:datatype="link" />
-               <field reporter:label="Name" name="name" reporter:datatype="text" />
-               <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
-           </fields>
-           <links>
-               <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-           </links>
-            <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                <actions>
-                    <create permission="ADMIN_PROVIDER">
-                        <context link="provider" field="owner"/>
-                    </create>
-                    <retrieve permission="ADMIN_PROVIDER">
-                        <context link="provider" field="owner"/>
-                    </retrieve>
-                    <update permission="ADMIN_PROVIDER">
-                        <context link="provider" field="owner"/>
-                    </update>
-                    <delete permission="ADMIN_PROVIDER">
-                        <context link="provider" field="owner"/>
-                    </delete>
-                </actions>
-            </permacrud>
-       </class>
-        
-       <class id="acqlilad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_local_attr_definition" oils_persist:tablename="acq.lineitem_local_attr_definition" reporter:label="Line Item Local Attribute Definition">
-           <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
-                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Code" name="code" reporter:datatype="text" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
-                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
-               </fields>
-               <links/>
-       </class>
-
-       <class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
-                       <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
-                       <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
-                       <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
-                       <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
-                       <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
-                       <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
-                       <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
-                       <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
-                       <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
-                       <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
-                       <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
-                       <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
-                       <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
-               </fields>
-               <links>
-                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </create>
-                <retrieve permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </retrieve>
-                <update permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </update>
-                <delete permission="ADMIN_PROVIDER">
-                    <context link="provider" field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-       <class id="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
-                       <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
-                       <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
-                       <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
-                       <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
-                       <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
-                       <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
-                       <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
-                       <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
-                       <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
-                       <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
-                       <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
-                       <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
-                       <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
-               </fields>
-               <links>
-                       <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
-               </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
-                    <context link="account" jump="provider" field="owner"/>
-                </retrieve>
-                <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
-                    <context link="account" jump="provider" field="owner"/>
-                </update>
-                <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
-                    <context link="account" jump="provider" field="owner"/>
-                </delete>
-            </actions>
-        </permacrud>
-       </class>
-
-
-       <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
-               <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="parent" reporter:datatype="link"/>
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="create_time" reporter:datatype="timestamp"/>
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="shared" reporter:datatype="bool"/>
-                       <field name="share_with" reporter:datatype="link"/>
-                       <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
-                       <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
-                       <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
-               </links>
-       </class>
-       <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
-               <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="parent" reporter:datatype="link"/>
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="create_time" reporter:datatype="timestamp"/>
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="shared" reporter:datatype="bool"/>
-                       <field name="share_with" reporter:datatype="link"/>
-                       <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
-                       <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
-                       <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
-               </links>
-       </class>
-       <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
-               <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="parent" reporter:datatype="link"/>
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="create_time" reporter:datatype="timestamp"/>
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="shared" reporter:datatype="bool"/>
-                       <field name="share_with" reporter:datatype="link"/>
-                       <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
-                       <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
-                       <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
-               </links>
-       </class>
-       <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
-               <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="create_time" reporter:datatype="timestamp"/>
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="data" reporter:datatype="text"/>
-                       <field name="folder" reporter:datatype="link"/>
-                       <field name="description" reporter:datatype="text"/>
-                       <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
-                       <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
-               </links>
-       </class>
-       <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
-               <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="owner" reporter:datatype="link"/>
-                       <field name="create_time" reporter:datatype="timestamp"/>
-                       <field name="template" reporter:datatype="link"/>
-                       <field name="data" reporter:datatype="text"/>
-                       <field name="folder" reporter:datatype="link"/>
-                       <field name="recur" reporter:datatype="bool"/>
-                       <field name="recurrence" reporter:datatype="interval"/>
-                       <field name="name" reporter:datatype="text"/>
-                       <field name="description" reporter:datatype="text"/>
-                       <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="template" reltype="has_a" key="id" map="" class="rt"/>
-                       <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
-                       <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
-               </links>
-       </class>
-       <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
-               <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="runner" reporter:datatype="link"/>
-                       <field name="start_time" reporter:datatype="timestamp"/>
-                       <field name="complete_time" reporter:datatype="timestamp"/>
-                       <field name="run_time" reporter:datatype="timestamp"/>
-                       <field name="email" reporter:datatype="text"/>
-                       <field name="excel_format" reporter:datatype="bool"/>
-                       <field name="csv_format" reporter:datatype="bool"/>
-                       <field name="html_format" reporter:datatype="bool"/>
-                       <field name="error_code" reporter:datatype="int"/>
-                       <field name="error_text" reporter:datatype="text"/>
-                       <field name="report" reporter:datatype="link"/>
-                       <field name="folder" reporter:datatype="link"/>
-                       <field name="chart_pie" reporter:datatype="bool"/>
-                       <field name="chart_bar" reporter:datatype="bool"/>
-                       <field name="chart_line" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="runner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="report" reltype="has_a" key="id" map="" class="rr"/>
-                       <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
-               </links>
-       </class>
-       <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
-                       <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
-                       <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
-                       <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
-                       <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
-                       <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
-                       <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
-                       <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
-                       <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
-                       <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
-                       <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve />
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="rssr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::super_simple_record" oils_persist:tablename="reporter.super_simple_record" reporter:label="Simple Record Extracts">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
-                       <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
-                       <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
-                       <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
-                       <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
-                       <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
-                       <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
-                       <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
-                       <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
-                       <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
-                       <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
-               </links>
-       </class>
-       <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
-                       <field reporter:label="Fingerprint" name="fingerprint" />
-                       <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
-                       <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
-                       <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
-                       <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
-                       <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
-                       <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
-                       <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
-                       <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
-                       <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
-                       <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
-                       <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
-                       <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
-                       <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
-                       <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
-                       <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
-                       <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
-                       <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
-                       <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
-                       <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
-                       <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
-                       <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
-               </links>
-       </class>
-       <class id="rud" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::user_demographic" oils_persist:tablename="reporter.demographic" reporter:label="User Demographics">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="User ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
-                       <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="might_have" key="id" map="" class="au"/>
-               </links>
-       </class>
-       <class id="rcirct" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::circulation_type" oils_persist:tablename="reporter.circ_type" reporter:label="Circulation Type">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="might_have" key="id" map="" class="circ"/>
-               </links>
-       </class>
-       <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
-                       <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
-                       <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
-                       <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-       </class>
-       <class id="rxbt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_billing_totals" oils_persist:tablename="reporter.xact_billing_totals" reporter:label="Transaction Billing Totals">
-               <fields oils_persist:primary="xact">
-                       <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
-                       <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
-                       <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
-                       <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
-               </fields>
-               <links>
-                       <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
-               </links>
-       </class>
-       <class id="rxpt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_paid_totals" oils_persist:tablename="reporter.xact_paid_totals" reporter:label="Transaction Paid Totals">
-               <fields oils_persist:primary="xact">
-                       <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
-                       <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
-                       <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
-                       <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
-               </fields>
-               <links>
-                       <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
-               </links>
-       </class>
-       <class id="ergbhu" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::global_bibs_by_holding_update" oils_persist:tablename="extend_reporter.global_bibs_by_holding_update" reporter:label="Bib IDs by Holding Add/Delete Time (OCLC batch update)">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
-                       <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-       </class>
-       <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
-                       <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="acp"/>
-               </links>
-       </class>
-       <class id="acqdf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula" oils_persist:tablename="acq.distribution_formula" reporter:label="Distribution Formula">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
-                       <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
-                       <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
-                       <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
-                               <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
-                               <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
-                               <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="acqdfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_entry" oils_persist:tablename="acq.distribution_formula_entry" reporter:label="Distribution Formula Entry">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
-                       <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
-                       <field reporter:label="Position" name="position" reporter:datatype="int"/>
-                       <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Location" name="location" reporter:datatype="link"/>
-                       <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
-                       <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
-                                       <context link="formula" field="owner"/>
-                               </create>
-                               <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
-                                       <context link="formula" field="owner"/>
-                               </retrieve>
-                               <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
-                                       <context link="formula" field="owner"/>
-                               </update>
-                               <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
-                                       <context link="formula" field="owner"/>
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqdfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_application" oils_persist:tablename="acq.distribution_formula_application" reporter:label="Distribution Formula Application">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
-                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="CREATE_PURCHASE_ORDER">
-                                       <context link="formula" field="owner"/>
-                </create>
-                               <retrieve permission="CREATE_PURCHASE_ORDER">
-                                       <context link="formula" field="owner"/>
-                </retrieve>
-                               <update permission="CREATE_PURCHASE_ORDER">
-                                       <context link="formula" field="owner"/>
-                </update>
-                               <delete permission="CREATE_PURCHASE_ORDER">
-                                       <context link="formula" field="owner"/>
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
-                       <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
-                       <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
-                       <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
-               </fields>
-               <links>
-                       <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
-                       <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
-               </links>
-       </class>
-
-       <class id="acqclt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_type" oils_persist:tablename="acq.claim_type" reporter:label="Claim Type">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
-                       <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
-                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
-                       <field reporter:label="Code" name="code" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
-                               <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
-                               <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
-                               <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqclet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event_type" oils_persist:tablename="acq.claim_event_type" reporter:label="Claim Event Type">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
-                       <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
-                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
-                       <field reporter:label="Code" name="code" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text"/>
-                       <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
-                               <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
-                               <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
-                               <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
-                       <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
-                       <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
-                       <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
-               </links>
-       </class>
-
-       <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
-                       <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
-                       <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
-                       <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
-                       <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-
-       <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
-                       <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
-                       <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
-                       <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
-               </links>
-       </class>
-
-       <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
-                       <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
-                       <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
-                       <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Note" name="note" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
-                       <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-               </links>
-       </class>
-
-       <class id="acqclp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy" oils_persist:tablename="acq.claim_policy" reporter:label="Claim Policy">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
-                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
-                       <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
-                <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
-                <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
-                <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
-            </actions>
-               </permacrud>
-       </class>
-
-       <class id="acqclpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy_action" oils_persist:tablename="acq.claim_policy_action" reporter:label="Claim Policy Action">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
-                       <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
-                       <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
-                       <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_CLAIM_POLICY">
-                                       <context link="claim_policy" field="org_unit"/>
-                </create>
-                               <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
-                                       <context link="claim_policy" field="org_unit"/>
-                </retrieve>
-                               <update permission="ADMIN_CLAIM_POLICY">
-                                       <context link="claim_policy" field="org_unit"/>
-                </update>
-                               <delete permission="ADMIN_CLAIM_POLICY">
-                                       <context link="claim_policy" field="org_unit"/>
-                </delete>
-                       </actions>
-               </permacrud>
-       </class>
-
-    <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
-        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
-            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
-            <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
-            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
-            <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
-            <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
-            <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
-            <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
-            <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
-            <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
-            <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
-            <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
-            <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
-            <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
-            <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
-            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
-            <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
-        </fields>
-        <links>
-            <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
-        </links>
-    </class>
-
-    <class id="stgc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::card_stage" oils_persist:tablename="staging.card_stage" reporter:label="Card Stage">
-        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
-            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
-            <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
-            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
-            <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
-            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
-        </fields>
-    </class>
-
-    <class id="stgma" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::mailing_address_stage" oils_persist:tablename="staging.mailing_address_stage" reporter:label="Mailing Address Stage">
-        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
-            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
-            <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
-            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
-            <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
-            <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
-            <field reporter:label="City" name="city" reporter:datatype="text"/>
-            <field reporter:label="County" name="county"  reporter:datatype="text"/>
-            <field reporter:label="State" name="state" reporter:datatype="text"/>
-            <field reporter:label="Country" name="country" reporter:datatype="text"/>
-            <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
-            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
-        </fields>
-    </class>
-
-    <class id="stgba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::billing_address_stage" oils_persist:tablename="staging.billing_address_stage" reporter:label="Billing Address Stage">
-        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
-            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
-            <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
-            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
-            <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
-            <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
-            <field reporter:label="City" name="city" reporter:datatype="text"/>
-            <field reporter:label="County" name="county"  reporter:datatype="text"/>
-            <field reporter:label="State" name="state" reporter:datatype="text"/>
-            <field reporter:label="Country" name="country" reporter:datatype="text"/>
-            <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
-            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
-        </fields>
-    </class>
-
-    <class id="stgsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::statcat_stage" oils_persist:tablename="staging.statcat_stage" reporter:label="Statistical Category Stage">
-        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
-            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
-            <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
-            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
-            <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
-            <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
-            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
-        </fields>
-    </class>
-
-       <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
-                       <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
-                       <field reporter:label="Status" name="status" reporter:datatype="text"/>
-                       <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
-                       <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
-                       <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
-               </links>
-       </class>
-
-       <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
-                       <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
-                       <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
-                       <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
-               </links>
-       </class>
-
-    <class id="aufhl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_loops" oils_persist:tablename="action.unfulfilled_hold_loops" oils_persist:readonly="true">
-        <fields>
-            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
-            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
-            <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
-        </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-    </class>
-
-    <class id="aufhml" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_min_loop" oils_persist:tablename="action.unfulfilled_hold_min_loop" oils_persist:readonly="true">
-        <fields>
-            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
-            <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
-        </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-               </links>
-    </class>
-
-    <class id="aufhil" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_innermost_loop" oils_persist:tablename="action.unfulfilled_hold_innermost_loop" oils_persist:readonly="true">
-        <fields>
-            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
-            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
-            <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
-        </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-    </class>
-
-    <class id="aufhmxl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_max_loop" oils_persist:tablename="action.unfulfilled_hold_max_loop" oils_persist:readonly="true">
-        <fields>
-            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
-            <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
-        </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-               </links>
-    </class>
-
-    <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
-               <oils_persist:source_definition>
-
-           SELECT  DISTINCT l.*
-             FROM  action.unfulfilled_hold_loops l
-                   JOIN action.unfulfilled_hold_max_loop m USING (hold)
-             WHERE l.count = m.max
-
-               </oils_persist:source_definition>
-        <fields>
-            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
-            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
-            <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
-        </fields>
-               <links>
-                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-    </class>
-
-       <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
-                       <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Query type" name="type" reporter:datatype="text"/>
-                       <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
-                       <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
-                       <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
-                       <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
-                       <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
-                       <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
-                       <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
-                       <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
-                       <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
-                       <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
-               </links>
-       </class>
-
-       <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
-                       <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
-                       <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
-                       <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
-               </fields>
-               <links>
-               </links>
-       </class>
-
-       <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
-                       <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
-                       <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
-               </links>
-       </class>
-       
-       <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
-                       <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
-                       <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
-                       <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
-               </links>
-       </class>
-       
-       <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
-                       <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
-                       <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
-               </links>
-       </class>
-
-       <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
-               <fields oils_persist:primary="name">
-                       <field reporter:label="Name" name="name" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
-                       <field reporter:label="Type" name="type" reporter:datatype="text"/>
-                       <field reporter:label="Description" name="description" reporter:datatype="text"/>
-                       <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
-                       <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
-               </fields>
-               <links>
-               </links>
-       </class>
-
-       <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
-                       <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
-                       <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
-                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
-                       <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
-                       <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
-                       <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
-                       <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
-                       <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-                       <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
-                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
-                       <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
-                       <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
-               </links>
-       </class>
-
-       <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
-                       <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
-                       <field reporter:label="Result" name="result" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
-                       <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
-                       <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
-                       <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
-                       <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
-                       <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
-                       <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
-                       <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
-                       <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
-                       <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
-                       <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
-                       <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
-                       <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
-                       <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
-               </links>
-       </class>
-
-       <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
-                       <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
-                       <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
-                       <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
-                       <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
-                       <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
-                       <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
-               </links>
-       </class>
-
-       <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
-                       <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
-               </links>
-       </class>
-
-       <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
-                       <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
-               </links>
-       </class>
-
-       <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
-                       <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
-               </links>
-       </class>
-
-       <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
-                       <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
-               </links>
-       </class>
-
-       <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
-                       <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
-                       <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
-                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-               </links>
-       </class>
-
-       <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
-               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
-                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
-                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
-                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
-                       <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
-                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
-               </links>
-       </class>
-
-       <class id="bmpc" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::marc21_physical_characteristics" oils_persist:tablename="biblio.marc21_physical_characteristics" reporter:label="MARC21 Physical Characteristics" oils_persist:field_safe="true" oils_persist:readonly="true">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
-                       <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="link"/>
-                       <field reporter:label="Record" name="record" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
-                       <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
-                       <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
-                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-       </class>
-
-       <class id="cmfpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_ff_pos_map" oils_persist:tablename="config.marc21_ff_pos_map" reporter:label="MARC21 Fixed Field Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
-                       <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
-                       <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
-                       <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
-                       <field reporter:label="Length" name="length" reporter:datatype="int"/>
-                       <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="cmpctm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_type_map" oils_persist:tablename="config.marc21_physical_characteristic_type_map" reporter:label="MARC21 Physical Characteristic Type Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="ptype_key">
-                       <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="cmpcsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_subfield_map" oils_persist:tablename="config.marc21_physical_characteristic_subfield_map" reporter:label="MARC21 Physical Characteristic Subfield Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
-                       <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
-                       <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
-                       <field reporter:label="Length" name="length" reporter:datatype="int"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="cmpcvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"/>
-                       <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-    <class
-        id="uvs"
-        controller="open-ils.cstore open-ils.pcrud"
-        oils_obj:fieldmapper="url_verify::session"
-        oils_persist:tablename="url_verify.session"
-        reporter:label="URL Verification Session"
-    >
-        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
-            <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
-            <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
-            <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
-            <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
-            <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
-            <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
-            <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
-        </fields>
-
-        <links>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-            <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
-            <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
-            <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
-        </links>
-
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
-            </actions>
-        </permacrud>
-
-    </class>
-
-    <class id="uvsbrem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="url_verify::session_biblio_record_entry_map" oils_persist:readonly="true" reporter:label="URL Verify Session Biblio Record Entry Map">
-        <oils_persist:source_definition>
-            SELECT
-                cbrebi.id AS id,  -- so we can have a pkey in our view
-                uvs.id AS session,
-                uvs.owning_lib,
-                cbrebi.target_biblio_record_entry
-            FROM url_verify.session uvs
-            JOIN container.biblio_record_entry_bucket cbreb
-                ON (uvs.container = cbreb.id)
-            JOIN container.biblio_record_entry_bucket_item cbrebi
-                ON (cbrebi.bucket = cbreb.id)
-        </oils_persist:source_definition>
-        <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
-            <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
-            <field reporter:label="Session" name="session" reporter:datatype="link" />
-            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
-            <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
-        </fields>
-        <links>
-            <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
-            <link field="session" reltype="has_a" key="id" map="" class="uvs" />
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
-        </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="URL_VERIFY" context_field="owning_lib" />
-            </actions>
-        </permacrud>
-    </class>
-
-    <class
-        id="uvus"
-        controller="open-ils.cstore open-ils.pcrud"
-        oils_obj:fieldmapper="url_verify::url_selector"
-        oils_persist:tablename="url_verify.url_selector"
-        reporter:label="URL Verification URL Selector"
-    >
-        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
-            <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
-                       <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
-            <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
-        </fields>
-
-        <links>
-            <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
-            <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
-        </links>
-
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </create>
-                <retrieve permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </retrieve>
-                <update permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </update>
-                <delete permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-
-    </class>
-
-    <class
-        id="uvu"
-        controller="open-ils.cstore open-ils.pcrud"
-        oils_obj:fieldmapper="url_verify::url"
-        oils_persist:tablename="url_verify.url"
-        reporter:label="URL Verification URL"
-    >
-        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
-            <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
-                       <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
-                       <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
-                       <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
-            <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
-            <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
-            <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
-            <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
-            <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
-            <field reporter:label="Host" name="host" reporter:datatype="text"/>
-            <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
-            <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
-            <field reporter:label="Path" name="path" reporter:datatype="text"/>
-            <field reporter:label="Page" name="page" reporter:datatype="text"/>
-            <field reporter:label="Query" name="query" reporter:datatype="text"/>
-            <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
-            <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
-        </fields>
-
-        <links>
-            <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
-            <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
-            <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
-            <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
-            <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
-        </links>
-
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </create>
-                <retrieve permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </retrieve>
-                <update permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </update>
-                <delete permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-
-    </class>
-
-    <class
-        id="uvva"
-        controller="open-ils.cstore open-ils.pcrud"
-        oils_obj:fieldmapper="url_verify::verification_attempt"
-        oils_persist:tablename="url_verify.verification_attempt"
-        reporter:label="URL Verification Attempt"
-    >
-        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
-            <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="User" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Session" name="session" reporter:datatype="link"/>
-            <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
-            <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
-        </fields>
-
-        <links>
-            <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
-            <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-        </links>
-
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </create>
-                <retrieve permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </retrieve>
-                <update permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </update>
-                <delete permission="URL_VERIFY">
-                    <context link="session" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-
-    </class>
-
-    <class
-        id="uvuv"
-        controller="open-ils.cstore open-ils.pcrud"
-        oils_obj:fieldmapper="url_verify::url_verification"
-        oils_persist:tablename="url_verify.url_verification"
-        reporter:label="URL Verification"
-    >
-        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
-            <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="URL" name="url" reporter:datatype="link"/>
-                       <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
-            <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
-            <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
-            <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
-            <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
-                       <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
-        </fields>
-
-        <links>
-            <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
-            <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
-            <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
-        </links>
-
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <create permission="URL_VERIFY">
-                    <context link="attempt" jump="session" field="owning_lib"/>
-                </create>
-                <retrieve permission="URL_VERIFY">
-                    <context link="attempt" jump="session" field="owning_lib"/>
-                </retrieve>
-                <update permission="URL_VERIFY">
-                    <context link="attempt" jump="session" field="owning_lib"/>
-                </update>
-                <delete permission="URL_VERIFY">
-                    <context link="attempt" jump="session" field="owning_lib"/>
-                </delete>
-            </actions>
-        </permacrud>
-
-    </class>
-
-       <class
-               id="cfdi"
-               controller="open-ils.cstore open-ils.pcrud"
-               oils_obj:fieldmapper="config::filter_dialog_interface"
-               oils_persist:tablename="config.filter_dialog_interface"
-               reporter:label="FilterDialog Interface">
-               <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
-                       <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
-                       <field reporter:label="Description" name="description" reporter:datatype="text" />
-               </fields>
-               <links>
-                       <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve />
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class
-               id="cfdfs"
-               controller="open-ils.cstore open-ils.pcrud"
-               oils_obj:fieldmapper="config::filter_dialog_filter_set"
-               oils_persist:tablename="config.filter_dialog_filter_set"
-               reporter:label="FilterDialog Filter Set">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-                       <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
-                               <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
-                               <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
-                               <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
-                       </actions>
-               </permacrud>
-
-       </class>
-
-       <class id="cmrtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_rec_type_map" oils_persist:tablename="config.marc21_rec_type_map" reporter:label="MARC21 Record Type Map" oils_persist:field_safe="true">
-               <fields oils_persist:primary="code">
-                       <field reporter:label="Code" name="code" reporter:datatype="id"/>
-                       <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
-                       <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
-               </fields>
-               <links/>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">
-               <oils_persist:source_definition>
-
-            SELECT  b.id,
-                    MAX(dcp.edit_date) AS last_delete_date
-             FROM   biblio.record_entry b
-                    JOIN asset.call_number cn ON (cn.record = b.id)
-                    JOIN asset.copy dcp ON (cn.id = dcp.call_number)
-             WHERE  NOT b.deleted
-             GROUP BY b.id
-             HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
-
-               </oils_persist:source_definition>
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">
-               <oils_persist:source_definition>
-
-            -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
-            -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
-            -- -- may not.
-            -- SELECT
-            --     bre.id AS "bib_id",
-            --     COALESCE( z.copy_count, 0 ) AS "copy_count",
-            --     COALESCE( z.hold_count, 0 ) AS "hold_count",
-            --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
-            -- FROM (
-                SELECT
-                    y.bre AS "id",
-                    COALESCE( x.copy_count, 0 ) AS "copy_count",
-                    y.hold_count AS "hold_count",
-                    (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS "hold_copy_ratio"
-                FROM (
-                        SELECT
-                            (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
-                            COUNT(*) AS "hold_count"
-                        FROM action.hold_request h
-                        WHERE
-                            cancel_time IS NULL
-                            AND fulfillment_time IS NULL
-                            -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
-                        GROUP BY 1
-                    )y LEFT JOIN (
-                        SELECT 
-                            (SELECT id
-                                FROM biblio.record_entry 
-                                WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
-                            ) AS "bre", 
-                            COUNT(*) AS "copy_count"
-                        FROM asset.copy
-                            JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
-                        WHERE copy.holdable 
-                            AND NOT copy.deleted 
-                            AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
-                        GROUP BY 1
-                    )x ON x.bre = y.bre
-                -- )z RIGHT JOIN (
-                --     SELECT id
-                --     FROM biblio.record_entry
-                --     WHERE NOT deleted
-                -- )bre ON (z.bib_id = bre.id)
-                
-
-               </oils_persist:source_definition>
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
-                       <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
-                       <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
-               <oils_persist:source_definition>
-            SELECT *,
-                CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
-                CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
-            FROM
-                (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
-                    FROM
-                        action.hold_request ahr
-                        JOIN reporter.hold_request_record rhrr USING (id)
-                        LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
-                        LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
-                    WHERE
-                        ahr.cancel_time IS NULL
-                        AND ahr.fulfillment_time IS NULL
-                    GROUP BY bib_record, pickup_lib
-                )x
-                JOIN
-                (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
-                    FROM
-                        action.hold_request ahr
-                        JOIN reporter.hold_request_record rhrr USING (id)
-                        LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
-                    WHERE
-                        ahr.cancel_time IS NULL
-                        AND ahr.fulfillment_time IS NULL
-                    GROUP BY bib_record
-                )y
-                USING (id)
-               </oils_persist:source_definition>
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
-                       <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
-                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
-                       <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
-                       <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
-                       <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
-                       <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
-                       <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>
-                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
-               <oils_persist:source_definition>
-            SELECT
-                ac.id,
-                COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
-                MAX(actac.xact_start) AS last_circ
-            FROM asset.copy ac
-                 LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
-            GROUP BY ac.id
-
-            -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
-            --SELECT
-            --    ac.id,
-            --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
-            --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
-            --FROM asset.copy ac
-            --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
-            --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
-            --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
-               </oils_persist:source_definition>
-               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
-                       <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
-                       <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="acp"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="ctcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::ts_config_list" oils_persist:tablename="config.ts_config_list" reporter:label="Text Search Configs">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
-                       <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
-               </fields>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="cmcts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class_ts_map" oils_persist:tablename="config.metabib_class_ts_map" reporter:label="Metabib Class TS Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
-                       <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
-                       <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
-                       <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
-                       <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
-                       <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
-                       <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
-                       <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
-                       <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
-               </fields>
-               <links>
-                       <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
-                       <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                               <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="cmfts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_ts_map" oils_persist:tablename="config.metabib_field_ts_map" reporter:label="Metabib Field TS Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
-                       <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
-                       <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
-                       <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
-                       <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
-                       <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
-                       <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
-                       <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
-               </fields>
-               <links>
-                       <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
-                       <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                               <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-
-       <!-- ********************************************************************************************************************* -->
-       <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
-       <!-- ********************************************************************************************************************* -->
-       <class id="rccc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_circ" oils_persist:tablename="reporter.classic_current_circ" reporter:core="true" reporter:label="Classic Circulation View">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Circulation" name="id" reporter:datatype="id" />
-                       <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
-                       <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
-                       <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
-                       <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
-                       <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
-                       <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
-                       <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
-                       <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
-                       <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
-                       <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
-                       <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
-                       <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
-                       <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
-                       <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
-                       <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
-                       <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
-                       <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
-                       <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
-                       <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
-                       <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
-                       <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
-                       <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
-                       <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
-                       <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
-                       <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
-                       <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
-                       <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
-                       <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
-                       <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
-                       <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="circ"/>
-                       <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
-                       <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
-                       <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
-               </links>
-       </class>
-
-       <class id="rsce1" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat1" oils_persist:tablename="reporter.legacy_cat1" reporter:label="CAT1 Entry">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
-                       <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-
-       <class id="rsce2" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat2" oils_persist:tablename="reporter.legacy_cat2" reporter:label="CAT2 Entry">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
-                       <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
-                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-
-       <class id="rccbs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_billing_summary" oils_persist:tablename="reporter.classic_current_billing_summary" reporter:core="true" reporter:label="Classic Open Transaction Summary">
-               <fields oils_persist:primary="id">
-                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
-
-                       <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
-                       <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
-                       <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
-
-                       <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
-                       <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
-                       <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
-
-                       <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
-                       <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
-
-                       <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
-
-                       <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
-                       <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
-
-                       <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
-                       <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
-
-                       <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
-                       <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
-                       <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
-
-                       <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
-                       <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
-                       <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
-                       <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
-
-                       <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
-                       <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
-
-               </fields>
-               <links>
-                       <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-       </class>
-
-       <class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">
-               <oils_persist:source_definition>
-
-            SELECT
-                po.ordering_agency AS ordering_agency,
-                po.id AS purchase_order,
-                li.id AS lineitem,
-                lid.id AS lineitem_detail,
-                cpa.id AS claim_policy_action
-            FROM
-                acq.lineitem_detail lid
-                JOIN acq.lineitem li ON (li.id = lid.lineitem)
-                JOIN acq.purchase_order po ON (po.id = li.purchase_order)
-                JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
-                JOIN acq.claim_policy_action cpa ON (
-                    cpa.claim_policy = cp.id
-
-                    -- we only care about claim policy actions whose claim
-                    -- interval we'd reached or exceeded
-                    AND (NOW() - cpa.action_interval) &gt; po.order_date
-
-                    -- filter out all claim policy actions where claim events
-                    -- have occurred on or after the action's action_interval
-                    AND NOT EXISTS (
-                        SELECT 1
-                        FROM
-                            acq.claim_event evt
-                            JOIN acq.claim claim ON (
-                                claim.id = evt.claim
-                                AND claim.lineitem_detail = lid.id
-                            )
-                        WHERE
-                            evt.event_date &gt;= (po.order_date + cpa.action_interval)
-                    )
-                )
-            WHERE
-                lid.cancel_reason IS NULL
-                AND li.cancel_reason IS NULL -- belt/suspenders
-                AND po.cancel_reason IS NULL -- belt/suspenders
-                AND lid.recv_time IS NULL
-                AND po.state = 'on-order'
-            ORDER BY 1, 2, 3, 4, 5
-
-               </oils_persist:source_definition>
-               <fields>
-                       <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
-                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
-                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
-                       <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
-                       <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-                       <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
-                       <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
-               </links>
-       </class>
-       <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary" oils_persist:tablename="acq.lineitem_summary">
-               <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
-                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
-                       <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
-                       <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
-                       <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
-                       <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
-                       <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
-                       <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
-                       <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
-                       <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
-                       <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
-               </fields>
-               <links>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-               </links>
-    </class>
-       <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
-               <oils_persist:source_definition>
-            SELECT * FROM acq.lineitem_summary 
-                               WHERE item_count > (invoice_count + cancel_count)
-        </oils_persist:source_definition>
-               <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
-                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
-                       <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
-                       <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
-                       <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
-                       <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
-                       <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
-                       <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
-                       <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
-                       <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
-                       <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
-               </fields>
-               <links>
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
-               </links>
-    </class>
-       <class id="iatc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::intersystem_transit_copy" oils_persist:readonly="true" reporter:core="true" reporter:label="Inter-system Copy Transit">
-               <oils_persist:source_definition>
-
-                       SELECT  t.*
-                         FROM  action.transit_copy t
-                               JOIN actor.org_unit AS s ON (t.source = s.id)
-                               JOIN actor.org_unit AS d ON (t.dest = d.id)
-                         WHERE s.parent_ou &lt;&gt; d.parent_ou
-
-               </oils_persist:source_definition>
-               <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
-                       <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
-                       <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
-                       <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
-                       <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
-                       <field reporter:label="Source" name="source" reporter:datatype="link"/>
-                       <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
-                       <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
-                       <link field="source" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
-                       <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
-               </links>
-       </class>
-
-    <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
-               <oils_persist:source_definition>
-
-       SELECT copy, SUM(count) AS count, year, is_renewal FROM (
-               SELECT
-                       cp.id as copy,
-                       COUNT(circ.id),
-                       EXTRACT(YEAR FROM circ.xact_start) AS year,
-                       (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
-               FROM
-                       asset.copy cp
-                               JOIN action.circulation circ ON (cp.id = circ.target_copy)
-               GROUP BY 1, 3, 4
-               UNION ALL
-               SELECT
-                       cp.id as copy,
-                       COUNT(circ.id),
-                       EXTRACT(YEAR FROM circ.xact_start) AS year,
-                       (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
-               FROM
-                       asset.copy cp
-                               JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
-               GROUP BY 1, 3, 4
-               UNION ALL
-               SELECT
-                       id as copy,
-                       circ_count,
-                       -1 AS year,
-                       false as is_renewal
-               FROM
-                       extend_reporter.legacy_circ_count
-       )x GROUP BY 1, 3, 4
-
-               </oils_persist:source_definition>
-        <fields>
-            <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
-            <field reporter:label="Count" name="count" reporter:datatype="int"/>
-            <field reporter:label="Year" name="year" reporter:datatype="int"/>
-            <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
-        </fields>
-               <links>
-                       <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <retrieve/>
-                       </actions>
-               </permacrud>
-    </class>
-
-       <class id="rodcirc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::overdue_circs" oils_persist:tablename="reporter.overdue_circs" reporter:core="true" reporter:label="Overdue Circulation">
-               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
-                       <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
-                       <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
-                       <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
-                       <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
-                       <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
-                       <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
-                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
-                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
-                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
-                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
-                       <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
-                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
-                       <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
-                       <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
-                       <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
-                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
-                       <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
-                       <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
-                       <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
-                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
-                       <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
-                       <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
-                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
-                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
-                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
-                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
-                       <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
-                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
-                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
-               </links>
-       </class>
-
-    <class id="rocit" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_item_list" oils_persist:tablename="reporter.classic_item_list" reporter:core="true" reporter:label="Classic Item List">
-        <fields oils_persist:primary="id">
-            <field reporter:label="Title" name="title" reporter:datatype="text"/>
-            <field reporter:label="Author" name="author" reporter:datatype="text"/>
-            <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
-            <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
-            <field reporter:label="Price" name="price" reporter:datatype="money"/>
-            <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
-            <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
-            <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
-            <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
-            <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
-            <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
-            <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
-            <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
-            <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
-            <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
-            <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
-            <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
-            <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
-            <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
-            <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
-            <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
-            <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
-            <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
-            <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
-            <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
-            <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
-            <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
-            <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
-            <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
-            <field reporter:label="Status" name="status" reporter:datatype="link"/>
-            <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
-            <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
-            <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
-            <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
-        </fields>
-        <links>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="id" reltype="has_a" key="id" map="" class="acp"/>
-            <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-            <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
-            <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
-            <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
-           <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
-        </links>
-    </class>
-
-    <class id="rmocbbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_owning_lib" oils_persist:tablename="money.open_circ_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Owning Library">
-        <fields oils_persist:primary="id">
-            <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
-            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-            <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
-            <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
-        </fields>
-        <links>
-            <link field="id" reltype="has_a" key="id" map="" class="circ"/>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-    </class>
-
-    <class id="rmobbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_owning_lib" oils_persist:tablename="money.open_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Owning Library">
-        <fields oils_persist:primary="owning_lib">
-            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-            <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
-            <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
-        </fields>
-        <links>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-    </class>
-
-    <class id="rmocbbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Circulating Library and Owning Library">
-        <fields oils_persist:primary="id">
-            <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
-            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
-            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-            <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
-            <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
-        </fields>
-        <links>
-            <link field="id" reltype="has_a" key="id" map="" class="circ"/>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-    </class>
-
-    <class id="rmobbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Circulating Library and Owning Library">
-        <fields oils_persist:primary="circ_lib">
-            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
-            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-            <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
-            <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
-        </fields>
-        <links>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-    </class>
-
-    <class id="rmocbbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by User Home Library and Owning Library">
-        <fields oils_persist:primary="id">
-            <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
-            <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
-            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-            <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
-            <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
-        </fields>
-        <links>
-            <link field="id" reltype="has_a" key="id" map="" class="circ"/>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-    </class>
-
-    <class id="rmobbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by User Home Library and Owning Library">
-        <fields oils_persist:primary="home_ou">
-            <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
-            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
-            <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
-            <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
-        </fields>
-        <links>
-            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
-            <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
-        </links>
-    </class>
-       <class id="acqft" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag" oils_persist:tablename="acq.fund_tag" reporter:label="Fund Tag">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
-                       <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
-                       <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
-                       <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
-                               <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
-                               <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
-                       <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="acqftm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag_map" oils_persist:tablename="acq.fund_tag_map" reporter:label="Fund Tag Map">
-               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
-                       <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
-                       <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
-                       <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
-                       </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-               <actions>
-                               <create permission="ADMIN_ACQ_FUND_TAG">
-                                       <context link="tag" field="owner"/>
-                               </create>
-                               <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
-                                       <context link="tag" field="owner"/>
-                               </retrieve>
-                               <update permission="ADMIN_ACQ_FUND_TAG">
-                                       <context link="tag" field="owner"/>
-                               </update>
-                               <delete permission="ADMIN_ACQ_FUND_TAG">
-                                       <context link="tag" field="owner"/>
-                               </delete>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="acqmapinv" controller="open-ils.cstore" oils_obj:fieldmapper="acq::map_to_invoice" reporter:label="Acq Map to Invoice View" oils_persist:readonly="true">
-               <oils_persist:source_definition><![CDATA[
-               SELECT
-                       poi.purchase_order AS purchase_order,
-                       ii.invoice AS invoice,
-                       NULL AS lineitem,
-                       poi.id AS po_item,
-                       NULL AS picklist
-               FROM
-                       acq.po_item poi
-                       JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
-               UNION SELECT
-                       jub.purchase_order AS purchase_order,
-                       ie.invoice AS invoice,
-                       jub.id AS lineitem,
-                       NULL AS po_item,
-                       jub.picklist AS picklist
-               FROM
-                       acq.lineitem jub
-                       JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
-               UNION SELECT
-                       ii.purchase_order AS purchase_order,
-                       ii.invoice AS invoice,
-                       NULL AS lineitem,
-                       NULL AS po_item,
-                       NULL AS picklist
-               FROM
-                       acq.invoice_item ii
-               WHERE ii.po_item IS NULL
-               UNION SELECT
-                       ie.purchase_order AS purchase_order,
-                       ie.invoice AS invoice,
-                       NULL AS lineitem,
-                       NULL AS po_item,
-                       NULL AS picklist
-               FROM
-                       acq.invoice_entry ie
-               WHERE ie.lineitem IS NULL
-               UNION SELECT
-                       NULL AS purchase_order,
-                       NULL AS invoice,
-                       jub.id AS lineitem,
-                       NULL AS po_item,
-                       jub.picklist AS picklist
-               FROM
-                       acq.lineitem jub
-               WHERE jub.purchase_order IS NULL
-               ]]></oils_persist:source_definition>
-               <fields>
-                       <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
-                       <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
-                       <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
-                       <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
-                       <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
-                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
-                       <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
-                       <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
-                       <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
-               </links>
-       </class>
-       <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>
-                       <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
-                       <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
-                       <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
-                       <field reporter:label="Length" name="length" reporter:datatype="int"/>
-                       <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
-                       <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
-                       <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
-                       <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
-                               <retrieve/>
-                               <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
-                               <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field name="date_applied" reporter:datatype="timestamp"/>
-                       <field name="org" reporter:datatype="org_unit"/>
-                       <field name="original_value" reporter:datatype="text"/>
-                       <field name="new_value" reporter:datatype="text"/>
-                       <field name="field_name" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
-                       <link field="org" reltype="has_a" key="id" map="" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
-                               <retrieve permission="STAFF_LOGIN" context_field="org"/>
-                               <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
-                               <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
-                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
-                       <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
-               </links>
-       </class>
-       <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
-               <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
-                       <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
-                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
-               </fields>
-               <links>
-                       <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
-                       <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
-               </links>
-       </class>
-       <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
-                       <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
-               </fields>
-               <links>
-                       <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
-                               <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-       <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
-               <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
-                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
-                       <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
-                       <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
-                       <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
-               </fields>
-               <links>
-                       <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
-                       <link field="org_unit" reltype="has_a" key="id" class="aou"/>
-               </links>
-               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-                       <actions>
-                               <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
-                               <retrieve/>
-                               <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
-                               <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
-                       </actions>
-               </permacrud>
-       </class>
-
-       <!-- ********************************************************************************************************************* -->
-
-</IDL>
-
-<!--
-    vim:noet:ts=4:sw=4:
--->
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!--\r
+\r
+Copyright (C) 2006-2008 Georgia Public Library Service\r
+Copyright (C) 2008 Equinox Software, Inc\r
+Author: Mike Rylander <miker@esilibrary.com>\r
+\r
+This program is free software; you can redistribute it and/or\r
+modify it under the terms of the GNU General Public License\r
+as published by the Free Software Foundation; either version 2\r
+of the License, or (at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program; if not, write to the Free Software\r
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
+\r
+############################\r
+          TEMPLATE\r
+############################\r
+\r
+    <class\r
+        id=""\r
+        controller="open-ils.cstore open-ils.pcrud"\r
+        oils_obj:fieldmapper=""\r
+        oils_persist:tablename=""\r
+        reporter:label=""\r
+        oils_persist:field_safe=""\r
+        oils_persist:virtual=""\r
+        oils_persist:readonly=""\r
+        reporter:core=""\r
+    >\r
+\r
+        <oils_persist:source_definition><![CDATA[\r
+            SELECT * FROM foo\r
+        ]]></oils_persist:source_definition>\r
+\r
+        <fields oils_persist:primary="" oils_persist:sequence="">\r
+            <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="" name="" reporter:datatype="org_unit"/>\r
+            <field reporter:label="" name="" reporter:datatype="text"/>\r
+            <field reporter:label="" name="" reporter:datatype="link"/>\r
+            <field reporter:label="" name="" reporter:datatype="timestamp"/>\r
+            <field reporter:label="" name="" reporter:datatype="money"/>\r
+            <field reporter:label="" name="" reporter:datatype="bool"/>\r
+            <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>\r
+            <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>\r
+        </fields>\r
+\r
+        <links>\r
+            <link field="" reltype="has_a" key="" map="" class=""/>\r
+        </links>\r
+\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="" gloabl_required="true"/>\r
+                <retrieve/>\r
+                <update permission="" context_field=""/>\r
+                <delete permission="">\r
+                    <context link="" field=""/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+\r
+    </class>\r
+\r
+\r
+-->\r
+\r
+<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">\r
+\r
+       <!-- Virtual classes -->\r
+       <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">\r
+               <fields>\r
+                       <field name="usr" oils_persist:virtual="true" />\r
+                       <field name="forgive_payment" oils_persist:virtual="true" />\r
+                       <field name="work_payment" oils_persist:virtual="true" />\r
+                       <field name="credit_payment" oils_persist:virtual="true" />\r
+                       <field name="goods_payment" oils_persist:virtual="true" />\r
+                       <field name="account_adjustment" oils_persist:virtual="true" />\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">\r
+               <fields>\r
+                       <field name="workstation" oils_persist:virtual="true" />\r
+                       <field name="cash_payment" oils_persist:virtual="true" />\r
+                       <field name="check_payment" oils_persist:virtual="true" />\r
+                       <field name="credit_card_payment" oils_persist:virtual="true" />\r
+               </fields>\r
+               <links>\r
+                       <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">\r
+               <fields>\r
+                       <field name="id" oils_persist:virtual="true" />\r
+                       <field name="children" oils_persist:virtual="true" />\r
+                       <field name="owner_doc" oils_persist:virtual="true" />\r
+                       <field name="intra_doc_id" oils_persist:virtual="true" />\r
+                       <field name="parent_node" oils_persist:virtual="true" />\r
+                       <field name="node_type" oils_persist:virtual="true" />\r
+                       <field name="namespace_uri" oils_persist:virtual="true" />\r
+                       <field name="name" oils_persist:virtual="true" />\r
+                       <field name="value" oils_persist:virtual="true" />\r
+               </fields>\r
+       </class>\r
+\r
+       <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">\r
+               <fields>\r
+                       <field name="title" oils_persist:virtual="true" />\r
+                       <field name="author" oils_persist:virtual="true" />\r
+                       <field name="doc_id" oils_persist:virtual="true" />\r
+                       <field name="doc_type" oils_persist:virtual="true" />\r
+                       <field name="pubdate" oils_persist:virtual="true" />\r
+                       <field name="isbn" oils_persist:virtual="true" />\r
+                       <field name="publisher" oils_persist:virtual="true" />\r
+                       <field name="tcn" oils_persist:virtual="true" />\r
+                       <field name="subject" oils_persist:virtual="true" />\r
+                       <field name="types_of_resource" oils_persist:virtual="true" />\r
+                       <field name="call_numbers" oils_persist:virtual="true" />\r
+                       <field name="edition" oils_persist:virtual="true" />\r
+                       <field name="online_loc" oils_persist:virtual="true" />\r
+                       <field name="synopsis" oils_persist:virtual="true" />\r
+                       <field name="physical_description" oils_persist:virtual="true" />\r
+                       <field name="toc" oils_persist:virtual="true" />\r
+                       <field name="copy_count" oils_persist:virtual="true" />\r
+                       <field name="series" oils_persist:virtual="true" />\r
+                       <field name="serials" oils_persist:virtual="true" />\r
+                       <field name="foreign_copy_maps" oils_persist:virtual="true" />\r
+               </fields>\r
+       </class>\r
+\r
+       <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">\r
+               <fields>\r
+                       <field name="err_msg" oils_persist:virtual="true" />\r
+                       <field name="type" oils_persist:virtual="true" />\r
+               </fields>\r
+       </class>\r
+\r
+       <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">\r
+               <fields>\r
+                       <field name="err_msg" oils_persist:virtual="true" />\r
+                       <field name="type" oils_persist:virtual="true" />\r
+               </fields>\r
+       </class>\r
+\r
+       <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">\r
+               <fields oils_persist:primary="matchpoint">\r
+                       <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>\r
+                       <field reporter:label="Success" name="success" reporter:datatype="bool"/>\r
+                       <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">\r
+        <!-- when the time is right, turn me into a view.  -->\r
+               <fields>\r
+            <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>\r
+            <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>\r
+            <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>\r
+            <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>\r
+            <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>\r
+            <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>\r
+               </fields>\r
+       </class>\r
+\r
+       <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">\r
+               <fields>\r
+                       <field name="public_name" oils_persist:virtual="true" />\r
+                       <field name="target_url" oils_persist:virtual="true" />\r
+                       <field name="target_coverage" oils_persist:virtual="true" />\r
+                       <field name="target_embargo" oils_persist:virtual="true" />\r
+               </fields>\r
+       </class>\r
+\r
+       <!-- Actually in the DB -->\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">\r
+                       <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>\r
+                       <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>\r
+                       <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>\r
+                       <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>\r
+                       <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>\r
+                               <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>\r
+                               <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>\r
+                               <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">\r
+                       <field reporter:label="Field ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Group" name="grp" reporter:datatype="link"/>\r
+                       <field reporter:label="Field" name="field" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_IMPORT_TRASH_FIELD">\r
+                    <context link="grp" field="owner"/>\r
+                </create>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_IMPORT_TRASH_FIELD">\r
+                    <context link="grp" field="owner"/>\r
+                </update>\r
+                               <delete permission="DELETE_IMPORT_TRASH_FIELD">\r
+                    <context link="grp" field="owner"/>\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class  id="vibtg" \r
+            controller="open-ils.cstore open-ils.pcrud" \r
+            oils_obj:fieldmapper="vandelay::import_bib_trash_group" \r
+            oils_persist:tablename="vandelay.import_bib_trash_group" \r
+            reporter:label="Import/Overlay Field Groups for Removal">\r
+               <fields oils_persist:primary="id" \r
+                oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+                       <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>\r
+                               <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">\r
+                       <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Import Record" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>\r
+                       <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>\r
+                       <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>\r
+                       <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>\r
+                       <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>\r
+                       <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>\r
+                       <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>\r
+                       <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>\r
+                       <field reporter:label="Status" name="status" reporter:datatype="int"/>\r
+                       <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>\r
+                       <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>\r
+                       <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>\r
+                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>\r
+                       <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>\r
+                       <field reporter:label="Price" name="price" reporter:datatype="money"/>\r
+                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>\r
+                       <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>\r
+                       <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>\r
+                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>\r
+                       <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>\r
+                       <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>\r
+                       <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>\r
+                       <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_IMPORT_ITEM">\r
+                    <context link="definition" field="owner"/>\r
+                               </create>\r
+                               <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">\r
+                    <context link="definition" field="owner"/>\r
+                               </retrieve>\r
+                               <update permission="UPDATE_IMPORT_ITEM">\r
+                    <context link="definition" field="owner"/>\r
+                               </update>\r
+                               <delete permission="DELETE_IMPORT_ITEM">\r
+                    <context link="definition" field="owner"/>\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">\r
+                       <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Tag" name="tag" reporter:datatype="text"/>\r
+                       <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>\r
+                       <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>\r
+                       <field reporter:label="Status" name="status" reporter:datatype="text"/>\r
+                       <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>\r
+                       <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>\r
+                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>\r
+                       <field reporter:label="Reference" name="ref" reporter:datatype="text"/>\r
+                       <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>\r
+                       <field reporter:label="Price" name="price" reporter:datatype="text"/>\r
+                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>\r
+                       <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>\r
+                       <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>\r
+                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>\r
+                       <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>\r
+                       <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>\r
+                       <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>\r
+                               <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"/>\r
+                               <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>\r
+                               <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">\r
+                       <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>\r
+                       <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>\r
+                       <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>\r
+                       <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>\r
+                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>\r
+                       <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>\r
+                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="MARC" name="marc" reporter:datatype="text"/>\r
+                       <field reporter:label="Queue" name="queue" reporter:datatype="link"/>\r
+                       <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>\r
+                       <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>\r
+                       <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>\r
+                       <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>\r
+                       <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>\r
+                       <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Quality" name="quality" reporter:datatype="int"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>\r
+                       <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>\r
+                       <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>\r
+                       <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>\r
+            <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>\r
+            <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>\r
+            <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>\r
+                       <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>\r
+                <retrieve/>\r
+                               <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>\r
+                               <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">\r
+                       <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Record" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="Field" name="field" reporter:datatype="link"/>\r
+                       <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">\r
+                       <field reporter:label="Match ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>\r
+                       <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>\r
+                       <field reporter:label="Quality" name="quality" reporter:datatype="text"/>\r
+                       <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>\r
+                       <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                               <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">\r
+                       <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>\r
+                       <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="MARC" name="marc" reporter:datatype="text"/>\r
+                       <field reporter:label="Queue" name="queue" reporter:datatype="link"/>\r
+                       <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>\r
+                       <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>\r
+                       <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>\r
+                       <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>\r
+                       <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Quality" name="quality" reporter:datatype="int"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>\r
+                       <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>\r
+                       <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>\r
+            <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>\r
+            <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>\r
+                       <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>\r
+                <retrieve/>\r
+                               <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>\r
+                               <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">\r
+                       <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Record" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="Field" name="field" reporter:datatype="link"/>\r
+                       <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="vqar"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">\r
+                       <field reporter:label="Match ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>\r
+                       <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>\r
+                       <field reporter:label="Quality" name="quality" reporter:datatype="int"/>\r
+                       <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>\r
+                       <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                               <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">\r
+                       <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>\r
+                               <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>\r
+                               <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>\r
+                               <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">\r
+                       <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>\r
+                       <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>\r
+                       <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>\r
+                       <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>\r
+                       <field reporter:label="Tag" name="tag" reporter:datatype="text"/>\r
+                       <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>\r
+            <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>\r
+                       <field reporter:label="Importance" name="quality" reporter:datatype="int"/>\r
+                       <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>\r
+                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>\r
+                       <link field="svf" reltype="has_a" key="id" map="" class="crad"/>\r
+                       <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_IMPORT_MATCH_SET">\r
+                    <context link="match_set" field="owner"/>\r
+                               </create>\r
+                               <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">\r
+                    <context link="match_set" field="owner"/>\r
+                               </retrieve>\r
+                               <update permission="ADMIN_IMPORT_MATCH_SET">\r
+                    <context link="match_set" field="owner"/>\r
+                               </update>\r
+                               <delete permission="ADMIN_IMPORT_MATCH_SET">\r
+                    <context link="match_set" field="owner"/>\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">\r
+                       <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>\r
+                       <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>\r
+                       <field reporter:label="Tag" name="tag" reporter:datatype="text"/>\r
+                       <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"/>\r
+                       <field reporter:label="Quality" name="quality" reporter:datatype="int"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_IMPORT_MATCH_SET">\r
+                    <context link="match_set" field="owner"/>\r
+                               </create>\r
+                               <retrieve permission="ADMIN_IMPORT_MATCH_SET">\r
+                    <context link="match_set" field="owner"/>\r
+                               </retrieve>\r
+                               <update permission="ADMIN_IMPORT_MATCH_SET">\r
+                    <context link="match_set" field="owner"/>\r
+                               </update>\r
+                               <delete permission="ADMIN_IMPORT_MATCH_SET">\r
+                    <context link="match_set" field="owner"/>\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">\r
+                       <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>\r
+                       <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>\r
+                       <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>\r
+               </links>\r
+       </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="name">\r
+            <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+            <field reporter:label="Value" name="value"  reporter:datatype="text"/>\r
+            <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>\r
+        </fields>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>\r
+                <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>\r
+                <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>\r
+                <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id">\r
+            <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+            <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+            <field reporter:label="Function" name="func"  reporter:datatype="text"/>\r
+            <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>\r
+        </fields>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>\r
+                       <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>\r
+                       <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>\r
+                       <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+                       <link field="norm" reltype="has_a" key="id" map="" class="cin"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="ID"   name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+        </fields>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_TAG_TABLE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_TAG_TABLE" global_required="true"/>\r
+                <delete permission="ADMIN_TAG_TABLE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="ID"   name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />\r
+                       <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />\r
+                       <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>\r
+                       <field reporter:label="Repeatabl?" name="repeatable" reporter:datatype="bool"/>\r
+                       <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_TAG_TABLE" context_field="owner"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_TAG_TABLE" context_field="owner"/>\r
+                <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="ID"   name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />\r
+                       <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />\r
+                       <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />\r
+                       <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>\r
+                       <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_TAG_TABLE" context_field="owner"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_TAG_TABLE" context_field="owner"/>\r
+                <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="name">\r
+                       <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" />\r
+                       <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>\r
+                       <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>\r
+                       <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>\r
+                       <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>\r
+                       <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>\r
+                       <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>\r
+                       <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>\r
+                       <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>\r
+                       <field reporter:label="Format" name="format" reporter:datatype="link"/>\r
+                       <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>\r
+                       <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>\r
+                       <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>\r
+                       <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>\r
+                       <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>\r
+                       <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="format" reltype="has_a" key="name" map="" class="cxt"/>\r
+                       <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_SVF" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_SVF" global_required="true"/>\r
+                <delete permission="ADMIN_SVF" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+            <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_SMS_CARRIER" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_SMS_CARRIER" global_required="true"/>\r
+                <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="coded_value">\r
+                       <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>\r
+                       <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CODED_VALUE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CODED_VALUE" global_required="true"/>\r
+                <delete permission="ADMIN_CODED_VALUE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>\r
+                       <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="attr" reltype="has_a" key="name" map="" class="crad"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>\r
+                       <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>\r
+                       <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="attr" reltype="has_a" key="name" map="" class="crad"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+\r
+       <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">\r
+               <fields oils_persist:primary="source">\r
+                       <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>\r
+                       <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 -->\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields>\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>\r
+                       <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>\r
+                       <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>\r
+                       <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>\r
+                       <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>\r
+                       <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="attr" reltype="has_a" key="name" map="" class="crad"/>\r
+                       <link field="norm" reltype="has_a" key="id" map="" class="cin"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>\r
+                       <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>\r
+                       <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+            <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>\r
+            <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>\r
+            <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>\r
+                       <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CODED_VALUE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CODED_VALUE" global_required="true"/>\r
+                <delete permission="ADMIN_CODED_VALUE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">\r
+                       <field name="id"            reporter:datatype="id"   reporter:label="ID"/>\r
+                       <field name="label"         reporter:datatype="text" reporter:label="Label"/>\r
+                       <field name="host"          reporter:datatype="text" reporter:label="Host"/>\r
+                       <field name="username"      reporter:datatype="text" reporter:label="Username"/>\r
+                       <field name="password"      reporter:datatype="text" reporter:label="Password"/>\r
+                       <field name="account"       reporter:datatype="text" reporter:label="Account"/>\r
+                       <field name="path"          reporter:datatype="text" reporter:label="Path"/>\r
+                       <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>\r
+                       <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>\r
+                <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>\r
+                <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>\r
+                <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="name">\r
+            <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>\r
+            <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+            <field reporter:label="Host" name="host"  reporter:datatype="text"/>\r
+            <field reporter:label="Port" name="port"  reporter:datatype="int"/>\r
+            <field reporter:label="DB" name="db"  reporter:datatype="text"/>\r
+            <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>\r
+            <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>\r
+            <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>\r
+            <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>\r
+            <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>\r
+        </fields>\r
+        <links>\r
+            <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>\r
+            <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+                <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">\r
+            <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>\r
+            <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>\r
+            <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+            <field reporter:label="Code" name="code"  reporter:datatype="int"/>\r
+            <field reporter:label="Format" name="format"  reporter:datatype="int"/>\r
+            <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>\r
+        </fields>\r
+        <links>\r
+            <link field="source" reltype="has_a" key="name" map="" class="czs"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+                <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <class id="czifm" controller="open-ils.cstore open-ils.pcrud" \r
+                       oils_obj:fieldmapper="config::z3950_index_field_map" \r
+                       oils_persist:tablename="config.z3950_index_field_map" \r
+                       reporter:label="Z39.50 Index Field Map">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">\r
+            <field reporter:label="Map ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+            <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>\r
+            <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>\r
+            <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>\r
+            <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>\r
+        </fields>\r
+        <links>\r
+            <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>\r
+            <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>\r
+            <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+                <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">\r
+                       <field reporter:label="Output ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Data" name="data" reporter:datatype="text"/>\r
+                       <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>\r
+                       <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>\r
+                       <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+            <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>\r
+            <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                               <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="key">\r
+                       <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>\r
+                       <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>\r
+                               <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">\r
+               <fields oils_persist:primary="module">\r
+                       <field reporter:label="Module Name" name="module" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="module">\r
+                       <field reporter:label="Module Name" name="module" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>\r
+                               <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="module">\r
+                       <field reporter:label="Module Name" name="module" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>\r
+                               <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="module">\r
+                       <field reporter:label="Module Name" name="module" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>\r
+                               <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">\r
+                       <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>\r
+                       <field reporter:label="Field Path" name="path" reporter:datatype="text"/>\r
+                       <field reporter:label="Collector" name="collector" reporter:datatype="link"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>\r
+                       <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">\r
+                    <context link="event_def" field="owner"/>\r
+                </create>\r
+                               <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">\r
+                    <context link="event_def" field="owner"/>\r
+                </retrieve>\r
+                               <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">\r
+                    <context link="event_def" field="owner"/>\r
+                </update>\r
+                               <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">\r
+                    <context link="event_def" field="owner"/>\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">\r
+                       <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>\r
+                       <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>\r
+                       <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>\r
+                       <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>\r
+                       <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>\r
+                       <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>\r
+                       <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>\r
+                       <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>\r
+                       <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>\r
+                       <field reporter:label="Template" name="template"  reporter:datatype="text"/>\r
+                       <field reporter:label="Name" name="name"  reporter:datatype="text"/>\r
+                       <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>\r
+                       <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>\r
+                       <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>\r
+                       <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>\r
+                       <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>\r
+                       <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>\r
+                       <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>\r
+                       <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>\r
+                       <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>\r
+                       <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="hook" reltype="has_a" key="key" map="" class="ath"/>\r
+                       <link field="validator" reltype="has_a" key="module" map="" class="atval"/>\r
+                       <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>\r
+                       <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>\r
+                       <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>\r
+                       <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>\r
+                       <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>\r
+                       <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>\r
+                               <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>\r
+                               <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>\r
+                               <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">\r
+                       <field reporter:label="Event ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Target ID" name="target" reporter:datatype="int"/>\r
+                       <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>\r
+                       <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="State" name="state" reporter:datatype="text"/>\r
+                       <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>\r
+                       <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>\r
+                       <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>\r
+                       <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>\r
+                       <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>\r
+                       <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>\r
+                       <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>\r
+                       <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>\r
+               </links>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">\r
+                       <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>\r
+                       <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>\r
+                       <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">\r
+                    <context link="event_def" field="owner"/>\r
+                </create>\r
+                               <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">\r
+                    <context link="event_def" field="owner"/>\r
+                </retrieve>\r
+                               <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">\r
+                    <context link="event_def" field="owner"/>\r
+                </update>\r
+                               <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">\r
+                    <context link="event_def" field="owner"/>\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <oils_persist:source_definition><![CDATA[\r
+               SELECT  atevdef.hook,\r
+                       atevdef.name,\r
+                       atevdef.reactor,\r
+                       atev.id,\r
+                       atev.event_def,\r
+                       atev.add_time,\r
+                       atev.run_time,\r
+                       atev.start_time,\r
+                       atev.update_time,\r
+                       atev.complete_time,\r
+                       atev.update_process,\r
+                       atev.state,\r
+                       atev.user_data,\r
+                       atev.template_output,\r
+                       atev.error_output,\r
+                       atev.async_output,\r
+                       targ_circ.id AS target_circ,\r
+                       targ_ahr.id AS target_hold,\r
+                       COALESCE(\r
+                               targ_circ.circ_lib,\r
+                               targ_ahr.pickup_lib\r
+                       ) AS perm_lib\r
+               FROM action_trigger.event atev\r
+               JOIN action_trigger.event_definition atevdef ON\r
+                       (atevdef.id = atev.event_def)\r
+               JOIN action_trigger.hook ath ON\r
+                       (ath.key = atevdef.hook)\r
+               LEFT JOIN action.circulation targ_circ ON\r
+                       (ath.core_type = 'circ' AND targ_circ.id = atev.target)\r
+               LEFT JOIN action.hold_request targ_ahr ON\r
+                       (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)\r
+               WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (\r
+                       SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(\r
+                               'circ.staff.max_visible_event_age',\r
+                               COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)\r
+                       ) UNION\r
+                       SELECT '1000 YEARS'::INTERVAL AS value\r
+               ) ous)\r
+               ]]></oils_persist:source_definition>\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Hook" name="hook" reporter:datatype="link" />\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" />\r
+                       <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />\r
+                       <field reporter:label="Event ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />\r
+                       <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />\r
+                       <field reporter:label="Event State" name="state" reporter:datatype="text" />\r
+                       <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />\r
+                       <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />\r
+                       <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />\r
+                       <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />\r
+                       <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />\r
+                       <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />\r
+                       <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />\r
+               </fields>\r
+               <links>\r
+                       <link field="hook" reltype="has_a" key="key" map="" class="ath" />\r
+                       <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />\r
+                       <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />\r
+                       <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />\r
+                       <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />\r
+                       <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />\r
+                       <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">\r
+                       <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>\r
+                       <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>\r
+                       <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MOD" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CIRC_MOD" global_required="true"/>\r
+                <delete permission="ADMIN_CIRC_MOD" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>\r
+                       <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>\r
+                <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>\r
+                <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_COPY_BTYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_COPY_BTYPE" global_required="true"/>\r
+                <delete permission="DELETE_COPY_BTYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_CN_BTYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_CN_BTYPE" global_required="true"/>\r
+                <delete permission="DELETE_CN_BTYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_BIB_PTYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_BIB_PTYPE" global_required="true"/>\r
+                <delete permission="DELETE_BIB_PTYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>\r
+                       <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>\r
+               </fields>\r
+        <links>\r
+            <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>\r
+            <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>\r
+            <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="UPDATE_COPY">\r
+                    <context link="target_copy" field="circ_lib"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="UPDATE_COPY">\r
+                    <context link="target_copy" field="circ_lib"/>\r
+                </update>\r
+                <delete permission="UPDATE_COPY">\r
+                    <context link="target_copy" field="circ_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_BIB_BTYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_BIB_BTYPE" global_required="true"/>\r
+                <delete permission="DELETE_BIB_BTYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_USER_BTYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_USER_BTYPE" global_required="true"/>\r
+                <delete permission="DELETE_USER_BTYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>\r
+                       <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_MARC_CODE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_MARC_CODE" global_required="true"/>\r
+                <delete permission="ADMIN_MARC_CODE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">\r
+            <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+            <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>\r
+            <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>\r
+            <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>\r
+            <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>\r
+            <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>\r
+            <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>\r
+            <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>\r
+            <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>\r
+            <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>\r
+            <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>\r
+            <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>\r
+            <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>\r
+            <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>\r
+            <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>\r
+            <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>\r
+        </fields>\r
+        <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">\r
+            <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+            <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>\r
+            <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>\r
+            <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>\r
+            <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>\r
+            <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>\r
+            <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>\r
+            <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>\r
+            <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>\r
+            <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>\r
+            <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>\r
+            <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>\r
+            <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>\r
+            <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>\r
+            <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>\r
+            <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>\r
+            <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>\r
+            <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>\r
+        </fields>\r
+        <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">\r
+            <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Active?" name="active" reporter:datatype="bool"/>\r
+            <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>\r
+            <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>\r
+        </fields>\r
+        <links>\r
+            <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>\r
+            <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>\r
+                <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">\r
+                       <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Active?" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>\r
+                       <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>\r
+                       <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>\r
+            <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>\r
+                       <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>\r
+                       <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>\r
+                       <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>\r
+                       <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>\r
+                       <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>\r
+                       <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>\r
+                       <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>\r
+                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>\r
+                       <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>\r
+                       <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>\r
+                       <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>\r
+                       <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>\r
+                       <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>\r
+            <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">\r
+                       <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Active?" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>\r
+                       <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>\r
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>\r
+                       <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>\r
+                       <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>\r
+            <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>\r
+                       <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>\r
+                       <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>\r
+            <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>\r
+                       <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>\r
+            <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>\r
+            <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>\r
+            <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>\r
+                       <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>\r
+                       <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>\r
+                       <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>\r
+                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>\r
+                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>\r
+                       <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>\r
+                       <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>\r
+                       <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>\r
+                       <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>\r
+                       <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>\r
+                       <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>\r
+            <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>\r
+                <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">\r
+            <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+            <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+        </fields>\r
+        <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">\r
+            <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+            <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>\r
+            <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>\r
+            <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>\r
+            <field reporter:label="Global" name="global" reporter:datatype="bool"/>\r
+            <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+        </fields>\r
+        <links>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">\r
+            <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>\r
+            <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>\r
+            <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>\r
+            <field reporter:label="Active" name="active" reporter:datatype="bool"/>\r
+        </fields>\r
+        <links>\r
+            <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>\r
+            <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="matchpoint" field="org_unit"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="matchpoint" field="org_unit"/>\r
+                </update>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="matchpoint" field="org_unit"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">\r
+            <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>\r
+            <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>\r
+        </fields>\r
+        <links>\r
+            <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>\r
+            <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">\r
+            <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>\r
+            <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>\r
+        </fields>\r
+        <links>\r
+            <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>\r
+            <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">\r
+            <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>\r
+            <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>\r
+            <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>\r
+        </fields>\r
+        <links>\r
+            <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>\r
+            <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">\r
+                    <context link="limit_set" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">\r
+                       <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_IDENT_TYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_IDENT_TYPE" global_required="true"/>\r
+                <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">\r
+                       <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Question ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Question" name="question" reporter:datatype="text"/>\r
+                       <field reporter:label="Survey" name="survey" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="survey" reltype="has_a" key="id" map="" class="asv"/>\r
+                       <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>\r
+                       <link field="answers" reltype="has_many" key="question" map="" class="asva"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_SURVEY">\r
+                    <context link="survey" field="owner"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_SURVEY">\r
+                    <context link="survey" field="owner"/>\r
+                </update>\r
+                <delete permission="ADMIN_SURVEY">\r
+                    <context link="survey" field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="">\r
+                       <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>\r
+                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>\r
+                       <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>\r
+                       <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                                       <context link="usr" field="home_ou" />\r
+                               </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="">\r
+                       <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>\r
+                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>\r
+                       <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>\r
+                       <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">\r
+                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Message ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>\r
+                       <field reporter:label="Title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link" />\r
+                       <field reporter:label="Message" name="message" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions> <!-- created magically, so no create action -->\r
+                               <retrieve permission="VIEW_USER" context_field="sending_lib" />\r
+                               <update permission="UPDATE_USER" context_field="sending_lib" />\r
+                               <delete permission="UPDATE_USER" context_field="sending_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <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)">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">\r
+                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Message ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>\r
+                       <field reporter:label="Title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link" />\r
+                       <field reporter:label="Message" name="message" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions> <!-- created magically, so no create action -->\r
+                               <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>\r
+                               <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">\r
+                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Note ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>\r
+                       <field reporter:label="Note Title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link" />\r
+                       <field reporter:label="Note Content" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="UPDATE_USER" context_field="owner">\r
+                    <context link="usr" field="home_ou"/>\r
+                </create>\r
+                               <!-- note: public notes are still accessible via API -->\r
+                <retrieve permission="UPDATE_USER">\r
+                    <context link="usr" field="home_ou"/>\r
+                               </retrieve>\r
+                <update permission="UPDATE_USER">\r
+                    <context link="usr" field="home_ou"/>\r
+                               </update>\r
+                <delete permission="UPDATE_USER">\r
+                    <context link="usr" field="home_ou"/>\r
+                               </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">\r
+                       <field reporter:label="Request ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+       <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">\r
+                       <field reporter:label="Setting ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Name" name="name" reporter:datatype="link"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="name" reltype="has_a" key="name" map="" class="cust"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">\r
+                       <field name="field" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="source" reporter:datatype="link"/>\r
+                       <field name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">\r
+                       <field reporter:label="Use ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Item" name="item" reporter:datatype="int" />\r
+                       <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="item" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">\r
+                       <field reporter:label="Use ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>\r
+                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">\r
+                       <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>\r
+                       <field reporter:label="Destination" name="dest" reporter:datatype="link"/>\r
+                       <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>\r
+                       <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>\r
+                       <field reporter:label="Source" name="source" reporter:datatype="link"/>\r
+                       <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>\r
+                       <link field="dest" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="TRANSIT_COPY" context_field="owner">\r
+                    <context link="target_copy" field="circ_lib"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="UPDATE_TRANSIT" context_field="dest source"/>\r
+                <delete permission="DELETE_TRANSIT" context_field="dest source"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">\r
+                       <field reporter:label="Answer" name="answer" reporter:datatype="link"/>\r
+                       <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Answer ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Question" name="question" reporter:datatype="link"/>\r
+                       <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />\r
+                       <field reporter:label="Survey" name="survey" reporter:datatype="link"/>\r
+                       <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="question" reltype="has_a" key="id" map="" class="asvq"/>\r
+                       <link field="survey" reltype="has_a" key="id" map="" class="asv"/>\r
+                       <link field="answer" reltype="has_a" key="id" map="" class="asva"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_SURVEY">\r
+                    <context link="survey" field="owner"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_SURVEY">\r
+                    <context link="survey" field="owner"/>\r
+                </update>\r
+                <delete permission="ADMIN_SURVEY">\r
+                    <context link="survey" field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">\r
+                       <field name="bucket" />\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="target_copy" reporter:datatype="link"/>\r
+                       <field name="create_time" reporter:datatype="timestamp" />\r
+                       <field name="pos" reporter:datatype="int" />\r
+                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>\r
+            <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>\r
+               </links>\r
+       </class>\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="item" reporter:datatype="link"/>\r
+                       <field name="note" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>\r
+               </links>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">\r
+                       <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>\r
+                       <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">\r
+                       <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>\r
+                       <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>\r
+                       <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>\r
+                       <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />\r
+                       <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />\r
+                       <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />\r
+                       <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>\r
+                       <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>\r
+                       <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>\r
+                       <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>\r
+                       <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>\r
+                       <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">\r
+                       <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>\r
+                       <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>\r
+                       <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>\r
+                       <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+               </fields>\r
+               <links>\r
+                       <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>\r
+                       <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+                       <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>\r
+                       <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>\r
+                       <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                               <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+    <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">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">\r
+            <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>\r
+            <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>\r
+        </fields>\r
+        <links>\r
+            <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>\r
+            <link field="axis" reltype="has_a" key="code" map="" class="aba"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+                <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+       <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">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">\r
+                       <field name="active" reporter:datatype="bool"/>\r
+                       <field name="create_date" reporter:datatype="timestamp"/>\r
+                       <field name="creator" />\r
+                       <field name="deleted" reporter:datatype="bool"/>\r
+                       <field name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field name="editor" />\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="last_xact_id" />\r
+                       <field name="marc" />\r
+                       <field name="source" />\r
+                       <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>\r
+                       <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>\r
+                       <field name="heading" />\r
+                       <field name="simple_heading" />\r
+                       <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="notes" reltype="has_many" key="record" map="" class="arn"/>\r
+                       <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>\r
+                       <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_MARC" global_required="true"/>\r
+                               <delete permission="UPDATE_MARC" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">\r
+                       <field name="char_encoding" />\r
+                       <field name="id" />\r
+                       <field name="record" />\r
+                       <field name="record_status" />\r
+                       <field name="thesaurus" />\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="are"/>\r
+                       <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>\r
+               </links>\r
+       </class>\r
+       <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="bib" reporter:datatype="link" />\r
+                       <field name="authority" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="bib" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="authority" reltype="has_a" key="id" map="" class="are"/>\r
+               </links>\r
+       </class>\r
+       <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="record" reporter:datatype="link" />\r
+                       <field name="atag" reporter:datatype="link" />\r
+                       <field name="value" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="are"/>\r
+                       <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>\r
+               </links>\r
+       </class>\r
+       <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="code" oils_persist:sequence="">\r
+                       <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>\r
+                       <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_MARC_CODE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_MARC_CODE" global_required="true"/>\r
+                <delete permission="DELETE_MARC_CODE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">\r
+                       <field name="accepting_usr" />\r
+                       <field name="amount" reporter:datatype="money" />\r
+                       <field name="amount_collected" reporter:datatype="money" />\r
+                       <field name="approval_code" reporter:datatype="text"/>\r
+                       <field name="cash_drawer" reporter:datatype="link"/>\r
+                       <field name="cc_first_name" reporter:datatype="text"/>\r
+                       <field name="cc_last_name" reporter:datatype="text"/>\r
+                       <field name="cc_number" reporter:datatype="text"/>\r
+                       <field name="cc_order_number" reporter:datatype="text"/>\r
+                       <field name="cc_type" reporter:datatype="text"/>\r
+                       <field name="cc_processor" reporter:datatype="text"/>\r
+                       <field name="expire_month" reporter:datatype="int" />\r
+                       <field name="expire_year" reporter:datatype="int" />\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="note" reporter:datatype="text"/>\r
+                       <field name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field name="xact" reporter:datatype="link"/>\r
+                       <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>\r
+                       <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">\r
+               <fields oils_persist:primary="name">\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" />\r
+                       <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>\r
+                       <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>\r
+                       <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_XML_TRANSFORM" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>\r
+                <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="alias">\r
+                       <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>\r
+                       <field reporter:label="Class" name="field_class" reporter:datatype="link"/>\r
+                       <field reporter:label="Field" name="field" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>\r
+                <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="name">\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />\r
+                       <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />\r
+                       <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />\r
+                       <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />\r
+                       <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />\r
+                       <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />\r
+                       <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />\r
+                       <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_METABIB_CLASS" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_METABIB_CLASS" global_required="true"/>\r
+                <delete permission="DELETE_METABIB_CLASS" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">\r
+                       <field reporter:label="Class" name="field_class" reporter:datatype="link"/>\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>\r
+                       <field reporter:label="Weight" name="weight" reporter:datatype="int" />\r
+                       <field reporter:label="Format" name="format" reporter:datatype="link"/>\r
+                       <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />\r
+                       <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />\r
+                       <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />\r
+                       <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />\r
+                       <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />\r
+                       <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />\r
+               </fields>\r
+               <links>\r
+                       <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_METABIB_FIELD" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_METABIB_FIELD" global_required="true"/>\r
+                <delete permission="DELETE_METABIB_FIELD" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />\r
+                       <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />\r
+                       <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />\r
+                       <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />\r
+                       <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />\r
+                       <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />\r
+                       <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />\r
+                       <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />\r
+                       <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />\r
+                       <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />\r
+               </fields>\r
+               <links>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>\r
+                               <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>\r
+                               <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>\r
+                               <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="xpath" reporter:datatype="text"/>\r
+                       <field name="format" reporter:datatype="link"/>\r
+                       <field name="first_word" reporter:datatype="bool" />\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>\r
+                <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="code" oils_persist:sequence="">\r
+                       <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_MARC_CODE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_MARC_CODE" global_required="true"/>\r
+                <delete permission="DELETE_MARC_CODE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="code" oils_persist:sequence="">\r
+                       <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>\r
+                       <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_MARC_CODE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_MARC_CODE" global_required="true"/>\r
+                <delete permission="ADMIN_MARC_CODE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+    <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">\r
+            <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>\r
+            <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>\r
+        </fields>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+       <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+                       <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>\r
+                <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+                       <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>\r
+                <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">\r
+                       <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>\r
+                       <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>\r
+                       <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>\r
+                       <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>\r
+                       <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>\r
+                       <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>\r
+                       <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>\r
+                       <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>\r
+                       <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>\r
+                       <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>\r
+                       <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_VOLUME" context_field="owning_lib"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_VOLUME" context_field="owning_lib"/>\r
+                <delete permission="DELETE_VOLUME" context_field="owning_lib"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">\r
+                       <field reporter:label="URI ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="URI" name="href" reporter:datatype="text"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+                       <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>\r
+                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>\r
+                       <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>\r
+        </links>\r
+       </class>\r
+       <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="URI" name="uri" reporter:datatype="int"/>\r
+                       <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="uri" reltype="has_a" key="id" map="" class="auri"/>\r
+                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+               </links>\r
+       </class>\r
+       <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="value" oils_persist:i18n="true" />\r
+               </fields>\r
+               <links/>\r
+       </class>\r
+       <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">\r
+               <fields oils_persist:primary="usr" oils_persist:sequence="">\r
+                       <field name="balance_owed" reporter:datatype="money" />\r
+                       <field name="total_owed" reporter:datatype="money" />\r
+                       <field name="total_paid" reporter:datatype="money" />\r
+                       <field name="usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER">\r
+                    <context link="usr" field="home_ou"/>\r
+                </retrieve>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">\r
+                       <field name="collector" />\r
+                       <field name="enter_time" reporter:datatype="timestamp"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="location" reporter:datatype="link"/>\r
+                       <field name="usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="collector" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="location" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="money.collections_tracker.create" context_field="location"/>\r
+                <retrieve permission="money.collections_tracker.create" context_field="location"/> \r
+                <delete permission="money.collections_tracker.create" context_field="location"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">\r
+                       <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>\r
+                       <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>\r
+                       <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>\r
+                       <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />\r
+                       <field reporter:label="Record Source" name="source" reporter:datatype="link"/>\r
+                       <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>\r
+                       <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>\r
+                       <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>\r
+                       <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>\r
+                       <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>\r
+                       <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>\r
+                       <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>\r
+                       <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>\r
+                       <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>\r
+                       <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>\r
+                       <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>\r
+                       <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>\r
+                       <link field="notes" reltype="has_many" key="record" map="" class="bren"/>\r
+                       <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>\r
+                       <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>\r
+                       <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>\r
+                       <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>\r
+                       <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>\r
+                       <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="cbs"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_MARC" global_required="true"/>\r
+               <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->\r
+                <delete permission="DELETE_RECORD" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">\r
+               <fields oils_persist:primary="id">\r
+                       <field name="dow_0_close" />\r
+                       <field name="dow_0_open" />\r
+                       <field name="dow_1_close" />\r
+                       <field name="dow_1_open" />\r
+                       <field name="dow_2_close" />\r
+                       <field name="dow_2_open" />\r
+                       <field name="dow_3_close" />\r
+                       <field name="dow_3_open" />\r
+                       <field name="dow_4_close" />\r
+                       <field name="dow_4_open" />\r
+                       <field name="dow_5_close" />\r
+                       <field name="dow_5_open" />\r
+                       <field name="dow_6_close" />\r
+                       <field name="dow_6_open" />\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="might_have" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>\r
+                <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="record" reporter:datatype="link"/>\r
+                       <field name="label" reporter:datatype="text"/>\r
+                       <field name="label_sortkey" reporter:datatype="text"/>\r
+                       <field name="deleted" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>\r
+                <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="target_copy" reporter:datatype="link" />\r
+                       <field name="part" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="part" reltype="has_a" key="id" map="" class="bmp"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="MAP_MONOGRAPH_PART" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="MAP_MONOGRAPH_PART" global_required="true"/>\r
+                <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">\r
+                       <field name="close_end" reporter:datatype="timestamp" />\r
+                       <field name="close_start" reporter:datatype="timestamp" />\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field name="reason" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>\r
+                <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">\r
+                       <field name="extended" reporter:datatype="interval"/>\r
+                       <field name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field name="max_renewals" reporter:datatype="int" />\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="normal" reporter:datatype="interval"/>\r
+                       <field name="shrt" reporter:datatype="interval"/>\r
+               </fields>\r
+               <links>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_CIRC_DURATION" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_CIRC_DURATION" global_required="true"/>\r
+                <delete permission="DELETE_CIRC_DURATION" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>\r
+                       <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+            <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_CIRC_DURATION" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_CIRC_DURATION" global_required="true"/>\r
+                <delete permission="DELETE_CIRC_DURATION" global_required="true"/>\r
+            </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>\r
+                       <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_CIRC_DURATION" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_CIRC_DURATION" global_required="true"/>\r
+                <delete permission="DELETE_CIRC_DURATION" global_required="true"/>\r
+            </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="">\r
+                       <field name="balance_owed" reporter:datatype="money"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="last_billing_note" reporter:datatype="text"/>\r
+                       <field name="last_billing_ts" reporter:datatype="timestamp"/>\r
+                       <field name="last_billing_type" reporter:datatype="text"/>\r
+                       <field name="last_payment_note" reporter:datatype="text"/>\r
+                       <field name="last_payment_ts" reporter:datatype="timestamp"/>\r
+                       <field name="last_payment_type" reporter:datatype="text"/>\r
+                       <field name="total_owed" reporter:datatype="money"/>\r
+                       <field name="total_paid" reporter:datatype="money"/>\r
+                       <field name="usr" reporter:datatype="link"/>\r
+                       <field name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field name="xact_start" reporter:datatype="timestamp" />\r
+                       <field name="xact_type" reporter:datatype="text"/>\r
+                       <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="billing_location" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>\r
+                       <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>\r
+                       <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>\r
+                       <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>\r
+                       <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                                       <context link="usr" field="home_ou" />\r
+                               </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">\r
+                       <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>\r
+                       <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>\r
+                       <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>\r
+                       <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>\r
+                       <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />\r
+                       <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />\r
+                       <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />\r
+                       <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>\r
+                       <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>\r
+                       <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>\r
+                       <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>\r
+                       <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>\r
+                       <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="User ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>\r
+                       <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>\r
+                       <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>\r
+                       <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>\r
+                       <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>\r
+                       <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>\r
+                       <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>\r
+                       <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>\r
+                       <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>\r
+                       <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>\r
+                       <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>\r
+                       <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>\r
+                       <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>\r
+                       <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>\r
+                       <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>\r
+                       <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>\r
+                       <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>\r
+                       <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>\r
+                       <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>\r
+                       <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>\r
+                       <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>\r
+                       <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>\r
+                       <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>\r
+                       <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>\r
+                       <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>\r
+                       <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>\r
+                       <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="standing" reltype="has_a" key="id" map="" class="cst"/>\r
+                       <link field="card" reltype="has_a" key="id" map="" class="ac"/>\r
+                       <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>\r
+                       <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>\r
+                       <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>\r
+                       <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>\r
+                       <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>\r
+                       <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>\r
+                       <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>\r
+                       <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>\r
+                       <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>\r
+                       <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>\r
+                       <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>\r
+                       <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>\r
+                       <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>\r
+                       <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>\r
+                       <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>\r
+                       <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>\r
+                       <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>\r
+                       <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>\r
+                       <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>\r
+                       <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>\r
+                       <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_USER" context_field="home_ou" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">\r
+                       <field name="id" reporter:label="ID" reporter:datatype="id" />\r
+                       <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>\r
+                       <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>\r
+                       <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>\r
+                       <field name="label" reporter:label="Label" reporter:datatype="text"/>\r
+                       <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>\r
+                       <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>\r
+                       <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>\r
+        </fields>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>\r
+                               <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">\r
+                       <field name="id" reporter:label="ID" reporter:datatype="id" />\r
+                       <field name="usr" reporter:label="User" reporter:datatype="link" />\r
+                       <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />\r
+                       <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />\r
+        </fields>\r
+        <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="RUN_REPORTS">\r
+                                       <context link="usr" field="home_ou" />\r
+                               </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">\r
+                       <field name="id" reporter:label="ID" reporter:datatype="id" />\r
+                       <field name="usr" reporter:label="Owning User" reporter:datatype="link" />\r
+                       <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />\r
+                       <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />\r
+                       <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field name="layout" reporter:label="Layout" reporter:datatype="text" />\r
+        </fields>\r
+        <links>\r
+                       <link field="usr" reltype="might_have" key="id" map="" class="au"/>\r
+                       <link field="org" reltype="might_have" key="id" map="" class="aou"/>\r
+                       <link field="ws" reltype="might_have" key="id" map="" class="aws"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">\r
+                                       <context link="usr" field="home_ou" />\r
+                                       <context link="ws" field="owning_lib" />\r
+                               </retrieve>\r
+                               <create permission="ADMIN_TOOLBAR" context_field="org">\r
+                                       <context link="usr" field="home_ou" />\r
+                                       <context link="ws" field="owning_lib" />\r
+                               </create>\r
+                               <update permission="ADMIN_TOOLBAR" context_field="org">\r
+                                       <context link="usr" field="home_ou" />\r
+                                       <context link="ws" field="owning_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_TOOLBAR" context_field="org">\r
+                                       <context link="usr" field="home_ou" />\r
+                                       <context link="ws" field="owning_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">\r
+               <fields oils_persist:primary="name">\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>\r
+                               <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">\r
+               <fields oils_persist:primary="name">\r
+                       <field name="name" reporter:label="Name" reporter:datatype="text"/>\r
+                       <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>\r
+                       <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>\r
+                       <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>\r
+                       <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>\r
+                       <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="name" reltype="has_many" key="name" map="" class="aus"/>\r
+                       <link field="grp" reltype="has_a" key="name" map="" class="csg"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>\r
+                               <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">\r
+               <fields oils_persist:primary="name">\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="datatype" reporter:datatype="text"/>\r
+                       <field name="view_perm" reporter:datatype="link"/>\r
+                       <field name="update_perm" reporter:datatype="link"/>\r
+                       <field name="fm_class" reporter:datatype="text"/>\r
+                       <field name="grp" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="name" reltype="has_many" key="name" map="" class="aous"/>\r
+                       <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>\r
+                       <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>\r
+                       <link field="grp" reltype="has_a" key="name" map="" class="csg"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>\r
+                               <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">\r
+                       <field name="id" />\r
+                       <field name="name"  reporter:datatype="text"/>\r
+                       <field name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="name" reltype="has_a" key="name" map="" class="coust"/>\r
+               </links>\r
+       </class>\r
+       <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">\r
+                       <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Note ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>\r
+                       <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>\r
+                       <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_COPY_NOTE">\r
+                    <context link="owning_copy" field="circ_lib"/>\r
+                </create>\r
+                <retrieve permission="VIEW_COPY_NOTES">\r
+                    <context link="owning_copy" field="circ_lib"/>\r
+                </retrieve>\r
+                <update permission="UPDATE_COPY_NOTE">\r
+                    <context link="owning_copy" field="circ_lib"/>\r
+                </update>\r
+                <delete permission="DELETE_COPY_NOTE">\r
+                    <context link="owning_copy" field="circ_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">\r
+                       <field reporter:label="Field ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>\r
+                       <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+       <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">\r
+                       <field name="fingerprint"  reporter:datatype="text"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="master_record" reporter:datatype="link"/>\r
+                       <field name="mods"  reporter:datatype="text"/>\r
+                       <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>\r
+               </links>\r
+       </class>\r
+       <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">\r
+                       <field name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>\r
+                <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">\r
+                       <field name="code"  reporter:datatype="text"/>\r
+                       <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="id" reporter:selector="code" reporter:datatype="id"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_PERM" global_required="true"/>\r
+                <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>\r
+                <update permission="UPDATE_PERM" global_required="true"/>\r
+                <delete permission="DELETE_PERM" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="metarecord" reporter:datatype="link"/>\r
+                       <field name="source" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>\r
+               </links>\r
+       </class>\r
+       <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="field" reporter:datatype="link"/>\r
+                       <field name="source" reporter:datatype="link"/>\r
+                       <field name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+       </class>\r
+       <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="value" reporter:datatype="text"/>\r
+                       <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>\r
+               </links>\r
+       </class>\r
+       <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="entry" reporter:datatype="link"/>\r
+                       <field name="def" reporter:datatype="link"/>\r
+                       <field name="source" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>\r
+                       <link field="def" reltype="has_a" key="id" map="" class="cmf"/>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+       <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="entry" reporter:datatype="link"/>\r
+                       <field name="simple_heading" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>\r
+                       <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>\r
+               </links>\r
+       </class>\r
+       <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">\r
+               <oils_persist:source_definition>\r
+                       SELECT * FROM metabib.author_field_entry\r
+                                               UNION ALL\r
+                       SELECT * FROM metabib.keyword_field_entry\r
+                                               UNION ALL\r
+                       SELECT * FROM metabib.identifier_field_entry\r
+                                               UNION ALL\r
+                       SELECT * FROM metabib.title_field_entry\r
+                                               UNION ALL\r
+                       SELECT * FROM metabib.subject_field_entry\r
+                                               UNION ALL\r
+                       SELECT * FROM metabib.series_field_entry\r
+               </oils_persist:source_definition>\r
+               <fields>\r
+                       <field name="field" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="source" reporter:datatype="link"/>\r
+                       <field name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+       </class>\r
+       <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">\r
+                       <field name="field" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="source" reporter:datatype="link"/>\r
+                       <field name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+       </class>\r
+       <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">\r
+                       <field name="accepting_usr" reporter:datatype="link"/>\r
+                       <field name="amount" reporter:datatype="money" />\r
+                       <field name="amount_collected" reporter:datatype="money" />\r
+                       <field name="cash_drawer" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="note"  reporter:datatype="text"/>\r
+                       <field name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field name="xact" reporter:datatype="link"/>\r
+                       <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>\r
+                       <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">\r
+                       <field name="accepting_usr" reporter:datatype="link"/>\r
+                       <field name="amount" reporter:datatype="money" />\r
+                       <field name="amount_collected" reporter:datatype="money" />\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="note"  reporter:datatype="text"/>\r
+                       <field name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field name="xact" reporter:datatype="link"/>\r
+                       <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>\r
+                       <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">\r
+                       <field name="accepting_usr" reporter:datatype="link"/>\r
+                       <field name="amount" reporter:datatype="money" />\r
+                       <field name="amount_collected" reporter:datatype="money" />\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="note"  reporter:datatype="text"/>\r
+                       <field name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field name="xact" reporter:datatype="link"/>\r
+                       <field name="billing" reporter:datatype="link"/>\r
+                       <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>\r
+                       <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+                       <link field="billing" reltype="might_have" key="id" class="mb"/>\r
+               </links>\r
+       </class>\r
+       <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">\r
+                       <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+                       <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>\r
+                       <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>\r
+                       <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>\r
+                       <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>\r
+                       <link field="audience" reltype="has_a" key="code" map="" class="cam"/>\r
+                       <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">\r
+                       <field name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field name="name"  reporter:datatype="text"/>\r
+                       <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="block_list" reporter:datatype="text"/>\r
+                       <field name="staff_alert" reporter:datatype="bool"/>\r
+                       <field name="org_depth" reporter:datatype="int"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>\r
+                <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>\r
+                <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>\r
+                <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">\r
+                       <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>\r
+                       <field name="grp"  reporter:datatype="link" reporter:label="Group"/>\r
+                       <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>\r
+                       <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>\r
+                       <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>\r
+                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>\r
+                <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>\r
+                <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>\r
+                <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">\r
+                       <field name="holdable" reporter:datatype="bool"/>\r
+                       <field name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="opac_visible" reporter:datatype="bool"/>\r
+            <field name="copy_active" reporter:datatype="bool"/>\r
+           <field name="restrict_copy_delete" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_COPY_STATUS" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_COPY_STATUS" global_required="true"/>\r
+                <delete permission="DELETE_COPY_STATUS" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">\r
+                       <field name="id" reporter:datatype="id" reporter:label="ID" />\r
+                       <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>\r
+                       <field name="usr" reporter:datatype="link" reporter:label="User"/>\r
+                       <field name="staff" reporter:datatype="link" reporter:label="Staff"/>\r
+                       <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>\r
+                       <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>\r
+                       <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>\r
+                       <field name="note" reporter:datatype="text" reporter:label="Note"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>\r
+                               <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>\r
+                               <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>\r
+                               <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">\r
+                       <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>\r
+                       <field reporter:label="City" name="city"  reporter:datatype="text"/>\r
+                       <field reporter:label="Country" name="country"  reporter:datatype="text"/>\r
+                       <field reporter:label="County" name="county"  reporter:datatype="text"/>\r
+                       <field reporter:label="Address ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>\r
+                       <field reporter:label="State" name="state"  reporter:datatype="text"/>\r
+                       <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>\r
+                       <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>\r
+                       <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>\r
+                       <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>\r
+                       <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>\r
+               </links>\r
+       </class>\r
+       <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">\r
+                       <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>\r
+                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />\r
+                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>\r
+                       <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>\r
+                       <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>\r
+                       <field reporter:label="City" name="city"  reporter:datatype="text"/>\r
+                       <field reporter:label="County" name="county"  reporter:datatype="text"/>\r
+                       <field reporter:label="State" name="state"  reporter:datatype="text"/>\r
+                       <field reporter:label="Country" name="country"  reporter:datatype="text"/>\r
+                       <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>\r
+                       <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>\r
+                       <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>\r
+                               <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>\r
+                               <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>\r
+                               <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+\r
+       <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>\r
+                       <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Target" name="target" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">\r
+                       <field name="call_number" />\r
+                       <field name="create_date" reporter:datatype="timestamp"/>\r
+                       <field name="creator" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="pub" reporter:datatype="bool"/>\r
+                       <field name="title"  reporter:datatype="text"/>\r
+                       <field name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_VOLUME_NOTE">\r
+                    <context link="call_number" field="owning_lib"/>\r
+                </create>\r
+                <retrieve permission="VIEW_VOLUME_NOTES">\r
+                    <context link="call_number" field="owning_lib"/>\r
+                </retrieve>\r
+                <update permission="UPDATE_VOLUME_NOTE">\r
+                    <context link="call_number" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="DELETE_VOLUME_NOTE">\r
+                    <context link="call_number" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">\r
+                       <field name="create_date" reporter:datatype="timestamp"/>\r
+                       <field name="creator" reporter:datatype="link"/>\r
+                       <field name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field name="editor" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="record" reporter:datatype="link"/>\r
+                       <field name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="are"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>\r
+                <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">\r
+        <oils_persist:source_definition>\r
+SELECT  usr,\r
+        SUM(\r
+            CASE\r
+                WHEN (\r
+                    ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))\r
+                    AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))\r
+                ) THEN 1\r
+                ELSE 0\r
+            END\r
+        ) AS out,\r
+\r
+        SUM(\r
+            CASE\r
+                WHEN (\r
+                    ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))\r
+                    AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))\r
+                ) THEN 1\r
+                ELSE 0\r
+            END\r
+        ) AS overdue,\r
+\r
+        SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,\r
+        SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,\r
+        SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue\r
+  FROM  action.circulation\r
+  WHERE checkin_time IS NULL\r
+  GROUP BY 1\r
+        </oils_persist:source_definition>\r
+        <fields oils_persist:primary="usr">\r
+            <field reporter:label="User ID" name="usr" reporter:datatype="link"/>\r
+            <field reporter:label="Out" name="out" reporter:datatype="text"/>\r
+            <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>\r
+            <field reporter:label="Lost" name="lost" reporter:datatype="text"/>\r
+            <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>\r
+            <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>\r
+        </fields>\r
+        <links>\r
+            <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+        </links>\r
+       </class>\r
+       <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">\r
+        <oils_persist:source_definition>\r
+SELECT  usr,\r
+        STRING_AGG(\r
+            CASE\r
+                WHEN (\r
+                    ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))\r
+                    AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))\r
+                ) THEN id::TEXT\r
+                ELSE '0'\r
+            END\r
+        ,',') AS out,\r
+\r
+        STRING_AGG(\r
+            CASE\r
+                WHEN (\r
+                    ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))\r
+                    AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))\r
+                ) THEN id::TEXT\r
+                ELSE '0'\r
+            END\r
+        ,',') AS overdue,\r
+\r
+        STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,\r
+        STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,\r
+        STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue\r
+  FROM  action.circulation\r
+  WHERE checkin_time IS NULL\r
+  GROUP BY 1\r
+        </oils_persist:source_definition>\r
+        <fields oils_persist:primary="usr">\r
+            <field reporter:label="User ID" name="usr" reporter:datatype="link"/>\r
+            <field reporter:label="Out" name="out" reporter:datatype="text"/>\r
+            <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>\r
+            <field reporter:label="Lost" name="lost" reporter:datatype="text"/>\r
+            <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>\r
+            <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>\r
+        </fields>\r
+        <links>\r
+            <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+        </links>\r
+       </class>\r
+       <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">\r
+                       <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>\r
+                       <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />\r
+                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />\r
+                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />\r
+                       <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />\r
+                       <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>\r
+                       <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>\r
+                       <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>\r
+                       <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>\r
+                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>\r
+                       <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>\r
+                       <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>\r
+                       <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>\r
+                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>\r
+                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>\r
+                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>\r
+                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>\r
+                       <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>\r
+                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>\r
+                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>\r
+                       <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>\r
+                       <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>\r
+                       <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>\r
+                       <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>\r
+                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>\r
+                       <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">\r
+                       <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>\r
+                       <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />\r
+                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />\r
+                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />\r
+                       <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />\r
+                       <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>\r
+                       <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>\r
+                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>\r
+                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>\r
+                       <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>\r
+                       <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>\r
+                       <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>\r
+                       <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>\r
+                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>\r
+                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>\r
+                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>\r
+                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>\r
+                       <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>\r
+                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>\r
+                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>\r
+                       <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>\r
+                       <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>\r
+                       <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>\r
+               </links>\r
+       </class>\r
+       <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">\r
+                       <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>\r
+                       <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />\r
+                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />\r
+                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />\r
+                       <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />\r
+                       <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>\r
+                       <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>\r
+                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>\r
+                       <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>\r
+                       <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>\r
+                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>\r
+                       <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>\r
+                       <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>\r
+                       <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>\r
+                       <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>\r
+                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>\r
+                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>\r
+                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>\r
+                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>\r
+                       <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>\r
+                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>\r
+                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>\r
+                       <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>\r
+                       <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>\r
+                       <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>\r
+                       <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>\r
+                       <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>\r
+                       <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">\r
+                       <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>\r
+                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>\r
+                       <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>\r
+                       <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>\r
+                       <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>\r
+                       <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>\r
+                       <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>\r
+                               <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>\r
+                               <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>\r
+                               <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">\r
+                       <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />\r
+                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>\r
+                       <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>\r
+                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>\r
+                       <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>\r
+                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>\r
+                       <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="type" reltype="has_a" key="id" map="" class="brt"/>\r
+                       <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>\r
+                       <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>\r
+                       <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>\r
+                               <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>\r
+                               <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>\r
+                               <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       \r
+       <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">\r
+                       <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />\r
+                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>\r
+                       <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>\r
+                       <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>\r
+                       <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>\r
+                               <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>\r
+                               <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>\r
+                               <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       \r
+       <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">\r
+                       <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />\r
+                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>\r
+                       <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>\r
+                       <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="attr" reltype="has_a" key="id" map="" class="bra"/>\r
+                       <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>\r
+                       <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>\r
+                               <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>\r
+                               <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>\r
+                               <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       \r
+       <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">\r
+                       <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Resource" name="resource" reporter:datatype="link"/>\r
+                       <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>\r
+                       <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>\r
+                       <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>\r
+                       <link field="value" reltype="has_a" key="id" map="" class="brav"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">\r
+                    <context link="resource" field="owner" />\r
+                </create>\r
+                               <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">\r
+                    <context link="resource" field="owner" />\r
+                </retrieve>\r
+                               <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">\r
+                    <context link="resource" field="owner" />\r
+                </update>\r
+                               <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">\r
+                    <context link="resource" field="owner" />\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       \r
+       <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">\r
+                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>\r
+                       <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>\r
+                       <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>\r
+                       <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>\r
+                       <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>\r
+                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>\r
+                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>\r
+                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>\r
+                       <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>\r
+                       <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>\r
+                       <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>\r
+                       <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>\r
+                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>\r
+                       <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>\r
+                       <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>\r
+                               <retrieve permission="STAFF_LOGIN" global_required='true'/>\r
+                               <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>\r
+                               <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       \r
+       <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">\r
+                       <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>\r
+                       <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>\r
+                       <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>\r
+                               <retrieve permission="STAFF_LOGIN" global_required='true'/>\r
+                               <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>\r
+                               <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">\r
+                       <field name="bucket" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="target_call_number" reporter:datatype="link" />\r
+                       <field name="create_time" reporter:datatype="timestamp" />\r
+                       <field name="pos" reporter:datatype="int" />\r
+                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+                       <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>\r
+            <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>\r
+               </links>\r
+       </class>\r
+       <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="item" reporter:datatype="link"/>\r
+                       <field name="note" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>\r
+               </links>\r
+       </class>\r
+       <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">\r
+                       <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="btype" reporter:datatype="text"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="description" reporter:datatype="text"/>\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="pub" reporter:datatype="bool"/>\r
+                       <field name="create_time" reporter:datatype="timestamp" />\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>\r
+               </links>\r
+       </class>\r
+       <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="bucket" reporter:datatype="link"/>\r
+                       <field name="note" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>\r
+               </links>\r
+       </class>\r
+       <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">\r
+                       <field name="hold" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="target_copy" reporter:datatype="link"/>\r
+                       <field name="proximity" reporter:datatype="number"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+               </links>\r
+       </class>\r
+       <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">\r
+                       <field reporter:label="Hold" name="hold" reporter:datatype="link"/>\r
+                       <field reporter:label="Notification ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>\r
+                       <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>\r
+                       <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+                       <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_HOLD_NOTIFICATION">\r
+                                       <context link="hold" jump="usr" field="home_ou" />\r
+                               </create>\r
+                <retrieve permission="VIEW_HOLD_NOTIFICATION">\r
+                                       <context link="hold" jump="usr" field="home_ou" />\r
+                               </retrieve>\r
+                <update permission="CREATE_HOLD_NOTIFICATION">\r
+                                       <context link="hold" jump="usr" field="home_ou" />\r
+                               </update>\r
+                <delete permission="CREATE_HOLD_NOTIFICATION">\r
+                                       <context link="hold" jump="usr" field="home_ou" />\r
+                               </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">\r
+                       <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>\r
+                       <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />\r
+                       <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>\r
+                       <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>\r
+                       <link field="copies" reltype="has_many" key="location" map="" class="acp"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>\r
+                <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>\r
+            <field reporter:label="Position" name="pos" reporter:datatype="int"/>\r
+            <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>\r
+            <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>\r
+                <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+            <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>\r
+            <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>\r
+                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_COPY_LOCATION_GROUP">\r
+                                       <context link="lgroup" field="owner" />\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_COPY_LOCATION_GROUP">\r
+                                       <context link="lgroup" field="owner" />\r
+                </update>\r
+                <delete permission="ADMIN_COPY_LOCATION_GROUP">\r
+                                       <context link="lgroup" field="owner" />\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+    <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">\r
+            <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Location ID" name="location" reporter:datatype="link"/>\r
+            <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Position" name="position" reporter:datatype="int"/>\r
+        </fields>\r
+        <links>\r
+            <link field="location" reltype="has_a" key="id" map="" class="acpl"/>\r
+            <link field="org" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                               <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>\r
+                <retrieve/>\r
+                               <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>\r
+                               <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+       <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">\r
+               <fields>\r
+                       <field name="sre_id" oils_persist:virtual="true" />\r
+                       <field name="location" oils_persist:virtual="true" />\r
+                       <field name="owning_lib" oils_persist:virtual="true" />\r
+                       <field name="basic_holdings" oils_persist:virtual="true" />\r
+                       <field name="basic_holdings_add" oils_persist:virtual="true" />\r
+                       <field name="supplement_holdings" oils_persist:virtual="true" />\r
+                       <field name="supplement_holdings_add" oils_persist:virtual="true" />\r
+                       <field name="index_holdings" oils_persist:virtual="true" />\r
+                       <field name="index_holdings_add" oils_persist:virtual="true" />\r
+                       <field name="online" oils_persist:virtual="true" />\r
+                       <field name="missing" oils_persist:virtual="true" />\r
+                       <field name="incomplete" oils_persist:virtual="true" />\r
+               </fields>\r
+       </class>\r
+\r
+       <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">\r
+                       <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>\r
+                       <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>\r
+                       <field reporter:label="MARC" name="marc" reporter:datatype="text"/>\r
+                       <field reporter:label="Source" name="source" reporter:datatype="int"/>\r
+                       <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>\r
+                               <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>\r
+                       <field reporter:label="Type" name="type" reporter:datatype="text"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Active?" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>\r
+                       <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>\r
+                       <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>\r
+                       <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>\r
+                       <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>\r
+                       <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>\r
+                       <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>\r
+                       <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>\r
+                       <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>\r
+                       <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>\r
+                       <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>\r
+                       <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_CAPTION_PATTERN">\r
+                                       <context link="subscription" field="owning_lib" />\r
+                               </create>\r
+                               <retrieve />\r
+                               <update permission="ADMIN_SERIAL_CAPTION_PATTERN">\r
+                                       <context link="subscription" field="owning_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">\r
+                                       <context link="subscription" field="owning_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>\r
+                       <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>\r
+                       <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>\r
+                       <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>\r
+                       <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>\r
+                       <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>\r
+                               <retrieve />\r
+                               <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>\r
+                               <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>\r
+                       <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>\r
+                       <field reporter:label="Title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>\r
+                       <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>\r
+                       <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>\r
+                       <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+                       <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>\r
+                       <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>\r
+                       <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>\r
+                       <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>\r
+                       <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>\r
+                       <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>\r
+                       <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>\r
+                       <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>\r
+                       <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>\r
+                       <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+                       <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>\r
+                       <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+                       <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>\r
+                       <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>\r
+                       <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>\r
+                       <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>\r
+                       <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>\r
+                       <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />\r
+                               <retrieve />\r
+                               <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />\r
+                               <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>\r
+                       <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>\r
+                       <field reporter:label="Title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </create>\r
+                               <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </retrieve>\r
+                               <update permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>\r
+                       <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>\r
+                       <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>\r
+                       <link field="items" reltype="has_many" key="id" map="" class="sitem"/>\r
+                       <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_STREAM">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </create>\r
+                               <retrieve />\r
+                               <update permission="ADMIN_SERIAL_STREAM">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_STREAM">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Stream" name="stream" reporter:datatype="link"/>\r
+                       <field reporter:label="Position" name="pos" reporter:datatype="int"/>\r
+                       <field reporter:label="Reader" name="reader" reporter:datatype="link"/>\r
+                       <field reporter:label="Department" name="department" reporter:datatype="text"/>\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>\r
+                       <link field="reader" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_STREAM">\r
+                                       <context link="stream" jump="distribution" field="holding_lib" />\r
+                               </create>\r
+                               <retrieve permission="RECEIVE_SERIAL">\r
+                                       <context link="stream" jump="distribution" field="holding_lib" />\r
+                               </retrieve>\r
+                               <update permission="ADMIN_SERIAL_STREAM">\r
+                                       <context link="stream" jump="distribution" field="holding_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_STREAM">\r
+                                       <context link="stream" jump="distribution" field="holding_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>\r
+                       <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+                       <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>\r
+                       <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>\r
+                       <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>\r
+                       <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>\r
+                       <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_SUBSCRIPTION">\r
+                                       <context link="subscription" field="owning_lib" />\r
+                               </create>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_SERIAL_SUBSCRIPTION">\r
+                                       <context link="subscription" field="owning_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_SUBSCRIPTION">\r
+                                       <context link="subscription" field="owning_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>\r
+                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>\r
+                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>\r
+                       <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>\r
+                       <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>\r
+                       <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>\r
+                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>\r
+                       <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>\r
+                       <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>\r
+                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />\r
+                       <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>\r
+                       <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>\r
+                       <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />\r
+                       <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>\r
+                       <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>\r
+                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />\r
+                       <field reporter:label="Price" name="price" reporter:datatype="money" />\r
+                       <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>\r
+                       <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>\r
+                       <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>\r
+                       <field reporter:label="Cost" name="cost" reporter:datatype="money"/>\r
+                       <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>\r
+                       <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>\r
+                       <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>\r
+                       <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>\r
+                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="status" reltype="has_a" key="id" map="" class="ccs"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>\r
+                       <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>\r
+                       <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>\r
+                       <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>\r
+                       <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>\r
+                       <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>\r
+                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>\r
+                       <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />\r
+                               <retrieve/>\r
+                               <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />\r
+                               <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>\r
+                       <field reporter:label="Stream" name="stream" reporter:datatype="link"/>\r
+                       <field reporter:label="Unit" name="unit" reporter:datatype="link"/>\r
+                       <field reporter:label="URI" name="uri" reporter:datatype="link"/>\r
+                       <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Status" name="status" reporter:datatype="text"/>\r
+                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>\r
+                       <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>\r
+                       <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>\r
+                       <link field="uri" reltype="has_a" key="id" map="" class="auri"/>\r
+                       <link field="notes" reltype="has_many" key="item" map="" class="sin"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_ITEM">\r
+                                       <context link="stream" jump="distribution" field="holding_lib" />\r
+                               </create>\r
+                               <retrieve permission="ADMIN_SERIAL_ITEM">\r
+                                       <context link="stream" jump="distribution" field="holding_lib" />\r
+                               </retrieve>\r
+                               <update permission="ADMIN_SERIAL_ITEM">\r
+                                       <context link="stream" jump="distribution" field="holding_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_ITEM">\r
+                                       <context link="stream" jump="distribution" field="holding_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Item" name="item" reporter:datatype="link"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>\r
+                       <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>\r
+                       <field reporter:label="Title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="item" reltype="has_a" key="id" map="" class="sitem"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+               <!-- Not available via PCRUD at this time -->\r
+       </class>\r
+       <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">\r
+               <fields>\r
+                       <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />\r
+                       <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->\r
+                       <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />\r
+                       <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />\r
+                       <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />\r
+               </fields>\r
+               <links>\r
+                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>\r
+               </links>\r
+       </class>\r
+       <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">\r
+                       <field name="id" reporter:label="ID" reporter:datatype="id" />\r
+                       <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />\r
+                       <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />\r
+                       <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />\r
+                       <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />\r
+                       <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />\r
+                       <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />\r
+               </fields>\r
+               <links>\r
+                       <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>\r
+               </links>\r
+       </class>\r
+       <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>\r
+                       <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>\r
+                       <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>\r
+                       <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </create>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>\r
+                       <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>\r
+                       <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>\r
+                       <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </create>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>\r
+                       <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>\r
+                       <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>\r
+                       <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </create>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </update>\r
+                               <delete permission="ADMIN_SERIAL_DISTRIBUTION">\r
+                                       <context link="distribution" field="holding_lib" />\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="owning_copy" reporter:datatype="link"/>\r
+                       <field name="stat_cat" reporter:datatype="link"/>\r
+                       <field name="stat_cat_entry" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>\r
+                       <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>\r
+               </links>\r
+       </class>\r
+       <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>\r
+                       <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_MARC_CODE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_MARC_CODE" global_required="true"/>\r
+                <delete permission="ADMIN_MARC_CODE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>\r
+                       <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_MARC_CODE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_MARC_CODE" global_required="true"/>\r
+                <delete permission="DELETE_MARC_CODE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">\r
+                       <field reporter:label="ID" name="id"  reporter:datatype="id"/>\r
+                       <field reporter:label="Active" name="active"  reporter:datatype="bool"/>\r
+                       <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>\r
+                       <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>\r
+                       <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>\r
+               </fields>\r
+               <links>\r
+            <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>\r
+                <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>\r
+                <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>\r
+                <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="name" reporter:datatype="text"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_LASSO" global_required="true"/>\r
+                <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>\r
+                <update permission="UPDATE_LASSO" global_required="true"/>\r
+                <delete permission="DELETE_LASSO" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="lasso" reporter:datatype="link"/>\r
+                       <field name="org_unit" reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_LASSO_MAP" global_required="true"/>\r
+                <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>\r
+                <update permission="UPDATE_LASSO_MAP" global_required="true"/>\r
+                <delete permission="DELETE_LASSO_MAP" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">\r
+                       <field name="id" reporter:label="ID" reporter:datatype="id" />\r
+                       <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>\r
+                       <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>\r
+                       <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>\r
+                       <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>\r
+                       <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>\r
+                       <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>\r
+                       <field name="pos" reporter:label="Position" reporter:datatype="int" />\r
+                       <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />\r
+                       <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />\r
+               </fields>\r
+               <links>\r
+                       <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>\r
+                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>\r
+                <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>\r
+                <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>\r
+                <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="from_org" reporter:datatype="org_unit"/>\r
+                       <field name="to_org" reporter:datatype="org_unit"/>\r
+                       <field name="prox" reporter:datatype="int" />\r
+               </fields>\r
+               <links>\r
+                       <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>\r
+                       <field reporter:label="Record" name="record" reporter:datatype="link"/>\r
+                       <field reporter:label="Total Results" name="total" reporter:datatype="int" />\r
+                       <field reporter:label="Checked" name="checked" reporter:datatype="int"/>\r
+                       <field reporter:label="Visible" name="visible" reporter:datatype="int"/>\r
+                       <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>\r
+                       <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>\r
+               </fields>\r
+               <links/>\r
+       </class>\r
+       <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">\r
+                       <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+                       <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>\r
+                       <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>\r
+                       <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>\r
+                       <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_SURVEY" context_field="owner"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_SURVEY" context_field="owner"/>\r
+                <delete permission="ADMIN_SURVEY" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">\r
+                       <field name="address_type"  reporter:datatype="text"/>\r
+                       <field name="city"  reporter:datatype="text"/>\r
+                       <field name="country"  reporter:datatype="text"/>\r
+                       <field name="county"  reporter:datatype="text"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field name="post_code"  reporter:datatype="text"/>\r
+                       <field name="state"  reporter:datatype="text"/>\r
+                       <field name="street1"  reporter:datatype="text"/>\r
+                       <field name="street2"  reporter:datatype="text"/>\r
+                       <field name="valid" reporter:datatype="bool"/>\r
+                       <field name="san" reporter:datatype="text" reporter:label="SAN"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>\r
+                <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">\r
+                       <field name="id" reporter:datatype="id" reporter:selector="label"/>\r
+                       <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="query_text" reporter:datatype="text"/>\r
+               </fields>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">\r
+                       <field name="id" reporter:datatype="id" reporter:selector="label"/>\r
+                       <field name="owner" reporter:datatype="org_unit"/>\r
+                       <field name="code" reporter:datatype="text"/>\r
+                       <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="create_date" reporter:datatype="timestamp"/>\r
+                       <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>\r
+                <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">\r
+                       <field name="id" reporter:datatype="id"/>\r
+                       <field name="grp" reporter:datatype="link"/>\r
+                       <field name="pos" reporter:datatype="int"/>\r
+                       <field name="query" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>\r
+                       <link field="query" reltype="has_a" key="id" map="" class="asq"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_SEARCH_FILTER_GROUP">\r
+                    <context link="grp" field="owner"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_SEARCH_FILTER_GROUP">\r
+                    <context link="grp" field="owner"/>\r
+                </update>\r
+                <delete permission="ADMIN_SEARCH_FILTER_GROUP">\r
+                    <context link="grp" field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <!-- A note: Please update alhr and ahopl when updating ahr -->\r
+       <class id="ahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">\r
+                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />\r
+                       <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />\r
+                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Currently Targeted Copy" name="current_copy" />\r
+                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />\r
+                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>\r
+                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>\r
+                       <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>\r
+                       <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>\r
+                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>\r
+                       <field reporter:label="Item Selection Depth" name="selection_depth" />\r
+                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />\r
+                       <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>\r
+                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />\r
+                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />\r
+                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />\r
+                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />\r
+                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="requestor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>\r
+                       <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>\r
+                       <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>\r
+                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>\r
+                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>\r
+                       <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>\r
+                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">\r
+               <oils_persist:source_definition><![CDATA[\r
+               SELECT\r
+                       ahr.*,\r
+                       COALESCE(acplo.position, acpl_ordered.fallback_position) AS\r
+                               copy_location_order_position,\r
+                       CASE WHEN au.alias IS NOT NULL THEN\r
+                               au.alias\r
+                       ELSE\r
+                               au.first_given_name\r
+                       END AS usr_alias_or_first_given_name,\r
+                       au.first_given_name AS usr_first_given_name,\r
+                       au.second_given_name AS usr_second_given_name,\r
+                       au.family_name AS usr_family_name,\r
+                       au.prefix AS usr_prefix,\r
+                       au.suffix AS usr_suffix,\r
+                       au.alias AS usr_alias,\r
+                       CASE WHEN au.alias IS NOT NULL THEN\r
+                               au.alias\r
+                       ELSE\r
+                               REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[\r
+                                       COALESCE(au.family_name, ''),\r
+                                       COALESCE(au.suffix, ''),\r
+                                       ', ',\r
+                                       COALESCE(au.prefix, ''),\r
+                                       COALESCE(au.first_given_name, ''),\r
+                                       COALESCE(au.second_given_name, '')\r
+                               ], ' '), E'\\s+,', ',')\r
+                       END AS usr_alias_or_display_name,\r
+                       REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[\r
+                               COALESCE(au.family_name, ''),\r
+                               COALESCE(au.suffix, ''),\r
+                               ', ',\r
+                               COALESCE(au.prefix, ''),\r
+                               COALESCE(au.first_given_name, ''),\r
+                               COALESCE(au.second_given_name, '')\r
+                       ], ' '), E'\\s+,', ',') AS usr_display_name,\r
+                       TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)\r
+                               AS call_number_label,\r
+                       siss.label AS issuance_label,\r
+                       (ahr.usr <> ahr.requestor) AS is_staff_hold,\r
+                       ahcm_1.copy_count AS potential_copies\r
+               FROM action.hold_request ahr\r
+               JOIN asset.copy acp ON (acp.id = ahr.current_copy)\r
+               JOIN asset.call_number acn ON (acp.call_number = acn.id)\r
+               JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)\r
+               JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)\r
+               JOIN actor.usr au ON (au.id = ahr.usr)\r
+               JOIN (\r
+                       SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position\r
+                       FROM asset.copy_location\r
+               ) acpl_ordered ON (acpl_ordered.id = acp.location)\r
+               LEFT JOIN actor.usr_standing_penalty ausp \r
+                       ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))\r
+               LEFT JOIN config.standing_penalty csp\r
+                       ON (\r
+                               csp.id = ausp.standing_penalty AND \r
+                               csp.block_list LIKE '%CAPTURE%' AND (\r
+                                       (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR\r
+                                       (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (\r
+                                               SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))\r
+                                       )\r
+                               )\r
+                       )\r
+               JOIN (\r
+                       SELECT COUNT(target_copy) AS copy_count, hold\r
+                       FROM action.hold_copy_map\r
+                       GROUP BY 2\r
+               ) ahcm_1 ON (ahcm_1.hold = ahr.id)\r
+               LEFT JOIN serial.issuance siss\r
+                       ON (ahr.hold_type = 'I' AND siss.id = ahr.target)\r
+               LEFT JOIN asset.copy_location_order acplo\r
+                       ON (acp.location = acplo.location AND\r
+                               acp.circ_lib = acplo.org)\r
+               WHERE\r
+                       ahr.capture_time IS NULL AND\r
+                       ahr.cancel_time IS NULL AND\r
+                       csp.id IS NULL AND\r
+                       (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND\r
+                       acp.status IN (0,7)\r
+               ]]></oils_persist:source_definition>\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />\r
+                       <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />\r
+                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Currently Targeted Copy" name="current_copy" />\r
+                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />\r
+                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>\r
+                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>\r
+                       <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>\r
+                       <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>\r
+                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>\r
+                       <field reporter:label="Item Selection Depth" name="selection_depth" />\r
+                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />\r
+                       <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>\r
+                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />\r
+                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />\r
+                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />\r
+                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />\r
+                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />\r
+                       <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />\r
+                       <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />\r
+                       <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />\r
+                       <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />\r
+                       <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />\r
+                       <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />\r
+                       <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />\r
+                       <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />\r
+                       <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />\r
+                       <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />\r
+                       <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />\r
+                       <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />\r
+                       <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />\r
+                       <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="requestor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>\r
+                       <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>\r
+                       <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>\r
+                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>\r
+                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>\r
+                       <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>\r
+                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">\r
+               <oils_persist:source_definition>\r
+                       SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)\r
+               </oils_persist:source_definition>\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />\r
+                       <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />\r
+                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Currently Targeted Copy" name="current_copy" />\r
+                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />\r
+                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>\r
+                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>\r
+                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>\r
+                       <field reporter:label="Item Selection Depth" name="selection_depth" />\r
+                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />\r
+                       <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>\r
+                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />\r
+                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />\r
+                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />\r
+                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />\r
+                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="requestor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>\r
+                       <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>\r
+                       <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>\r
+                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>\r
+                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>\r
+                       <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>\r
+                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="ahrn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_note" oils_persist:tablename="action.hold_request_note" reporter:label="Hold Request Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>\r
+                       <field reporter:label="Title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="Body" name="body" reporter:datatype="text"/>\r
+                       <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>\r
+                       <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>\r
+                       <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>\r
+                               <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>\r
+                               <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>\r
+                               <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">\r
+                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />\r
+                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Currently Targeted Copy" name="current_copy" />\r
+                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />\r
+                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>\r
+                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>\r
+                       <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>\r
+                       <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>\r
+                       <field reporter:label="Item Selection Depth" name="selection_depth" />\r
+                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>\r
+                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />\r
+                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />\r
+                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />\r
+                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />\r
+                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>\r
+                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>\r
+                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">\r
+                       <field reporter:label="Status" name="status" oils_persist:virtual="true" />\r
+                       <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Currently Targeted Copy" name="current_copy" />\r
+                       <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />\r
+                       <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>\r
+                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>\r
+                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>\r
+                       <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>\r
+                       <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>\r
+                       <field reporter:label="Item Selection Depth" name="selection_depth" />\r
+                       <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>\r
+                       <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />\r
+                       <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />\r
+                       <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />\r
+                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />\r
+                       <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>\r
+                       <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>\r
+                       <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="aou" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit" oils_persist:tablename="actor.org_unit" reporter:label="Organizational Unit" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">\r
+                       <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>\r
+                       <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>\r
+                       <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>\r
+                       <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>\r
+                       <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>\r
+                       <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>\r
+                       <field reporter:label="Email Address" name="email" reporter:datatype="text"/>\r
+                       <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>\r
+                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>\r
+                       <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>\r
+                       <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>\r
+                       <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>\r
+                       <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>\r
+                       <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>\r
+                       <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>\r
+                       <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>\r
+                       <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>\r
+                       <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>\r
+                       <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>\r
+                       <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>\r
+                       <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>\r
+                       <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>\r
+                       <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>\r
+                       <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>\r
+                       <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>\r
+                       <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>\r
+                       <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>\r
+                       <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>\r
+                       <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>\r
+                       <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>\r
+                       <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>\r
+                       <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>\r
+                       <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>\r
+                       <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>\r
+                <retrieve />\r
+                <update permission="UPDATE_ORG_UNIT" context_field="id"/>\r
+                <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="aouct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree" oils_persist:tablename="actor.org_unit_custom_tree" reporter:label="Org Unit Custom Tree">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>\r
+               </fields>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />\r
+                               <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="aouctn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree_node" oils_persist:tablename="actor.org_unit_custom_tree_node" reporter:label="Org Unit Custom Tree Node">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Tree" name="tree" reporter:datatype="link"/>\r
+                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>\r
+                       <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>\r
+                       <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>\r
+                       <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />\r
+               </fields>\r
+               <links>\r
+                       <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>\r
+                       <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />\r
+                               <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">\r
+                       <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="btype" reporter:datatype="text"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="name"  reporter:datatype="text"/>\r
+                       <field name="description" reporter:datatype="text"/>\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="pub" reporter:datatype="bool"/>\r
+                       <field name="create_time" reporter:datatype="timestamp" />\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>\r
+               </links>\r
+       </class>\r
+       <class id="ccnbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_note" oils_persist:tablename="container.call_number_bucket_note" reporter:label="Call Number Bucket Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="bucket" reporter:datatype="link"/>\r
+                       <field name="note" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>\r
+               </links>\r
+       </class>\r
+       <class id="asc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">\r
+                       <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>\r
+                       <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>\r
+                       <field reporter:label="Required" name="required" reporter:datatype="bool"/>\r
+                       <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>\r
+                       <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="STAFF_LOGIN" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">\r
+                       <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>\r
+                       <field reporter:label="Card ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_USER">\r
+                                       <context link="usr" field="home_ou" />\r
+                               </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+    <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">\r
+        <fields oils_persist:primary="field">\r
+            <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>\r
+            <field reporter:label="Field Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>\r
+        </fields>\r
+        <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>\r
+                <retrieve />\r
+                <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>\r
+                <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+       <class id="actsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">\r
+                       <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>\r
+                       <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>\r
+                       <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>\r
+                       <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>\r
+                       <field reporter:label="Required" name="required" reporter:datatype="bool"/>\r
+                       <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>\r
+                       <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>\r
+                       <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>\r
+                <retrieve />\r
+                <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>\r
+                <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="msefe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::series_field_entry" oils_persist:tablename="metabib.series_field_entry" reporter:label="Series Field Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">\r
+                       <field name="field" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="source" reporter:datatype="link"/>\r
+                       <field name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+       </class>\r
+       <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">\r
+                       <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="btype" reporter:datatype="text"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="name"  reporter:datatype="text"/>\r
+                       <field name="description" reporter:datatype="text"/>\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="pub" reporter:datatype="bool"/>\r
+                       <field name="create_time" reporter:datatype="timestamp" />\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>\r
+               </links>\r
+       </class>\r
+       <class id="cubn" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_note" oils_persist:tablename="container.user_bucket_note" reporter:label="User Bucket Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="bucket" reporter:datatype="link"/>\r
+                       <field name="note" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>\r
+               </links>\r
+       </class>\r
+       <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">\r
+                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />\r
+                       <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>\r
+                       <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>\r
+                       <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="ind1" />\r
+                       <field name="ind2" />\r
+                       <field name="record" />\r
+                       <field name="subfield" />\r
+                       <field name="tag" />\r
+                       <field name="value" />\r
+               </fields>\r
+               <links>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="are"/>\r
+               </links>\r
+       </class>\r
+       <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">\r
+                       <field name="id" reporter:label="ID" reporter:datatype="id" />\r
+                       <field name="source" reporter:label="Source Record" reporter:datatype="link" />\r
+                       <field name="target" reporter:label="Target Record" reporter:datatype="link" />\r
+                       <field name="field" reporter:label="Authority Field" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="are"/>\r
+                       <link field="target" reltype="has_a" key="id" map="" class="are"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>\r
+               </links>\r
+       </class>\r
+       <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">\r
+                       <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>\r
+                       <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>\r
+                       <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>\r
+                <retrieve/>\r
+                <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>\r
+                <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>\r
+            </actions>\r
+        </permacrud>\r
+\r
+       </class>\r
+       <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">\r
+                       <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>\r
+                       <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>\r
+                       <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />\r
+                       <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>\r
+                       <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent" reltype="has_a" key="id" map="" class="aout"/>\r
+                       <link field="children" reltype="has_many" key="parent" map="" class="aout"/>\r
+                       <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_ORG_TYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_ORG_TYPE" global_required="true"/>\r
+                <delete permission="DELETE_ORG_TYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">\r
+                       <field name="create_date" reporter:datatype="timestamp"/>\r
+                       <field name="creator" reporter:datatype="link"/>\r
+                       <field name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field name="editor" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="pub" reporter:datatype="bool"/>\r
+                       <field name="record" reporter:datatype="link"/>\r
+                       <field name="value"  reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+       <class id="mucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_circulation_summary" oils_persist:tablename="money.usr_circulation_summary" reporter:label="User Circulation Summary">\r
+               <fields oils_persist:primary="usr" oils_persist:sequence="">\r
+                       <field name="balance_owed" reporter:datatype="money" />\r
+                       <field name="total_owed" reporter:datatype="money" />\r
+                       <field name="total_paid" reporter:datatype="money" />\r
+                       <field name="usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+       <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">\r
+                       <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note"  reporter:datatype="text"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>\r
+                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>\r
+                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>\r
+                       <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>\r
+                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>\r
+               </links>\r
+       </class>\r
+       <class id="cbs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_source" oils_persist:tablename="config.bib_source" reporter:label="Bib Source">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">\r
+                       <field name="id" reporter:selector="source" reporter:datatype="id"/>\r
+                       <field name="quality" reporter:datatype="int" />\r
+                       <field name="source" reporter:datatype="text"/>\r
+                       <field name="transcendant" reporter:datatype="bool"/>\r
+                       <field name="can_have_copies" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_BIB_SOURCE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_BIB_SOURCE" global_required="true"/>\r
+                <delete permission="DELETE_BIB_SOURCE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">\r
+                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>\r
+                       <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>\r
+                       <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>\r
+                       <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>\r
+                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>\r
+                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>\r
+                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>\r
+                       <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                                       <context link="usr" field="home_ou" />\r
+                               </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="actsce" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry" oils_persist:tablename="actor.stat_cat_entry" reporter:label="User Stat Cat Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">\r
+                       <field reporter:label="Entry ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>\r
+                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>\r
+                       <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>\r
+               </links>\r
+       </class>\r
+       <class id="actsced" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_default" oils_persist:tablename="actor.stat_cat_entry_default" reporter:label="User Stat Cat Default Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">\r
+                       <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>\r
+                       <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>\r
+                       <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>\r
+               </links>\r
+       </class>\r
+       <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">\r
+                       <field name="bucket" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="target_user" reporter:datatype="link"/>\r
+                       <field name="create_time" reporter:datatype="timestamp" />\r
+                       <field name="pos" reporter:datatype="int" />\r
+                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="target_user" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>\r
+            <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>\r
+               </links>\r
+       </class>\r
+       <class id="cubin" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item_note" oils_persist:tablename="container.user_bucket_item_note" reporter:label="User Bucket Item Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="item" reporter:datatype="link"/>\r
+                       <field name="note" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="item" reltype="has_a" key="id" map="" class="cubi"/>\r
+               </links>\r
+       </class>\r
+       <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">\r
+               <fields oils_persist:primary="usr" oils_persist:sequence="">\r
+                       <field name="balance_owed" reporter:datatype="money" />\r
+                       <field name="total_owed" reporter:datatype="money" />\r
+                       <field name="total_paid" reporter:datatype="money" />\r
+                       <field name="usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+       <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="code" oils_persist:sequence="">\r
+                       <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>\r
+                       <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_MARC_CODE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_MARC_CODE" global_required="true"/>\r
+                <delete permission="DELETE_MARC_CODE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">\r
+                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />\r
+                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">\r
+                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />\r
+                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="">\r
+                       <field name="checkin_lib" reporter:datatype="link"/>\r
+                       <field name="checkin_staff" reporter:datatype="link"/>\r
+                       <field name="checkin_time" reporter:datatype="timestamp"/>\r
+                       <field name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field name="circ_staff" reporter:datatype="link"/>\r
+                       <field name="desk_renewal" reporter:datatype="bool"/>\r
+                       <field name="due_date" reporter:datatype="timestamp"/>\r
+                       <field name="duration" reporter:datatype="interval"/>\r
+                       <field name="duration_rule" reporter:datatype="link"/>\r
+                       <field name="fine_interval" reporter:datatype="interval"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="max_fine" reporter:datatype="money" />\r
+                       <field name="max_fine_rule" reporter:datatype="link"/>\r
+                       <field name="opac_renewal" reporter:datatype="bool"/>\r
+                       <field name="phone_renewal" reporter:datatype="bool"/>\r
+                       <field name="recurring_fine" reporter:datatype="money" />\r
+                       <field name="recurring_fine_rule" reporter:datatype="link"/>\r
+                       <field name="renewal_remaining" reporter:datatype="int" />\r
+            <field name="grace_period" reporter:datatype="interval" />\r
+                       <field name="stop_fines" reporter:datatype="text"/>\r
+                       <field name="stop_fines_time" reporter:datatype="timestamp"/>\r
+                       <field name="target_copy" reporter:datatype="link"/>\r
+                       <field name="usr" reporter:datatype="link"/>\r
+                       <field name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field name="xact_start" reporter:datatype="timestamp" />\r
+                       <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>\r
+                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>\r
+                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>\r
+                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>\r
+               </links>\r
+       </class>\r
+       <class id="msfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::subject_field_entry" oils_persist:tablename="metabib.subject_field_entry" reporter:label="Subject Field Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">\r
+                       <field name="field" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="source" reporter:datatype="link"/>\r
+                       <field name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+       </class>\r
+       <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recurring_fine" oils_persist:tablename="config.rule_recurring_fine" reporter:label="Recurring Fine Rule">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">\r
+                       <field name="high" reporter:datatype="money" />\r
+                       <field name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field name="low" reporter:datatype="money" />\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="normal" reporter:datatype="money" />\r
+                       <field name="recurrence_interval" reporter:datatype="interval"/>\r
+            <field name="grace_period" reporter:datatype="interval" />\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>\r
+                <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">\r
+                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />\r
+                       <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>\r
+                       <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />\r
+                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="payment" reltype="might_have" key="id" map="" class="mp"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="acp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy" oils_persist:tablename="asset.copy" reporter:core="true" reporter:label="Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">\r
+                       <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>\r
+                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>\r
+                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>\r
+                       <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>\r
+                       <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>\r
+                       <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>\r
+                       <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>\r
+                       <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>\r
+                       <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>\r
+                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />\r
+                       <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>\r
+                       <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>\r
+                       <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />\r
+                       <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>\r
+                       <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>\r
+                       <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />\r
+                       <field reporter:label="Price" name="price" reporter:datatype="money" />\r
+                       <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>\r
+                       <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>\r
+                       <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>\r
+                       <field reporter:label="Cost" name="cost" reporter:datatype="money"/>\r
+                       <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>\r
+                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="status" reltype="has_a" key="id" map="" class="ccs"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>\r
+                       <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>\r
+                       <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>\r
+                       <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>\r
+                       <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>\r
+                       <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>\r
+                       <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>\r
+                       <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>\r
+                       <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>\r
+                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>\r
+                       <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>\r
+                       <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>\r
+                       <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>\r
+                       <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>\r
+                       <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_COPY">\r
+                    <context link="call_number" field="owning_lib"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="UPDATE_COPY">\r
+                    <context link="call_number" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="DELETE_COPY">\r
+                    <context link="call_number" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />\r
+                       <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Status" name="status" reporter:datatype="link"/>\r
+                       <field reporter:label="Location" name="location" reporter:datatype="link"/>\r
+                       <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>\r
+                       <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>\r
+                       <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>\r
+                       <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>\r
+                       <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>\r
+                       <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>\r
+                       <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>\r
+                       <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Price" name="price" reporter:datatype="money"/>\r
+                       <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>\r
+                       <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>\r
+                       <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>\r
+                       <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>\r
+                       <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="status" reltype="has_a" key="id" map="" class="ccs"/>\r
+                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>\r
+                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>\r
+                               <retrieve />\r
+                               <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>\r
+                               <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">\r
+                       <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>\r
+                       <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>\r
+                <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="crmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::max_fine" oils_persist:tablename="config.rule_max_fine" reporter:label="Max Fine Rule">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">\r
+                       <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>\r
+                <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="pgt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree" oils_persist:tablename="permission.grp_tree" reporter:label="Permission Group">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">\r
+                       <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>\r
+                       <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>\r
+                       <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>\r
+                       <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>\r
+                       <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_PERM" global_required="true"/>\r
+                <retrieve permission="STAFF_LOGIN" global_required="true"/>\r
+                <update permission="UPDATE_PERM" global_required="true"/>\r
+                <delete permission="DELETE_PERM" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="asva" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_answer" oils_persist:tablename="action.survey_answer" reporter:label="Survey Answer">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">\r
+                       <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>\r
+                       <field reporter:label="Answer ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Question" name="question" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="question" reltype="has_a" key="id" map="" class="asvq"/>\r
+                       <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_SURVEY">\r
+                    <context link="question" jump="survey" field="owner"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="ADMIN_SURVEY">\r
+                    <context link="question" jump="survey" field="owner"/>\r
+                </update>\r
+                <delete permission="ADMIN_SURVEY">\r
+                    <context link="question" jump="survey" field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">\r
+                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron" name="patron" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>\r
+                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="patron" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="moucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_circulation_summary" oils_persist:tablename="money.open_usr_circulation_summary" reporter:label="Open User Circulation Summary">\r
+               <fields oils_persist:primary="usr" oils_persist:sequence="">\r
+                       <field name="balance_owed" reporter:datatype="money" />\r
+                       <field name="total_owed" reporter:datatype="money" />\r
+                       <field name="total_paid" reporter:datatype="money" />\r
+                       <field name="usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+       <class id="aufh" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_list" oils_persist:tablename="action.unfulfilled_hold_list" reporter:label="Unfulfilled Hold Targets">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">\r
+                       <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Hold" name="hold" reporter:datatype="link"/>\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />\r
+               </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+                       <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">\r
+                       <field name="field" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="source" reporter:datatype="link"/>\r
+                       <field name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+       </class>\r
+       <class id="mtfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::title_field_entry" oils_persist:tablename="metabib.title_field_entry" reporter:label="Title Field Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">\r
+                       <field name="field" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="source" reporter:datatype="link"/>\r
+                       <field name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="field" reltype="has_a" key="id" map="" class="cmf"/>\r
+               </links>\r
+       </class>\r
+       <class id="actscecm" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_user_map" oils_persist:tablename="actor.stat_cat_entry_usr_map"  reporter:label="User Statistical Category Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">\r
+                       <field reporter:label="Entry ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>\r
+                       <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>\r
+                       <field reporter:label="User" name="target_usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>\r
+               </links>\r
+       </class>\r
+       <class id="pgpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_perm_map" oils_persist:tablename="permission.grp_perm_map" reporter:label="Group Permission Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">\r
+                       <field name="depth" reporter:datatype="int" />\r
+                       <field name="grantable" reporter:datatype="bool"/>\r
+                       <field name="grp" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="perm" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>\r
+                       <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ASSIGN_GROUP_PERM" global_required="true"/>\r
+                <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>\r
+                <update permission="UPDATE_GROUP_PERM" global_required="true"/>\r
+                <delete permission="REMOVE_GROUP_PERM" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">\r
+                       <field name="items" oils_persist:virtual="true" />\r
+                       <field name="btype" reporter:datatype="text"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="description" reporter:datatype="text"/>\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="pub" reporter:datatype="bool"/>\r
+                       <field name="create_time" reporter:datatype="timestamp" />\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>\r
+               </links>\r
+       </class>\r
+       <class id="ccbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_note" oils_persist:tablename="container.copy_bucket_note" reporter:label="Copy Bucket Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="bucket" reporter:datatype="link"/>\r
+                       <field name="note" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>\r
+               </links>\r
+       </class>\r
+       <class id="puwoum" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_work_ou_map" oils_persist:tablename="permission.usr_work_ou_map" reporter:label="User Work Org Unit Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">\r
+                       <field name="id" reporter:datatype="int" />\r
+                       <field name="usr" reporter:datatype="link"/>\r
+                       <field name="work_ou" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <class id="pupm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_perm_map" oils_persist:tablename="permission.usr_perm_map" reporter:label="User Permission Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">\r
+                       <field name="depth" reporter:datatype="int"/>\r
+                       <field name="grantable" reporter:datatype="bool"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="perm" reporter:datatype="link"/>\r
+                       <field name="usr" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>\r
+               </links>\r
+       </class>\r
+       <class id="puopm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_object_perm_map" oils_persist:tablename="permission.usr_object_perm_map" reporter:label="User Object Permission Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">\r
+                       <field name="object_id" reporter:datatype="text"/>\r
+                       <field name="grantable" reporter:datatype="bool"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="perm" reporter:datatype="link"/>\r
+                       <field name="usr" reporter:datatype="link"/>\r
+                       <field name="object_type" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>\r
+               </links>\r
+       </class>\r
+       <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="">\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>\r
+                       <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>\r
+                       <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>\r
+                       <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>\r
+                       <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>\r
+                       <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>\r
+                       <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>\r
+                       <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>\r
+                       <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="">\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>\r
+                       <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>\r
+                       <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>\r
+                       <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>\r
+                       <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>\r
+                       <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>\r
+                       <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>\r
+                       <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>\r
+                       <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+       <class id="mndp" controller="open-ils.reporter" oils_obj:fieldmapper="money::non_drawer_payment" oils_persist:tablename="money.non_drawer_payment_view" reporter:core="true" reporter:label="Payments: Non-drawer Staff">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="">\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>\r
+                       <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>\r
+                       <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>\r
+                       <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>\r
+                       <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>\r
+                       <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+       </class>\r
+       <class id="mdp" controller="open-ils.cstore" oils_obj:fieldmapper="money::desk_payment" oils_persist:tablename="money.desk_payment_view" reporter:core="true" reporter:label="Payments: Desk">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="">\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Payment ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>\r
+                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>\r
+                       <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>\r
+                       <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>\r
+                       <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>\r
+               </links>\r
+       </class>\r
+       <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">\r
+                       <field name="bucket" reporter:datatype="link"/>\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="target_biblio_record_entry" reporter:datatype="link"/>\r
+                       <field name="create_time" reporter:datatype="timestamp" />\r
+                       <field name="pos" reporter:datatype="int" />\r
+                       <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>\r
+            <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>\r
+               </links>\r
+       </class>\r
+       <class id="cbrebin" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item_note" oils_persist:tablename="container.biblio_record_entry_bucket_item_note" reporter:label="Biblio Record Entry Bucket Item Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="item" reporter:datatype="link"/>\r
+                       <field name="note" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>\r
+               </links>\r
+       </class>\r
+       <class id="asce" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">\r
+                       <field reporter:label="Entry ID" name="id" reporter:datatype="int" />\r
+                       <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="STAFF_LOGIN" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+    <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">\r
+        <fields oils_persist:primary="field">\r
+            <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>\r
+            <field reporter:label="Field Name" name="name" reporter:datatype="text"/>\r
+            <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>\r
+        </fields>\r
+        <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>\r
+                <retrieve />\r
+                <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>\r
+                <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+       <class id="ahrcc" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_cancel_cause" oils_persist:tablename="action.hold_request_cancel_cause" oils_persist:restrict_primary="100" reporter:label="Hold Request Cancel Cause">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">\r
+                       <field reporter:label="Cause ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>\r
+                <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+\r
+       <class id="artc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::reservation_transit_copy" oils_persist:tablename="action.reservation_transit_copy" reporter:core="true" reporter:label="Reservation Transit">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">\r
+                       <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>\r
+                       <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>\r
+                       <field reporter:label="Transit ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>\r
+                       <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>\r
+                       <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>\r
+                       <link field="dest" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="TRANSIT_COPY">\r
+                    <context link="target_copy" field="owner"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="UPDATE_TRANSIT" context_field="dest source"/>\r
+                <delete permission="DELETE_TRANSIT" context_field="dest source"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="ahtc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_transit_copy" oils_persist:tablename="action.hold_transit_copy" reporter:core="true" reporter:label="Hold Transit">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">\r
+                       <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>\r
+                       <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>\r
+                       <field reporter:label="Transit ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>\r
+                       <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>\r
+                       <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>\r
+                       <link field="dest" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="TRANSIT_COPY" context_field="owner">\r
+                    <context link="target_copy" field="circ_lib"/>\r
+                </create>\r
+                <retrieve/>\r
+                <update permission="UPDATE_TRANSIT" context_field="dest source"/>\r
+                <delete permission="DELETE_TRANSIT" context_field="dest source"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Billing ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>\r
+                       <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Type" name="btype" reporter:datatype="link"/>\r
+                       <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+                       <link field="voider" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>\r
+                       <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="VIEW_USER_TRANSACTIONS">\r
+                    <context link="xact" jump="usr" field="home_ou"/>\r
+                </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="pugm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_grp_map" oils_persist:tablename="permission.usr_grp_map" reporter:label="User Group Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">\r
+                       <field name="grp" />\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="usr" />\r
+               </fields>\r
+               <links>\r
+                       <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+       <class id="i18n" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_core" oils_persist:tablename="config.i18n_core" oils_persist:field_safe="true" reporter:label="i18n Core">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="fq_field" reporter:datatype="text"/>\r
+                       <field name="identity_value" reporter:datatype="text"/>\r
+                       <field name="translation" reporter:datatype="text"/>\r
+                       <field name="string" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_TRANSLATION" global_required="true"/>\r
+                <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>\r
+                <update permission="UPDATE_TRANSLATION" global_required="true"/>\r
+                <delete permission="DELETE_TRANSLATION" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="fdoc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::idl_field_doc" oils_persist:tablename="config.idl_field_doc" oils_persist:field_safe="true" reporter:label="IDL Field Doc">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="fm_class" reporter:datatype="text"/>\r
+                       <field name="field" reporter:datatype="text"/>\r
+                       <field name="owner" reporter:datatype="org_unit"/>\r
+                       <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>\r
+                <retrieve/>\r
+                <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>\r
+                <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="i18n_l" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_locale" oils_persist:tablename="config.i18n_locale" oils_persist:field_safe="true" reporter:label="Locale">\r
+               <fields oils_persist:primary="code">\r
+                       <field name="code" reporter:datatype="id" />\r
+                       <field name="marc_code" reporter:datatype="text"/>\r
+                       <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_LOCALE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="UPDATE_LOCALE" global_required="true"/>\r
+                <delete permission="DELETE_LOCALE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="cbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::billing_type" oils_persist:tablename="config.billing_type" oils_persist:restrict_primary="100" reporter:label="Billing Type">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">\r
+                       <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>\r
+                       <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>\r
+                       <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />\r
+            <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_BILLING_TYPE" context_field="owner"/>\r
+                <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>\r
+                <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>\r
+                <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="aurt" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_type" oils_persist:tablename="acq.user_request_type" reporter:label="User Purchase Request Type">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>\r
+                       <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>\r
+                <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="aur" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request" oils_persist:tablename="acq.user_request" reporter:label="User Purchase Request">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link" />\r
+                       <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />\r
+                       <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />\r
+                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />\r
+                       <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />\r
+                       <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />\r
+                       <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />\r
+                       <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />\r
+                       <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />\r
+                       <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />\r
+                       <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />\r
+                       <field reporter:label="Title" name="title" reporter:datatype="text" />\r
+                       <field reporter:label="Volume" name="volume" reporter:datatype="text" />\r
+                       <field reporter:label="Author" name="author" reporter:datatype="text" />\r
+                       <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />\r
+                       <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />\r
+                       <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />\r
+                       <field reporter:label="Publication Location" name="location" reporter:datatype="text" />\r
+                       <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />\r
+                       <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />\r
+                       <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />\r
+                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+                       <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>\r
+                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="user_request.create">\r
+                    <context link="usr" field="home_ou"/>\r
+                               </create>\r
+                <retrieve permission="user_request.view">\r
+                    <context link="usr" field="home_ou"/>\r
+                               </retrieve>\r
+                <update permission="user_request.update">\r
+                    <context link="usr" field="home_ou"/>\r
+                               </update>\r
+                <delete permission="user_request.delete">\r
+                    <context link="usr" field="home_ou"/>\r
+                               </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqct" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::currency_type" oils_persist:tablename="acq.currency_type" reporter:label="Currency Type">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>\r
+                       <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>\r
+                <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqexr" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::exchange_rate" oils_persist:tablename="acq.exchange_rate" reporter:label="Exchange Rate">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">\r
+                       <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />\r
+                       <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />\r
+                       <field reporter:label="Ratio" name="ratio" />\r
+               </fields>\r
+               <links>\r
+                       <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>\r
+                       <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>\r
+                               <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">\r
+                       <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>\r
+                       <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />\r
+                       <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />\r
+                       <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="SAN" name="san" reporter:datatype="text" />\r
+                       <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />\r
+                       <field reporter:label="Active" name="active" reporter:datatype="bool" />\r
+                       <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />\r
+                       <field reporter:label="URL" name="url" reporter:datatype="text" />\r
+                       <field reporter:label="Email" name="email" reporter:datatype="text" />\r
+                       <field reporter:label="Phone" name="phone" reporter:datatype="text" />\r
+                       <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />\r
+                       <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />\r
+                       <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />\r
+               </fields>\r
+               <links>\r
+                       <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>\r
+            <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>\r
+            <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="ADMIN_PROVIDER" context_field="owner"/>\r
+                <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>\r
+                <update   permission="ADMIN_PROVIDER" context_field="owner"/>\r
+                <delete   permission="ADMIN_PROVIDER" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqpron" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::provider_note" oils_persist:tablename="acq.provider_note" reporter:label="Provider Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">\r
+                       <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Provider" name="provider" reporter:datatype="link" />\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />\r
+                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />\r
+                       <field reporter:label="Note Value" name="value" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqipm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_payment_method" oils_persist:tablename="acq.invoice_payment_method" reporter:label="Invoice Payment Method">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+               </fields>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>\r
+                <retrieve/>\r
+                <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>\r
+                <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>\r
+            </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">\r
+                       <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />\r
+                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>\r
+                       <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>\r
+                       <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />\r
+                       <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />\r
+                       <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />\r
+                       <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />\r
+                       <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text" />\r
+                       <field reporter:label="Complete" name="complete" reporter:datatype="bool" />\r
+                       <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+                       <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>\r
+                       <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>\r
+                       <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>\r
+                       <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>\r
+                       <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="CREATE_INVOICE" context_field="receiver"/>\r
+                <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>\r
+                <update   permission="CREATE_INVOICE" context_field="receiver"/>\r
+                <delete   permission="CREATE_INVOICE" context_field="receiver"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_entry" oils_persist:tablename="acq.invoice_entry" reporter:label="Invoice Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />\r
+                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>\r
+                       <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>\r
+                       <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />\r
+                       <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text" />\r
+                       <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />\r
+                       <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />\r
+                       <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />\r
+                       <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="ADMIN_INVOICE">\r
+                                       <context link="invoice" field="receiver"/>\r
+                               </create>\r
+                <retrieve permission="ADMIN_INVOICE">\r
+                                       <context link="invoice" field="receiver"/>\r
+                               </retrieve>\r
+                <update   permission="ADMIN_INVOICE">\r
+                                       <context link="invoice" field="receiver"/>\r
+                               </update>\r
+                               <delete   permission="ADMIN_INVOICE">\r
+                                       <context link="invoice" field="receiver"/>\r
+                               </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item" oils_persist:tablename="acq.invoice_item" reporter:label="Non-bibliographic Invoice Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />\r
+                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>\r
+                       <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>\r
+                       <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />\r
+                       <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />\r
+                       <field reporter:label="Author" name="author" reporter:datatype="text" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text" />\r
+                       <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />\r
+                       <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />\r
+                       <field reporter:label="Fund" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />\r
+                       <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />\r
+                       <field reporter:label="Target" name="target" reporter:datatype="int" />\r
+               </fields>\r
+               <links>\r
+                       <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>\r
+                       <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>\r
+                       <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="ADMIN_INVOICE">\r
+                                       <context link="invoice" field="receiver"/>\r
+                               </create>\r
+                <retrieve permission="ADMIN_INVOICE">\r
+                                       <context link="invoice" field="receiver"/>\r
+                               </retrieve>\r
+                <update   permission="ADMIN_INVOICE">\r
+                                       <context link="invoice" field="receiver"/>\r
+                               </update>\r
+                               <delete   permission="ADMIN_INVOICE">\r
+                                       <context link="invoice" field="receiver"/>\r
+                               </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_address" oils_persist:tablename="acq.provider_address" reporter:label="Provider Address">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">\r
+                       <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>\r
+                       <field reporter:label="City" name="city"  reporter:datatype="text"/>\r
+                       <field reporter:label="Country" name="country"  reporter:datatype="text"/>\r
+                       <field reporter:label="County" name="county"  reporter:datatype="text"/>\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>\r
+                       <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>\r
+                       <field reporter:label="State" name="state"  reporter:datatype="text"/>\r
+                       <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>\r
+                       <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>\r
+                       <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>\r
+                       <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </create>\r
+                <retrieve permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </retrieve>\r
+                <update permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </update>\r
+                <delete permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqpc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact" oils_persist:tablename="acq.provider_contact" reporter:label="Provider Contact">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Role" name="role" reporter:datatype="text"/>\r
+                       <field reporter:label="Email" name="email" reporter:datatype="text"/>\r
+                       <field reporter:label="Phone" name="phone" reporter:datatype="text"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </create>\r
+                <retrieve permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </retrieve>\r
+                <update permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </update>\r
+                <delete permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+       <class id="acqpca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact_address" oils_persist:tablename="acq.provider_contact_address" reporter:label="Provider Contact Address">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">\r
+                       <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>\r
+                       <field reporter:label="City" name="city"  reporter:datatype="text"/>\r
+                       <field reporter:label="Country" name="country"  reporter:datatype="text"/>\r
+                       <field reporter:label="County" name="county"  reporter:datatype="text"/>\r
+                       <field reporter:label="Address ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>\r
+                       <field reporter:label="State" name="state"  reporter:datatype="text"/>\r
+                       <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>\r
+                       <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>\r
+                       <field reporter:label="Contact" name="contact" reporter:datatype="link"/>\r
+                       <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>\r
+                       <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_PROVIDER">\r
+                    <context link="contact" jump='provider' field="owner"/>\r
+                </create>\r
+                <retrieve permission="ADMIN_PROVIDER">\r
+                    <context link="contact" jump='provider' field="owner"/>\r
+                </retrieve>\r
+                <update permission="ADMIN_PROVIDER">\r
+                    <context link="contact" jump='provider' field="owner"/>\r
+                </update>\r
+                <delete permission="ADMIN_PROVIDER">\r
+                    <context link="contact" jump='provider' field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">\r
+                       <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>\r
+                       <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>\r
+                       <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqfc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">\r
+                       <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>\r
+                       <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+            <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>\r
+                               <retrieve permission="STAFF_LOGIN" global_required="true"/>\r
+                               <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>\r
+                               <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqfy" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">\r
+                       <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>\r
+                       <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>\r
+                       <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>\r
+                       <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>\r
+                               <retrieve permission="STAFF_LOGIN" global_required="true"/>\r
+                               <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>\r
+                               <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqfs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source" oils_persist:tablename="acq.funding_source" reporter:label="Funding Source">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">\r
+                       <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>\r
+                       <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />\r
+                       <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>\r
+            <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>\r
+                       <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>\r
+                <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>\r
+                <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>\r
+                <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqfscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">\r
+                       <field reporter:label="Credit ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text" />\r
+                       <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />\r
+               </fields>\r
+               <links>\r
+                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_FUNDING_SOURCE">\r
+                    <context link="funding_source" field="owner"/>\r
+                </create>\r
+                               <retrieve permission="ADMIN_FUNDING_SOURCE">\r
+                    <context link="funding_source" field="owner"/>\r
+                </retrieve>\r
+                               <update permission="ADMIN_FUNDING_SOURCE">\r
+                    <context link="funding_source" field="owner"/>\r
+                </update>\r
+                               <delete permission="ADMIN_FUNDING_SOURCE">\r
+                    <context link="funding_source" field="owner"/>\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>\r
+                       <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqfdeb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">\r
+                       <field reporter:label="Debit ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />\r
+                       <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />\r
+                       <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />\r
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />\r
+               </fields>\r
+               <links>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_FUND">\r
+                    <context link="fund" field="org"/>\r
+                </create>\r
+                               <retrieve permission="ADMIN_ACQ_FUND">\r
+                    <context link="fund" field="org"/>\r
+                </retrieve>\r
+                               <update permission="ADMIN_ACQ_FUND">\r
+                    <context link="fund" field="org"/>\r
+                </update>\r
+                               <delete permission="ADMIN_ACQ_FUND">\r
+                    <context link="fund" field="org"/>\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">\r
+                       <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>\r
+                       <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" />\r
+                       <field reporter:label="Year" name="year" reporter:datatype="int" />\r
+                       <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />\r
+                       <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />\r
+                       <field reporter:label="Active" name="active" reporter:datatype="bool" />\r
+                       <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />\r
+                       <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />\r
+                       <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>\r
+            <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>\r
+            <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>\r
+            <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>\r
+            <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>\r
+            <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>\r
+            <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>\r
+            <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>\r
+            <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>\r
+            <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">\r
+            <actions>\r
+                <create permission="ADMIN_ACQ_FUND" context_field="org"/>\r
+                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>\r
+                <update permission="ADMIN_ACQ_FUND" context_field="org"/>\r
+                <delete permission="ADMIN_ACQ_FUND" context_field="org"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqfat" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">\r
+               <fields oils_persist:primary="fund">\r
+                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">\r
+                                       <context link="fund" field="org" />\r
+                </retrieve>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqfdt" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">\r
+               <fields oils_persist:primary="fund">\r
+                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">\r
+                                       <context link="fund" field="org" />\r
+                </retrieve>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqfet" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">\r
+               <fields oils_persist:primary="fund">\r
+                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">\r
+                                       <context link="fund" field="org" />\r
+                </retrieve>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqfst" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">\r
+               <fields oils_persist:primary="fund">\r
+                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">\r
+                                       <context link="fund" field="org" />\r
+                </retrieve>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqfcb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">\r
+               <fields oils_persist:primary="fund">\r
+                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">\r
+                                       <context link="fund" field="org" />\r
+                </retrieve>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+   <class id="acqafat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_allocation_total" reporter:label="All Fund Allocation Total">\r
+        <fields oils_persist:primary="fund">\r
+            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+            <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />\r
+        </fields>\r
+        <links>\r
+            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+        </links>\r
+    </class>\r
+\r
+   <class id="acqafet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_encumbrance_total" reporter:label="All Fund Encumbrance Total">\r
+        <fields oils_persist:primary="fund">\r
+            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+            <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />\r
+        </fields>\r
+        <links>\r
+            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+        </links>\r
+    </class>\r
+\r
+   <class id="acqafst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_total" reporter:label="All Fund Spent Total">\r
+        <fields oils_persist:primary="fund">\r
+            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+            <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />\r
+        </fields>\r
+        <links>\r
+            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+        </links>\r
+    </class>\r
+\r
+   <class id="acqafsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_balance" reporter:label="All Fund Spent Balance">\r
+        <fields oils_persist:primary="fund">\r
+            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+            <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />\r
+        </fields>\r
+        <links>\r
+            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+        </links>\r
+    </class>\r
+\r
+   <class id="acqafcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_combined_balance" reporter:label="All Fund Combined Total">\r
+        <fields oils_persist:primary="fund">\r
+            <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+            <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />\r
+        </fields>\r
+        <links>\r
+            <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+        </links>\r
+    </class>\r
+\r
+       <class id="acqfsrcct" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_credit_total" reporter:label="Total Credit to Funding Source">\r
+               <fields oils_persist:primary="funding_source">\r
+                       <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />\r
+                       <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqfsrcat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_allocation_total" reporter:label="Total Allocation to Funding Source">\r
+               <fields oils_persist:primary="funding_source">\r
+                       <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />\r
+                       <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqfsrcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_balance" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_balance" reporter:label="Funding Source Balance">\r
+               <fields oils_persist:primary="funding_source">\r
+                       <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />\r
+                       <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqfsb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">\r
+               <fields oils_persist:primary="fund">\r
+                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />\r
+               </fields>\r
+               <links>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">\r
+                                       <context link="fund" field="org" />\r
+                </retrieve>\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+    <class id="acqfsum" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_summary" reporter:label="Fund Summary" reporter:core="true" oils_persist:readonly="true">\r
+        <oils_persist:source_definition><![CDATA[\r
+            SELECT\r
+                acqf.*,\r
+                COALESCE(acqfat.amount, 0.00) AS allocated_total,\r
+                COALESCE(acqfst.amount, 0.00) AS spent_total,\r
+                COALESCE(acqfet.amount, 0.00) AS encumbrance_total,\r
+                COALESCE(acqfcb.amount, 0.00) AS combined_balance\r
+            FROM\r
+                acq.fund acqf\r
+                LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)\r
+                LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)\r
+                LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)\r
+                LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)\r
+        ]]></oils_persist:source_definition>\r
+        <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">\r
+            <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>\r
+            <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />\r
+            <field reporter:label="Name" name="name" reporter:datatype="text" />\r
+            <field reporter:label="Year" name="year" reporter:datatype="int" />\r
+            <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />\r
+            <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+            <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />\r
+            <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />\r
+            <field reporter:label="Active" name="active" reporter:datatype="bool" />\r
+            <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />\r
+            <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />\r
+\r
+            <!-- non fund-native fields -->\r
+            <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>\r
+            <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>\r
+            <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>\r
+            <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>\r
+        </fields>\r
+        <links>\r
+            <link field="id" reltype="has_a" key="id" map="" class="acqf"/>\r
+            <link field="org" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+       <class id="acqfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">\r
+                       <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Fund" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />\r
+                       <field reporter:label="Amount" name="amount" reporter:datatype="money" />\r
+                       <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text" />\r
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />\r
+               </fields>\r
+               <links>\r
+                       <link field="allocator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_FUND">\r
+                    <context link="fund" field="org"/>\r
+                </create>\r
+                               <retrieve permission="ADMIN_ACQ_FUND">\r
+                    <context link="fund" field="org"/>\r
+                </retrieve>\r
+                               <update permission="ADMIN_ACQ_FUND">\r
+                    <context link="fund" field="org"/>\r
+                </update>\r
+                               <delete permission="ADMIN_ACQ_FUND">\r
+                    <context link="fund" field="org"/>\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+    <class id="acqfap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation_percent" oils_persist:tablename="acq.fund_allocation_percent" reporter:label="Fund Allocation Percent">\r
+        <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">\r
+            <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />\r
+            <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />\r
+            <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />\r
+            <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />\r
+            <field reporter:label="Percent" name="percent" reporter:datatype="float" />\r
+            <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />\r
+            <field reporter:label="Note" name="note" reporter:datatype="text" />\r
+            <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />\r
+        </fields>\r
+        <links>\r
+            <link field="allocator" reltype="has_a" key="id" map="" class="au"/>\r
+            <link field="org" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>\r
+        </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>\r
+                               <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>\r
+                               <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>\r
+                               <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+    </class>\r
+\r
+       <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">\r
+                       <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link" />\r
+                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqcr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::cancel_reason" oils_persist:tablename="acq.cancel_reason" reporter:label="Cancel Reason">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>\r
+                       <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>\r
+                               <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>\r
+                               <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>\r
+                               <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqpo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::purchase_order" oils_persist:tablename="acq.purchase_order" reporter:label="Purchase Order">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">\r
+                       <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link" />\r
+                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Provider" name="provider" reporter:datatype="link" />\r
+                       <field reporter:label="State" name="state" reporter:datatype="text" />\r
+                       <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />\r
+                       <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text" />\r
+                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />\r
+                       <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />\r
+                       <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />\r
+                       <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />\r
+                       <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />\r
+                       <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />\r
+                       <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+                       <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>\r
+                       <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>\r
+                       <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>\r
+                       <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>\r
+                               <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>\r
+                               <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>\r
+                               <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqpoh" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_purchase_order_history" oils_persist:tablename="acq.acq_purchase_order_history" reporter:label="Purchase Order History">\r
+               <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">\r
+                       <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>\r
+                       <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>\r
+                       <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>\r
+                       <field reporter:label="State" name="state" reporter:datatype="text"/>\r
+                       <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>\r
+                       <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>\r
+            </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqpon" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">\r
+                       <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />\r
+                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />\r
+                       <field reporter:label="Vote Value" name="value" reporter:datatype="text" />\r
+                       <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />\r
+               </fields>\r
+               <links>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_PURCHASE_ORDER">\r
+                    <context link="purchase_order" field="ordering_agency"/>\r
+                </create>\r
+                <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">\r
+                    <context link="purchase_order" field="ordering_agency"/>\r
+                </retrieve>\r
+                <update permission="CREATE_PURCHASE_ORDER">\r
+                    <context link="purchase_order" field="ordering_agency"/>\r
+                </update>\r
+                <delete permission="CREATE_PURCHASE_ORDER">\r
+                    <context link="purchase_order" field="ordering_agency"/>\r
+                </delete>\r
+            </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqpoi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_item" oils_persist:tablename="acq.po_item" reporter:label="Purchase Order Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>\r
+                       <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>\r
+                       <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="Author" name="author" reporter:datatype="text"/>\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+                       <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>\r
+                       <field reporter:label="Fund" name="fund" reporter:datatype="link"/>\r
+                       <field reporter:label="Target" name="target" reporter:datatype="int" />\r
+               </fields>\r
+               <links>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>\r
+                       <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>\r
+                       <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="CREATE_PURCHASE_ORDER">\r
+                    <context link="purchase_order" field="ordering_agency"/>\r
+                </create>\r
+                <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">\r
+                    <context link="purchase_order" field="ordering_agency"/>\r
+                </retrieve>\r
+                <update permission="CREATE_PURCHASE_ORDER">\r
+                    <context link="purchase_order" field="ordering_agency"/>\r
+                </update>\r
+                <delete permission="CREATE_PURCHASE_ORDER">\r
+                    <context link="purchase_order" field="ordering_agency"/>\r
+                </delete>\r
+            </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">\r
+                       <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />\r
+                       <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />\r
+                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />\r
+                       <field reporter:label="Provider" name="provider" reporter:datatype="link" />\r
+                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="MARC" name="marc" reporter:datatype="text" />\r
+                       <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />\r
+                       <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />\r
+                       <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="State" name="state" reporter:datatype="text" />\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />\r
+                       <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />\r
+                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />\r
+                       <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />\r
+                       <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />\r
+                       <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />\r
+                       <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />\r
+                       <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="selector" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>\r
+                       <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>\r
+                       <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>\r
+                       <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>\r
+                       <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>\r
+                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>\r
+                       <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>\r
+                       <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>\r
+                       <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>\r
+                       <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>\r
+                       <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">\r
+                                       <context link="purchase_order" field="ordering_agency"/>\r
+                                       <context link="picklist" field="org_unit"/>\r
+                               </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqlih" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_lineitem_history" oils_persist:tablename="acq.acq_lineitem_history" reporter:label="Line Item History">\r
+               <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">\r
+                       <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>\r
+                       <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>\r
+                       <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link"/>\r
+                       <field reporter:label="Selector" name="selector" reporter:datatype="link"/>\r
+                       <field reporter:label="Provider" name="provider" reporter:datatype="link"/>\r
+                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>\r
+                       <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>\r
+                       <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="MARC" name="marc" reporter:datatype="text"/>\r
+                       <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>\r
+                       <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>\r
+                       <field reporter:label="State" name="state" reporter:datatype="text"/>\r
+                       <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>\r
+                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>\r
+                       <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />\r
+                       <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="jub"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="selector" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>\r
+                       <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>\r
+                       <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>\r
+                       <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>\r
+                       <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">\r
+                                       <context link="purchase_order" field="ordering_agency"/>\r
+                                       <context link="picklist" field="org_unit"/>\r
+                               </retrieve>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqliat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_alert_text" oils_persist:tablename="acq.lineitem_alert_text" reporter:label="Line Item Alert Text">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">\r
+                       <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>\r
+                               <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>\r
+                               <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>\r
+                               <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqlin" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_note" oils_persist:tablename="acq.lineitem_note" reporter:label="Line Item Note">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">\r
+                       <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link" />\r
+                       <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Editor" name="editor" reporter:datatype="link" />\r
+                       <field reporter:label="Note Value" name="value" reporter:datatype="text" />\r
+                       <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />\r
+                       <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />\r
+               </fields>\r
+               <links>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+                       <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqlia" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr" oils_persist:tablename="acq.lineitem_attr" reporter:label="Line Item Attribute">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">\r
+                       <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />\r
+                       <field reporter:label="Type" name="attr_type" reporter:datatype="text" />\r
+                       <field reporter:label="Name" name="attr_name" reporter:datatype="text" />\r
+                       <field reporter:label="Value" name="attr_value" reporter:datatype="text" />\r
+                       <field reporter:label="Definition" name="definition" reporter:datatype="text" />\r
+                       <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />\r
+               </fields>\r
+               <links>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+                       <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">\r
+                       <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />\r
+                       <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />\r
+                       <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />\r
+                       <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />\r
+                       <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />\r
+                       <field reporter:label="Fund" name="fund" reporter:datatype="link" />\r
+                       <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />\r
+                       <field reporter:label="Copy Location" name="location" reporter:datatype="link" />\r
+                       <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text" />\r
+                       <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />\r
+                       <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />\r
+                       <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />\r
+               </fields>\r
+               <links>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+                       <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>\r
+                       <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>\r
+                       <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>\r
+                       <link field="receiver" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">\r
+                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqlimad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">\r
+                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="XPath" name="xpath" reporter:datatype="text" />\r
+                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>\r
+            <field reporter:label="Remove" name="remove" reporter:datatype="text" />\r
+               </fields>\r
+               <links/>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>\r
+                <retrieve />\r
+                <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>\r
+                <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqligad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_generated_attr_definition" oils_persist:tablename="acq.lineitem_generated_attr_definition" reporter:label="Line Item Generated Attribute Definition">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">\r
+                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="XPath" name="xpath" reporter:datatype="text" />\r
+                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links/>\r
+       </class>\r
+       <class id="acqliuad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_usr_attr_definition" oils_persist:tablename="acq.lineitem_usr_attr_definition" reporter:label="Line Item User Attribute Definition">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">\r
+                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link" />\r
+                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqlipad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_provider_attr_definition" oils_persist:tablename="acq.lineitem_provider_attr_definition" reporter:label="Line Item Provider Attribute Definition">\r
+           <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">\r
+               <field reporter:label="Definition ID" name="id" reporter:datatype="id" />\r
+               <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+               <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+               <field reporter:label="XPath" name="xpath" reporter:datatype="text" />\r
+               <field reporter:label="Provider" name="provider" reporter:datatype="link" />\r
+               <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>\r
+        <field reporter:label="Remove" name="remove" reporter:datatype="text" />\r
+\r
+           </fields>\r
+           <links>\r
+               <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+           </links>\r
+            <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                <actions>\r
+                    <create permission="ADMIN_PROVIDER">\r
+                        <context link="provider" field="owner"/>\r
+                    </create>\r
+                    <retrieve permission="ADMIN_PROVIDER">\r
+                        <context link="provider" field="owner"/>\r
+                    </retrieve>\r
+                    <update permission="ADMIN_PROVIDER">\r
+                        <context link="provider" field="owner"/>\r
+                    </update>\r
+                    <delete permission="ADMIN_PROVIDER">\r
+                        <context link="provider" field="owner"/>\r
+                    </delete>\r
+                </actions>\r
+            </permacrud>\r
+       </class>\r
+        \r
+       <class id="acqphsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_holding_subfield_map" oils_persist:tablename="acq.provider_holding_subfield_map" reporter:label="Provider Holding Subfield Map">\r
+           <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">\r
+               <field reporter:label="ID" name="id" reporter:datatype="id" />\r
+               <field reporter:label="Provider" name="provider" reporter:datatype="link" />\r
+               <field reporter:label="Name" name="name" reporter:datatype="text" />\r
+               <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />\r
+           </fields>\r
+           <links>\r
+               <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+           </links>\r
+            <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                <actions>\r
+                    <create permission="ADMIN_PROVIDER">\r
+                        <context link="provider" field="owner"/>\r
+                    </create>\r
+                    <retrieve permission="ADMIN_PROVIDER">\r
+                        <context link="provider" field="owner"/>\r
+                    </retrieve>\r
+                    <update permission="ADMIN_PROVIDER">\r
+                        <context link="provider" field="owner"/>\r
+                    </update>\r
+                    <delete permission="ADMIN_PROVIDER">\r
+                        <context link="provider" field="owner"/>\r
+                    </delete>\r
+                </actions>\r
+            </permacrud>\r
+       </class>\r
+        \r
+       <class id="acqlilad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_local_attr_definition" oils_persist:tablename="acq.lineitem_local_attr_definition" reporter:label="Line Item Local Attribute Definition">\r
+           <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">\r
+                       <field reporter:label="Definition ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />\r
+                       <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links/>\r
+       </class>\r
+\r
+       <class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->\r
+                       <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>\r
+                       <field name="label"         reporter:datatype="text"      reporter:label="Label"/>\r
+                       <field name="host"          reporter:datatype="text"      reporter:label="Host"/>\r
+                       <field name="username"      reporter:datatype="text"      reporter:label="Username"/>\r
+                       <field name="password"      reporter:datatype="text"      reporter:label="Password"/>\r
+                       <field name="account"       reporter:datatype="text"      reporter:label="Account"/>\r
+                       <field name="path"          reporter:datatype="text"      reporter:label="Path"/>\r
+                       <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>\r
+                       <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>\r
+                       <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>\r
+                       <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>\r
+                       <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>\r
+                       <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </create>\r
+                <retrieve permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </retrieve>\r
+                <update permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </update>\r
+                <delete permission="ADMIN_PROVIDER">\r
+                    <context link="provider" field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+       <class id="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">\r
+                       <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>\r
+                       <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>\r
+                       <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>\r
+                       <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>\r
+                       <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>\r
+                       <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>\r
+                       <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>\r
+                       <field name="status"           reporter:datatype="text"      reporter:label="Status"/>\r
+                       <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>\r
+                       <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>\r
+                       <field name="error"            reporter:datatype="text"      reporter:label="Error"/>\r
+                       <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>\r
+                       <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>\r
+               </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">\r
+                    <context link="account" jump="provider" field="owner"/>\r
+                </retrieve>\r
+                <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">\r
+                    <context link="account" jump="provider" field="owner"/>\r
+                </update>\r
+                <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">\r
+                    <context link="account" jump="provider" field="owner"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+       </class>\r
+\r
+\r
+       <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="parent" reporter:datatype="link"/>\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="create_time" reporter:datatype="timestamp"/>\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="shared" reporter:datatype="bool"/>\r
+                       <field name="share_with" reporter:datatype="link"/>\r
+                       <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="parent" reltype="has_a" key="id" map="" class="rof"/>\r
+                       <link field="children" reltype="has_many" key="parent" map="" class="rof"/>\r
+                       <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>\r
+               </links>\r
+       </class>\r
+       <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="parent" reporter:datatype="link"/>\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="create_time" reporter:datatype="timestamp"/>\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="shared" reporter:datatype="bool"/>\r
+                       <field name="share_with" reporter:datatype="link"/>\r
+                       <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>\r
+                       <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>\r
+                       <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>\r
+               </links>\r
+       </class>\r
+       <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="parent" reporter:datatype="link"/>\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="create_time" reporter:datatype="timestamp"/>\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="shared" reporter:datatype="bool"/>\r
+                       <field name="share_with" reporter:datatype="link"/>\r
+                       <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>\r
+                       <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>\r
+                       <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>\r
+               </links>\r
+       </class>\r
+       <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="create_time" reporter:datatype="timestamp"/>\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="data" reporter:datatype="text"/>\r
+                       <field name="folder" reporter:datatype="link"/>\r
+                       <field name="description" reporter:datatype="text"/>\r
+                       <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>\r
+                       <link field="reports" reltype="has_many" key="template" map="" class="rr"/>\r
+               </links>\r
+       </class>\r
+       <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="owner" reporter:datatype="link"/>\r
+                       <field name="create_time" reporter:datatype="timestamp"/>\r
+                       <field name="template" reporter:datatype="link"/>\r
+                       <field name="data" reporter:datatype="text"/>\r
+                       <field name="folder" reporter:datatype="link"/>\r
+                       <field name="recur" reporter:datatype="bool"/>\r
+                       <field name="recurrence" reporter:datatype="interval"/>\r
+                       <field name="name" reporter:datatype="text"/>\r
+                       <field name="description" reporter:datatype="text"/>\r
+                       <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="template" reltype="has_a" key="id" map="" class="rt"/>\r
+                       <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>\r
+                       <link field="runs" reltype="has_many" key="report" map="" class="rs"/>\r
+               </links>\r
+       </class>\r
+       <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">\r
+                       <field name="id" reporter:datatype="id" />\r
+                       <field name="runner" reporter:datatype="link"/>\r
+                       <field name="start_time" reporter:datatype="timestamp"/>\r
+                       <field name="complete_time" reporter:datatype="timestamp"/>\r
+                       <field name="run_time" reporter:datatype="timestamp"/>\r
+                       <field name="email" reporter:datatype="text"/>\r
+                       <field name="excel_format" reporter:datatype="bool"/>\r
+                       <field name="csv_format" reporter:datatype="bool"/>\r
+                       <field name="html_format" reporter:datatype="bool"/>\r
+                       <field name="error_code" reporter:datatype="int"/>\r
+                       <field name="error_text" reporter:datatype="text"/>\r
+                       <field name="report" reporter:datatype="link"/>\r
+                       <field name="folder" reporter:datatype="link"/>\r
+                       <field name="chart_pie" reporter:datatype="bool"/>\r
+                       <field name="chart_bar" reporter:datatype="bool"/>\r
+                       <field name="chart_line" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="runner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="report" reltype="has_a" key="id" map="" class="rr"/>\r
+                       <link field="folder" reltype="has_a" key="id" map="" class="rof"/>\r
+               </links>\r
+       </class>\r
+       <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>\r
+                       <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>\r
+                       <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>\r
+                       <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>\r
+                       <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>\r
+                       <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>\r
+                       <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>\r
+                       <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>\r
+                       <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>\r
+                       <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="rssr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::super_simple_record" oils_persist:tablename="reporter.super_simple_record" reporter:label="Simple Record Extracts">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>\r
+                       <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>\r
+                       <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>\r
+                       <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>\r
+                       <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>\r
+                       <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>\r
+                       <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>\r
+                       <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>\r
+                       <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>\r
+                       <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+       <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>\r
+                       <field reporter:label="Fingerprint" name="fingerprint" />\r
+                       <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>\r
+                       <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>\r
+                       <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>\r
+                       <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>\r
+                       <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>\r
+                       <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>\r
+                       <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>\r
+                       <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>\r
+                       <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>\r
+                       <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>\r
+                       <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>\r
+                       <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>\r
+                       <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>\r
+                       <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>\r
+                       <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>\r
+                       <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>\r
+                       <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>\r
+                       <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>\r
+                       <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>\r
+                       <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+       <class id="rud" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::user_demographic" oils_persist:tablename="reporter.demographic" reporter:label="User Demographics">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="User ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="might_have" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+       <class id="rcirct" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::circulation_type" oils_persist:tablename="reporter.circ_type" reporter:label="Circulation Type">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="might_have" key="id" map="" class="circ"/>\r
+               </links>\r
+       </class>\r
+       <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Hold ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Hold Target" name="target" reporter:datatype="int" />\r
+                       <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="might_have" key="id" map="" class="ahr"/>\r
+                       <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+       <class id="rxbt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_billing_totals" oils_persist:tablename="reporter.xact_billing_totals" reporter:label="Transaction Billing Totals">\r
+               <fields oils_persist:primary="xact">\r
+                       <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />\r
+                       <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />\r
+                       <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>\r
+                       <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>\r
+               </links>\r
+       </class>\r
+       <class id="rxpt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_paid_totals" oils_persist:tablename="reporter.xact_paid_totals" reporter:label="Transaction Paid Totals">\r
+               <fields oils_persist:primary="xact">\r
+                       <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />\r
+                       <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />\r
+                       <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>\r
+                       <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>\r
+               </links>\r
+       </class>\r
+       <class id="ergbhu" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::global_bibs_by_holding_update" oils_persist:tablename="extend_reporter.global_bibs_by_holding_update" reporter:label="Bib IDs by Holding Add/Delete Time (OCLC batch update)">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Bib ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+       <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Copy ID" name="id" reporter:datatype="int" />\r
+                       <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="acp"/>\r
+               </links>\r
+       </class>\r
+       <class id="acqdf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula" oils_persist:tablename="acq.distribution_formula" reporter:label="Distribution Formula">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">\r
+                       <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />\r
+                       <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>\r
+                               <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>\r
+                               <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>\r
+                               <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="acqdfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_entry" oils_persist:tablename="acq.distribution_formula_entry" reporter:label="Distribution Formula Entry">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">\r
+                       <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>\r
+                       <field reporter:label="Position" name="position" reporter:datatype="int"/>\r
+                       <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Location" name="location" reporter:datatype="link"/>\r
+                       <field reporter:label="Fund" name="fund" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>\r
+                       <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="location" reltype="has_a" key="id" map="" class="acpl"/>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_DISTRIB_FORMULA">\r
+                                       <context link="formula" field="owner"/>\r
+                               </create>\r
+                               <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">\r
+                                       <context link="formula" field="owner"/>\r
+                               </retrieve>\r
+                               <update permission="ADMIN_ACQ_DISTRIB_FORMULA">\r
+                                       <context link="formula" field="owner"/>\r
+                               </update>\r
+                               <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">\r
+                                       <context link="formula" field="owner"/>\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqdfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_application" oils_persist:tablename="acq.distribution_formula_application" reporter:label="Distribution Formula Application">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>\r
+                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="CREATE_PURCHASE_ORDER">\r
+                                       <context link="formula" field="owner"/>\r
+                </create>\r
+                               <retrieve permission="CREATE_PURCHASE_ORDER">\r
+                                       <context link="formula" field="owner"/>\r
+                </retrieve>\r
+                               <update permission="CREATE_PURCHASE_ORDER">\r
+                                       <context link="formula" field="owner"/>\r
+                </update>\r
+                               <delete permission="CREATE_PURCHASE_ORDER">\r
+                                       <context link="formula" field="owner"/>\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>\r
+                       <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>\r
+                       <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>\r
+                       <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqclt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_type" oils_persist:tablename="acq.claim_type" reporter:label="Claim Type">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">\r
+                       <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />\r
+                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>\r
+                               <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>\r
+                               <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>\r
+                               <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqclet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event_type" oils_persist:tablename="acq.claim_event_type" reporter:label="Claim Event Type">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">\r
+                       <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />\r
+                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Code" name="code" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+                       <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>\r
+                               <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>\r
+                               <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>\r
+                               <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">\r
+                       <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>\r
+                       <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>\r
+                       <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">\r
+                       <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>\r
+                       <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>\r
+                       <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>\r
+                       <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">\r
+                       <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>\r
+                       <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>\r
+                       <link field="item" reltype="has_a" key="id" map="" class="sitem"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">\r
+                       <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>\r
+                       <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>\r
+                       <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Note" name="note" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>\r
+                       <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acqclp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy" oils_persist:tablename="acq.claim_policy" reporter:label="Claim Policy">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>\r
+                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>\r
+                <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>\r
+                <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>\r
+                <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>\r
+            </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="acqclpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy_action" oils_persist:tablename="acq.claim_policy_action" reporter:label="Claim Policy Action">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>\r
+                       <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>\r
+                       <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>\r
+                       <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_CLAIM_POLICY">\r
+                                       <context link="claim_policy" field="org_unit"/>\r
+                </create>\r
+                               <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">\r
+                                       <context link="claim_policy" field="org_unit"/>\r
+                </retrieve>\r
+                               <update permission="ADMIN_CLAIM_POLICY">\r
+                                       <context link="claim_policy" field="org_unit"/>\r
+                </update>\r
+                               <delete permission="ADMIN_CLAIM_POLICY">\r
+                                       <context link="claim_policy" field="org_unit"/>\r
+                </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+    <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">\r
+        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">\r
+            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>\r
+            <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>\r
+            <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>\r
+            <field reporter:label="Email Address" name="email" reporter:datatype="text"/>\r
+            <field reporter:label="Password" name="passwd" reporter:datatype="text"/>\r
+            <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>\r
+            <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>\r
+            <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>\r
+            <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>\r
+            <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>\r
+            <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>\r
+            <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>\r
+            <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>\r
+            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>\r
+            <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>\r
+        </fields>\r
+        <links>\r
+            <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+        </links>\r
+    </class>\r
+\r
+    <class id="stgc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::card_stage" oils_persist:tablename="staging.card_stage" reporter:label="Card Stage">\r
+        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">\r
+            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>\r
+            <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>\r
+            <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>\r
+            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>\r
+        </fields>\r
+    </class>\r
+\r
+    <class id="stgma" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::mailing_address_stage" oils_persist:tablename="staging.mailing_address_stage" reporter:label="Mailing Address Stage">\r
+        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">\r
+            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>\r
+            <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>\r
+            <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>\r
+            <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>\r
+            <field reporter:label="City" name="city" reporter:datatype="text"/>\r
+            <field reporter:label="County" name="county"  reporter:datatype="text"/>\r
+            <field reporter:label="State" name="state" reporter:datatype="text"/>\r
+            <field reporter:label="Country" name="country" reporter:datatype="text"/>\r
+            <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>\r
+            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>\r
+        </fields>\r
+    </class>\r
+\r
+    <class id="stgba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::billing_address_stage" oils_persist:tablename="staging.billing_address_stage" reporter:label="Billing Address Stage">\r
+        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">\r
+            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>\r
+            <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>\r
+            <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>\r
+            <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>\r
+            <field reporter:label="City" name="city" reporter:datatype="text"/>\r
+            <field reporter:label="County" name="county"  reporter:datatype="text"/>\r
+            <field reporter:label="State" name="state" reporter:datatype="text"/>\r
+            <field reporter:label="Country" name="country" reporter:datatype="text"/>\r
+            <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>\r
+            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>\r
+        </fields>\r
+    </class>\r
+\r
+    <class id="stgsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::statcat_stage" oils_persist:tablename="staging.statcat_stage" reporter:label="Statistical Category Stage">\r
+        <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">\r
+            <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>\r
+            <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>\r
+            <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>\r
+            <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>\r
+            <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>\r
+        </fields>\r
+    </class>\r
+\r
+       <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">\r
+                       <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Status" name="status" reporter:datatype="text"/>\r
+                       <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>\r
+                       <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>\r
+                       <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">\r
+                       <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>\r
+                       <field reporter:label="Column Name" name="col" reporter:datatype="text"/>\r
+                       <field reporter:label="Column Value" name="val" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>\r
+               </links>\r
+       </class>\r
+\r
+    <class id="aufhl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_loops" oils_persist:tablename="action.unfulfilled_hold_loops" oils_persist:readonly="true">\r
+        <fields>\r
+            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>\r
+            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>\r
+            <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+    </class>\r
+\r
+    <class id="aufhml" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_min_loop" oils_persist:tablename="action.unfulfilled_hold_min_loop" oils_persist:readonly="true">\r
+        <fields>\r
+            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>\r
+            <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+               </links>\r
+    </class>\r
+\r
+    <class id="aufhil" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_innermost_loop" oils_persist:tablename="action.unfulfilled_hold_innermost_loop" oils_persist:readonly="true">\r
+        <fields>\r
+            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>\r
+            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>\r
+            <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+    </class>\r
+\r
+    <class id="aufhmxl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_max_loop" oils_persist:tablename="action.unfulfilled_hold_max_loop" oils_persist:readonly="true">\r
+        <fields>\r
+            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>\r
+            <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+               </links>\r
+    </class>\r
+\r
+    <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">\r
+               <oils_persist:source_definition>\r
+\r
+           SELECT  DISTINCT l.*\r
+             FROM  action.unfulfilled_hold_loops l\r
+                   JOIN action.unfulfilled_hold_max_loop m USING (hold)\r
+             WHERE l.count = m.max\r
+\r
+               </oils_persist:source_definition>\r
+        <fields>\r
+            <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>\r
+            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>\r
+            <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+    </class>\r
+\r
+       <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">\r
+                       <field reporter:label="Query ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Query type" name="type" reporter:datatype="text"/>\r
+                       <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>\r
+                       <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>\r
+                       <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>\r
+                       <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>\r
+                       <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>\r
+                       <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>\r
+                       <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>\r
+                       <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">\r
+                       <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>\r
+                       <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">\r
+                       <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>\r
+                       <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">\r
+                       <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>\r
+                       <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>\r
+               </links>\r
+       </class>\r
+       \r
+       <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">\r
+                       <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>\r
+               </links>\r
+       </class>\r
+       \r
+       <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">\r
+                       <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>\r
+                       <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">\r
+               <fields oils_persist:primary="name">\r
+                       <field reporter:label="Name" name="name" reporter:datatype="id"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>\r
+                       <field reporter:label="Type" name="type" reporter:datatype="text"/>\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text"/>\r
+                       <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>\r
+                       <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Literal" name="literal" reporter:datatype="text"/>\r
+                       <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>\r
+                       <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Operator" name="operator" reporter:datatype="text"/>\r
+                       <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>\r
+                       <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>\r
+                       <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+                       <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>\r
+                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>\r
+                       <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>\r
+                       <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">\r
+                       <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Condition" name="condition" reporter:datatype="link"/>\r
+                       <field reporter:label="Result" name="result" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="result" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">\r
+                       <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>\r
+                       <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>\r
+                       <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>\r
+                       <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>\r
+                       <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>\r
+                       <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>\r
+                       <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>\r
+                       <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">\r
+                       <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>\r
+                       <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">\r
+                       <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Expression" name="expression" reporter:datatype="link"/>\r
+                       <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>\r
+                       <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>\r
+                       <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">\r
+                       <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Expression" name="expression" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>\r
+                       <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Literal" name="literal" reporter:datatype="text"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>\r
+                       <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Literal" name="literal" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Operator" name="operator" reporter:datatype="text"/>\r
+                       <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Operator" name="operator" reporter:datatype="text"/>\r
+                       <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Literal" name="literal" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">\r
+                       <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>\r
+                       <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>\r
+                       <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>\r
+                       <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>\r
+                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="bmpc" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::marc21_physical_characteristics" oils_persist:tablename="biblio.marc21_physical_characteristics" reporter:label="MARC21 Physical Characteristics" oils_persist:field_safe="true" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Type" name="ptype" reporter:datatype="link"/>\r
+                       <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="link"/>\r
+                       <field reporter:label="Record" name="record" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>\r
+                       <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>\r
+                       <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="cmfpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_ff_pos_map" oils_persist:tablename="config.marc21_ff_pos_map" reporter:label="MARC21 Fixed Field Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>\r
+                       <field reporter:label="Tag" name="tag" reporter:datatype="text"/>\r
+                       <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>\r
+                       <field reporter:label="Length" name="length" reporter:datatype="int"/>\r
+                       <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="cmpctm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_type_map" oils_persist:tablename="config.marc21_physical_characteristic_type_map" reporter:label="MARC21 Physical Characteristic Type Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="ptype_key">\r
+                       <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="cmpcsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_subfield_map" oils_persist:tablename="config.marc21_physical_characteristic_subfield_map" reporter:label="MARC21 Physical Characteristic Subfield Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>\r
+                       <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>\r
+                       <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>\r
+                       <field reporter:label="Length" name="length" reporter:datatype="int"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="cmpcvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Value" name="value" reporter:datatype="text"/>\r
+                       <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>\r
+                       <field reporter:label="Label" name="label" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+    <class\r
+        id="uvs"\r
+        controller="open-ils.cstore open-ils.pcrud"\r
+        oils_obj:fieldmapper="url_verify::session"\r
+        oils_persist:tablename="url_verify.session"\r
+        reporter:label="URL Verification Session"\r
+    >\r
+        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">\r
+            <field reporter:label="Session ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>\r
+            <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>\r
+            <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>\r
+            <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>\r
+            <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>\r
+            <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>\r
+        </fields>\r
+\r
+        <links>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+            <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>\r
+            <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>\r
+            <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>\r
+        </links>\r
+\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="URL_VERIFY" context_field="owning_lib"/>\r
+            </actions>\r
+        </permacrud>\r
+\r
+    </class>\r
+\r
+    <class id="uvsbrem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="url_verify::session_biblio_record_entry_map" oils_persist:readonly="true" reporter:label="URL Verify Session Biblio Record Entry Map">\r
+        <oils_persist:source_definition>\r
+            SELECT\r
+                cbrebi.id AS id,  -- so we can have a pkey in our view\r
+                uvs.id AS session,\r
+                uvs.owning_lib,\r
+                cbrebi.target_biblio_record_entry\r
+            FROM url_verify.session uvs\r
+            JOIN container.biblio_record_entry_bucket cbreb\r
+                ON (uvs.container = cbreb.id)\r
+            JOIN container.biblio_record_entry_bucket_item cbrebi\r
+                ON (cbrebi.bucket = cbreb.id)\r
+        </oils_persist:source_definition>\r
+        <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">\r
+            <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />\r
+            <field reporter:label="Session" name="session" reporter:datatype="link" />\r
+            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />\r
+            <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />\r
+        </fields>\r
+        <links>\r
+            <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />\r
+            <link field="session" reltype="has_a" key="id" map="" class="uvs" />\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />\r
+        </links>\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <retrieve permission="URL_VERIFY" context_field="owning_lib" />\r
+            </actions>\r
+        </permacrud>\r
+    </class>\r
+\r
+    <class\r
+        id="uvus"\r
+        controller="open-ils.cstore open-ils.pcrud"\r
+        oils_obj:fieldmapper="url_verify::url_selector"\r
+        oils_persist:tablename="url_verify.url_selector"\r
+        reporter:label="URL Verification URL Selector"\r
+    >\r
+        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">\r
+            <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>\r
+                       <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>\r
+            <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>\r
+        </fields>\r
+\r
+        <links>\r
+            <link field="session" reltype="has_a" key="id" map="" class="uvs"/>\r
+            <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>\r
+        </links>\r
+\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </create>\r
+                <retrieve permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </retrieve>\r
+                <update permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+\r
+    </class>\r
+\r
+    <class\r
+        id="uvu"\r
+        controller="open-ils.cstore open-ils.pcrud"\r
+        oils_obj:fieldmapper="url_verify::url"\r
+        oils_persist:tablename="url_verify.url"\r
+        reporter:label="URL Verification URL"\r
+    >\r
+        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">\r
+            <field reporter:label="URL ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>\r
+                       <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>\r
+                       <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>\r
+                       <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>\r
+            <field reporter:label="Tag" name="tag" reporter:datatype="text"/>\r
+            <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>\r
+            <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>\r
+            <field reporter:label="URL" name="full_url" reporter:datatype="text"/>\r
+            <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>\r
+            <field reporter:label="Host" name="host" reporter:datatype="text"/>\r
+            <field reporter:label="Domain" name="domain" reporter:datatype="text"/>\r
+            <field reporter:label="TLD" name="tld" reporter:datatype="text"/>\r
+            <field reporter:label="Path" name="path" reporter:datatype="text"/>\r
+            <field reporter:label="Page" name="page" reporter:datatype="text"/>\r
+            <field reporter:label="Query" name="query" reporter:datatype="text"/>\r
+            <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>\r
+            <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />\r
+        </fields>\r
+\r
+        <links>\r
+            <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>\r
+            <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />\r
+            <link field="session" reltype="has_a" key="id" map="" class="uvs"/>\r
+            <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>\r
+            <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>\r
+        </links>\r
+\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </create>\r
+                <retrieve permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </retrieve>\r
+                <update permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+\r
+    </class>\r
+\r
+    <class\r
+        id="uvva"\r
+        controller="open-ils.cstore open-ils.pcrud"\r
+        oils_obj:fieldmapper="url_verify::verification_attempt"\r
+        oils_persist:tablename="url_verify.verification_attempt"\r
+        reporter:label="URL Verification Attempt"\r
+    >\r
+        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">\r
+            <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="User" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Session" name="session" reporter:datatype="link"/>\r
+            <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>\r
+        </fields>\r
+\r
+        <links>\r
+            <link field="session" reltype="has_a" key="id" map="" class="uvs"/>\r
+            <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+        </links>\r
+\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </create>\r
+                <retrieve permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </retrieve>\r
+                <update permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="URL_VERIFY">\r
+                    <context link="session" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+\r
+    </class>\r
+\r
+    <class\r
+        id="uvuv"\r
+        controller="open-ils.cstore open-ils.pcrud"\r
+        oils_obj:fieldmapper="url_verify::url_verification"\r
+        oils_persist:tablename="url_verify.url_verification"\r
+        reporter:label="URL Verification"\r
+    >\r
+        <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">\r
+            <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="URL" name="url" reporter:datatype="link"/>\r
+                       <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>\r
+            <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>\r
+            <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>\r
+                       <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>\r
+        </fields>\r
+\r
+        <links>\r
+            <link field="url" reltype="has_a" key="id" map="" class="uvu"/>\r
+            <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>\r
+            <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>\r
+        </links>\r
+\r
+        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+            <actions>\r
+                <create permission="URL_VERIFY">\r
+                    <context link="attempt" jump="session" field="owning_lib"/>\r
+                </create>\r
+                <retrieve permission="URL_VERIFY">\r
+                    <context link="attempt" jump="session" field="owning_lib"/>\r
+                </retrieve>\r
+                <update permission="URL_VERIFY">\r
+                    <context link="attempt" jump="session" field="owning_lib"/>\r
+                </update>\r
+                <delete permission="URL_VERIFY">\r
+                    <context link="attempt" jump="session" field="owning_lib"/>\r
+                </delete>\r
+            </actions>\r
+        </permacrud>\r
+\r
+    </class>\r
+\r
+       <class\r
+               id="cfdi"\r
+               controller="open-ils.cstore open-ils.pcrud"\r
+               oils_obj:fieldmapper="config::filter_dialog_interface"\r
+               oils_persist:tablename="config.filter_dialog_interface"\r
+               reporter:label="FilterDialog Interface">\r
+               <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">\r
+                       <field reporter:label="Interface Key" name="key" reporter:datatype="text" />\r
+                       <field reporter:label="Description" name="description" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve />\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class\r
+               id="cfdfs"\r
+               controller="open-ils.cstore open-ils.pcrud"\r
+               oils_obj:fieldmapper="config::filter_dialog_filter_set"\r
+               oils_persist:tablename="config.filter_dialog_filter_set"\r
+               reporter:label="FilterDialog Filter Set">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+                       <field reporter:label="Interface" name="interface" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Filters" name="filters" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>\r
+                               <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>\r
+                               <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>\r
+                               <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>\r
+                       </actions>\r
+               </permacrud>\r
+\r
+       </class>\r
+\r
+       <class id="cmrtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_rec_type_map" oils_persist:tablename="config.marc21_rec_type_map" reporter:label="MARC21 Record Type Map" oils_persist:field_safe="true">\r
+               <fields oils_persist:primary="code">\r
+                       <field reporter:label="Code" name="code" reporter:datatype="id"/>\r
+                       <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>\r
+                       <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>\r
+               </fields>\r
+               <links/>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">\r
+               <oils_persist:source_definition>\r
+\r
+            SELECT  b.id,\r
+                    MAX(dcp.edit_date) AS last_delete_date\r
+             FROM   biblio.record_entry b\r
+                    JOIN asset.call_number cn ON (cn.record = b.id)\r
+                    JOIN asset.copy dcp ON (cn.id = dcp.call_number)\r
+             WHERE  NOT b.deleted\r
+             GROUP BY b.id\r
+             HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 \r
+\r
+               </oils_persist:source_definition>\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">\r
+               <oils_persist:source_definition>\r
+\r
+            -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.\r
+            -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we\r
+            -- -- may not.\r
+            -- SELECT\r
+            --     bre.id AS "bib_id",\r
+            --     COALESCE( z.copy_count, 0 ) AS "copy_count",\r
+            --     COALESCE( z.hold_count, 0 ) AS "hold_count",\r
+            --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"\r
+            -- FROM (\r
+                SELECT\r
+                    y.bre AS "id",\r
+                    COALESCE( x.copy_count, 0 ) AS "copy_count",\r
+                    y.hold_count AS "hold_count",\r
+                    (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS "hold_copy_ratio"\r
+                FROM (\r
+                        SELECT\r
+                            (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",\r
+                            COUNT(*) AS "hold_count"\r
+                        FROM action.hold_request h\r
+                        WHERE\r
+                            cancel_time IS NULL\r
+                            AND fulfillment_time IS NULL\r
+                            -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?\r
+                        GROUP BY 1\r
+                    )y LEFT JOIN (\r
+                        SELECT \r
+                            (SELECT id\r
+                                FROM biblio.record_entry \r
+                                WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)\r
+                            ) AS "bre", \r
+                            COUNT(*) AS "copy_count"\r
+                        FROM asset.copy\r
+                            JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)\r
+                        WHERE copy.holdable \r
+                            AND NOT copy.deleted \r
+                            AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) \r
+                        GROUP BY 1\r
+                    )x ON x.bre = y.bre\r
+                -- )z RIGHT JOIN (\r
+                --     SELECT id\r
+                --     FROM biblio.record_entry\r
+                --     WHERE NOT deleted\r
+                -- )bre ON (z.bib_id = bre.id)\r
+                \r
+\r
+               </oils_persist:source_definition>\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">\r
+               <oils_persist:source_definition>\r
+            SELECT *,\r
+                CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,\r
+                CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio\r
+            FROM\r
+                (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library\r
+                    FROM\r
+                        action.hold_request ahr\r
+                        JOIN reporter.hold_request_record rhrr USING (id)\r
+                        LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)\r
+                        LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)\r
+                    WHERE\r
+                        ahr.cancel_time IS NULL\r
+                        AND ahr.fulfillment_time IS NULL\r
+                    GROUP BY bib_record, pickup_lib\r
+                )x\r
+                JOIN\r
+                (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere\r
+                    FROM\r
+                        action.hold_request ahr\r
+                        JOIN reporter.hold_request_record rhrr USING (id)\r
+                        LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)\r
+                    WHERE\r
+                        ahr.cancel_time IS NULL\r
+                        AND ahr.fulfillment_time IS NULL\r
+                    GROUP BY bib_record\r
+                )y\r
+                USING (id)\r
+               </oils_persist:source_definition>\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">\r
+                       <field reporter:label="Record ID" name="id" reporter:datatype="link"/>\r
+                       <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>\r
+                       <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>\r
+                       <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>\r
+                       <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>\r
+                       <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>\r
+                       <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">\r
+               <oils_persist:source_definition>\r
+            SELECT\r
+                ac.id,\r
+                COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,\r
+                MAX(actac.xact_start) AS last_circ\r
+            FROM asset.copy ac\r
+                 LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy\r
+            GROUP BY ac.id\r
+\r
+            -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:\r
+            --SELECT\r
+            --    ac.id,\r
+            --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,\r
+            --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ\r
+            --FROM asset.copy ac\r
+            --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy\r
+            --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id\r
+            --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts\r
+               </oils_persist:source_definition>\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">\r
+                       <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>\r
+                       <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="acp"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="ctcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::ts_config_list" oils_persist:tablename="config.ts_config_list" reporter:label="Text Search Configs">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>\r
+                       <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>\r
+               </fields>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="cmcts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class_ts_map" oils_persist:tablename="config.metabib_class_ts_map" reporter:label="Metabib Class TS Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">\r
+                       <field reporter:label="Map ID" reporter:datatype="id" name="id"/>\r
+                       <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>\r
+                       <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>\r
+                       <field reporter:label="Active?" reporter:datatype="bool" name="active"/>\r
+                       <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>\r
+                       <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>\r
+                       <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>\r
+                       <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>\r
+                       <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                               <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="cmfts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_ts_map" oils_persist:tablename="config.metabib_field_ts_map" reporter:label="Metabib Field TS Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">\r
+                       <field reporter:label="Map ID" reporter:datatype="id" name="id"/>\r
+                       <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>\r
+                       <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>\r
+                       <field reporter:label="Active?" reporter:datatype="bool" name="active"/>\r
+                       <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>\r
+                       <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>\r
+                       <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>\r
+                       <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                               <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+\r
+       <!-- ********************************************************************************************************************* -->\r
+       <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->\r
+       <!-- ********************************************************************************************************************* -->\r
+       <class id="rccc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_circ" oils_persist:tablename="reporter.classic_current_circ" reporter:core="true" reporter:label="Classic Circulation View">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Circulation" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>\r
+                       <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>\r
+                       <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>\r
+                       <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Item Language" name="language" reporter:datatype="text"/>\r
+                       <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>\r
+                       <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>\r
+                       <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>\r
+                       <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>\r
+                       <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>\r
+                       <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>\r
+                       <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>\r
+                       <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>\r
+                       <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>\r
+                       <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>\r
+                       <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>\r
+                       <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>\r
+                       <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>\r
+                       <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>\r
+                       <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>\r
+                       <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>\r
+                       <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>\r
+                       <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>\r
+                       <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>\r
+                       <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>\r
+                       <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="circ"/>\r
+                       <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>\r
+                       <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>\r
+                       <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="rsce1" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat1" oils_persist:tablename="reporter.legacy_cat1" reporter:label="CAT1 Entry">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />\r
+                       <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="rsce2" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat2" oils_persist:tablename="reporter.legacy_cat2" reporter:label="CAT2 Entry">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />\r
+                       <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>\r
+                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="rccbs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_billing_summary" oils_persist:tablename="reporter.classic_current_billing_summary" reporter:core="true" reporter:label="Classic Open Transaction Summary">\r
+               <fields oils_persist:primary="id">\r
+                       <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />\r
+\r
+                       <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>\r
+                       <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>\r
+                       <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>\r
+\r
+                       <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>\r
+                       <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>\r
+                       <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>\r
+\r
+                       <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>\r
+                       <field reporter:label="User Link" name="usr" reporter:datatype="link"/>\r
+\r
+                       <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>\r
+\r
+                       <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>\r
+                       <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>\r
+\r
+                       <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>\r
+\r
+                       <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>\r
+                       <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>\r
+\r
+                       <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>\r
+                       <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>\r
+                       <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>\r
+                       <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>\r
+\r
+                       <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>\r
+                       <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>\r
+\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="mbt"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+\r
+       <class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">\r
+               <oils_persist:source_definition>\r
+\r
+            SELECT\r
+                po.ordering_agency AS ordering_agency,\r
+                po.id AS purchase_order,\r
+                li.id AS lineitem,\r
+                lid.id AS lineitem_detail,\r
+                cpa.id AS claim_policy_action\r
+            FROM\r
+                acq.lineitem_detail lid\r
+                JOIN acq.lineitem li ON (li.id = lid.lineitem)\r
+                JOIN acq.purchase_order po ON (po.id = li.purchase_order)\r
+                JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)\r
+                JOIN acq.claim_policy_action cpa ON (\r
+                    cpa.claim_policy = cp.id\r
+\r
+                    -- we only care about claim policy actions whose claim\r
+                    -- interval we'd reached or exceeded\r
+                    AND (NOW() - cpa.action_interval) &gt; po.order_date\r
+\r
+                    -- filter out all claim policy actions where claim events\r
+                    -- have occurred on or after the action's action_interval\r
+                    AND NOT EXISTS (\r
+                        SELECT 1\r
+                        FROM\r
+                            acq.claim_event evt\r
+                            JOIN acq.claim claim ON (\r
+                                claim.id = evt.claim\r
+                                AND claim.lineitem_detail = lid.id\r
+                            )\r
+                        WHERE\r
+                            evt.event_date &gt;= (po.order_date + cpa.action_interval)\r
+                    )\r
+                )\r
+            WHERE\r
+                lid.cancel_reason IS NULL\r
+                AND li.cancel_reason IS NULL -- belt/suspenders\r
+                AND po.cancel_reason IS NULL -- belt/suspenders\r
+                AND lid.recv_time IS NULL\r
+                AND po.state = 'on-order'\r
+            ORDER BY 1, 2, 3, 4, 5\r
+\r
+               </oils_persist:source_definition>\r
+               <fields>\r
+                       <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>\r
+                       <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>\r
+                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>\r
+                       <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>\r
+                       <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+                       <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>\r
+                       <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>\r
+               </links>\r
+       </class>\r
+       <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary" oils_persist:tablename="acq.lineitem_summary">\r
+               <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">\r
+                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>\r
+                       <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+               </links>\r
+    </class>\r
+       <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">\r
+               <oils_persist:source_definition>\r
+            SELECT * FROM acq.lineitem_summary \r
+                               WHERE item_count > (invoice_count + cancel_count)\r
+        </oils_persist:source_definition>\r
+               <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">\r
+                       <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>\r
+                       <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>\r
+                       <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>\r
+                       <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>\r
+               </links>\r
+    </class>\r
+       <class id="iatc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::intersystem_transit_copy" oils_persist:readonly="true" reporter:core="true" reporter:label="Inter-system Copy Transit">\r
+               <oils_persist:source_definition>\r
+\r
+                       SELECT  t.*\r
+                         FROM  action.transit_copy t\r
+                               JOIN actor.org_unit AS s ON (t.source = s.id)\r
+                               JOIN actor.org_unit AS d ON (t.dest = d.id)\r
+                         WHERE s.parent_ou &lt;&gt; d.parent_ou\r
+\r
+               </oils_persist:source_definition>\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">\r
+                       <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>\r
+                       <field reporter:label="Destination" name="dest" reporter:datatype="link"/>\r
+                       <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>\r
+                       <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>\r
+                       <field reporter:label="Source" name="source" reporter:datatype="link"/>\r
+                       <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>\r
+                       <link field="source" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>\r
+                       <link field="dest" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>\r
+               </links>\r
+       </class>\r
+\r
+    <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">\r
+               <oils_persist:source_definition>\r
+\r
+       SELECT copy, SUM(count) AS count, year, is_renewal FROM (\r
+               SELECT\r
+                       cp.id as copy,\r
+                       COUNT(circ.id),\r
+                       EXTRACT(YEAR FROM circ.xact_start) AS year,\r
+                       (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal\r
+               FROM\r
+                       asset.copy cp\r
+                               JOIN action.circulation circ ON (cp.id = circ.target_copy)\r
+               GROUP BY 1, 3, 4\r
+               UNION ALL\r
+               SELECT\r
+                       cp.id as copy,\r
+                       COUNT(circ.id),\r
+                       EXTRACT(YEAR FROM circ.xact_start) AS year,\r
+                       (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal\r
+               FROM\r
+                       asset.copy cp\r
+                               JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)\r
+               GROUP BY 1, 3, 4\r
+               UNION ALL\r
+               SELECT\r
+                       id as copy,\r
+                       circ_count,\r
+                       -1 AS year,\r
+                       false as is_renewal\r
+               FROM\r
+                       extend_reporter.legacy_circ_count\r
+       )x GROUP BY 1, 3, 4\r
+\r
+               </oils_persist:source_definition>\r
+        <fields>\r
+            <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>\r
+            <field reporter:label="Count" name="count" reporter:datatype="int"/>\r
+            <field reporter:label="Year" name="year" reporter:datatype="int"/>\r
+            <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>\r
+        </fields>\r
+               <links>\r
+                       <link field="copy" reltype="has_a" key="id" map="" class="acp"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <retrieve/>\r
+                       </actions>\r
+               </permacrud>\r
+    </class>\r
+\r
+       <class id="rodcirc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::overdue_circs" oils_persist:tablename="reporter.overdue_circs" reporter:core="true" reporter:label="Overdue Circulation">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">\r
+                       <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>\r
+                       <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>\r
+                       <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>\r
+                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />\r
+                       <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>\r
+                       <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />\r
+                       <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>\r
+                       <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />\r
+                       <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>\r
+                       <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Patron" name="usr" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>\r
+                       <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>\r
+                       <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>\r
+                       <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>\r
+                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>\r
+                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>\r
+                       <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>\r
+                       <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>\r
+                       <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>\r
+                       <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>\r
+               </links>\r
+       </class>\r
+\r
+    <class id="rocit" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_item_list" oils_persist:tablename="reporter.classic_item_list" reporter:core="true" reporter:label="Classic Item List">\r
+        <fields oils_persist:primary="id">\r
+            <field reporter:label="Title" name="title" reporter:datatype="text"/>\r
+            <field reporter:label="Author" name="author" reporter:datatype="text"/>\r
+            <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>\r
+            <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>\r
+            <field reporter:label="Price" name="price" reporter:datatype="money"/>\r
+            <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>\r
+            <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>\r
+            <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>\r
+            <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>\r
+            <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>\r
+            <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>\r
+            <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>\r
+            <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>\r
+            <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>\r
+            <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>\r
+            <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>\r
+            <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>\r
+            <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>\r
+            <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>\r
+            <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>\r
+            <field reporter:label="Creator" name="creator" reporter:datatype="link"/>\r
+            <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>\r
+            <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>\r
+            <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>\r
+            <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>\r
+            <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>\r
+            <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>\r
+            <field reporter:label="Status" name="status" reporter:datatype="link"/>\r
+            <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>\r
+            <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>\r
+            <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>\r
+            <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>\r
+        </fields>\r
+        <links>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="id" reltype="has_a" key="id" map="" class="acp"/>\r
+            <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="creator" reltype="has_a" key="id" map="" class="au"/>\r
+            <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>\r
+            <link field="status" reltype="has_a" key="id" map="" class="ccs"/>\r
+            <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>\r
+           <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>\r
+        </links>\r
+    </class>\r
+\r
+    <class id="rmocbbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_owning_lib" oils_persist:tablename="money.open_circ_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Owning Library">\r
+        <fields oils_persist:primary="id">\r
+            <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>\r
+            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>\r
+            <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>\r
+        </fields>\r
+        <links>\r
+            <link field="id" reltype="has_a" key="id" map="" class="circ"/>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+    </class>\r
+\r
+    <class id="rmobbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_owning_lib" oils_persist:tablename="money.open_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Owning Library">\r
+        <fields oils_persist:primary="owning_lib">\r
+            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>\r
+            <field reporter:label="Balance" name="balance" reporter:datatype="money"/>\r
+        </fields>\r
+        <links>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+    </class>\r
+\r
+    <class id="rmocbbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Circulating Library and Owning Library">\r
+        <fields oils_persist:primary="id">\r
+            <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>\r
+            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>\r
+            <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>\r
+        </fields>\r
+        <links>\r
+            <link field="id" reltype="has_a" key="id" map="" class="circ"/>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+    </class>\r
+\r
+    <class id="rmobbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Circulating Library and Owning Library">\r
+        <fields oils_persist:primary="circ_lib">\r
+            <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>\r
+            <field reporter:label="Balance" name="balance" reporter:datatype="money"/>\r
+        </fields>\r
+        <links>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+    </class>\r
+\r
+    <class id="rmocbbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by User Home Library and Owning Library">\r
+        <fields oils_persist:primary="id">\r
+            <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>\r
+            <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>\r
+            <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>\r
+        </fields>\r
+        <links>\r
+            <link field="id" reltype="has_a" key="id" map="" class="circ"/>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+    </class>\r
+\r
+    <class id="rmobbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by User Home Library and Owning Library">\r
+        <fields oils_persist:primary="home_ou">\r
+            <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>\r
+            <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>\r
+            <field reporter:label="Balance" name="balance" reporter:datatype="money"/>\r
+        </fields>\r
+        <links>\r
+            <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+            <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>\r
+        </links>\r
+    </class>\r
+       <class id="acqft" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag" oils_persist:tablename="acq.fund_tag" reporter:label="Fund Tag">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">\r
+                       <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>\r
+                               <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>\r
+                               <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>\r
+                       <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="acqftm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag_map" oils_persist:tablename="acq.fund_tag_map" reporter:label="Fund Tag Map">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">\r
+                       <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>\r
+                       <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>\r
+                       <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>\r
+                       </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+               <actions>\r
+                               <create permission="ADMIN_ACQ_FUND_TAG">\r
+                                       <context link="tag" field="owner"/>\r
+                               </create>\r
+                               <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">\r
+                                       <context link="tag" field="owner"/>\r
+                               </retrieve>\r
+                               <update permission="ADMIN_ACQ_FUND_TAG">\r
+                                       <context link="tag" field="owner"/>\r
+                               </update>\r
+                               <delete permission="ADMIN_ACQ_FUND_TAG">\r
+                                       <context link="tag" field="owner"/>\r
+                               </delete>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="acqmapinv" controller="open-ils.cstore" oils_obj:fieldmapper="acq::map_to_invoice" reporter:label="Acq Map to Invoice View" oils_persist:readonly="true">\r
+               <oils_persist:source_definition><![CDATA[\r
+               SELECT\r
+                       poi.purchase_order AS purchase_order,\r
+                       ii.invoice AS invoice,\r
+                       NULL AS lineitem,\r
+                       poi.id AS po_item,\r
+                       NULL AS picklist\r
+               FROM\r
+                       acq.po_item poi\r
+                       JOIN acq.invoice_item ii ON (ii.po_item = poi.id)\r
+               UNION SELECT\r
+                       jub.purchase_order AS purchase_order,\r
+                       ie.invoice AS invoice,\r
+                       jub.id AS lineitem,\r
+                       NULL AS po_item,\r
+                       jub.picklist AS picklist\r
+               FROM\r
+                       acq.lineitem jub\r
+                       JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)\r
+               UNION SELECT\r
+                       ii.purchase_order AS purchase_order,\r
+                       ii.invoice AS invoice,\r
+                       NULL AS lineitem,\r
+                       NULL AS po_item,\r
+                       NULL AS picklist\r
+               FROM\r
+                       acq.invoice_item ii\r
+               WHERE ii.po_item IS NULL\r
+               UNION SELECT\r
+                       ie.purchase_order AS purchase_order,\r
+                       ie.invoice AS invoice,\r
+                       NULL AS lineitem,\r
+                       NULL AS po_item,\r
+                       NULL AS picklist\r
+               FROM\r
+                       acq.invoice_entry ie\r
+               WHERE ie.lineitem IS NULL\r
+               UNION SELECT\r
+                       NULL AS purchase_order,\r
+                       NULL AS invoice,\r
+                       jub.id AS lineitem,\r
+                       NULL AS po_item,\r
+                       jub.picklist AS picklist\r
+               FROM\r
+                       acq.lineitem jub\r
+               WHERE jub.purchase_order IS NULL\r
+               ]]></oils_persist:source_definition>\r
+               <fields>\r
+                       <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>\r
+                       <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>\r
+                       <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>\r
+                       <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>\r
+                       <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />\r
+                       <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />\r
+                       <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />\r
+                       <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />\r
+                       <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />\r
+               </links>\r
+       </class>\r
+       <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Active" name="active" reporter:datatype="bool"/>\r
+                       <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>\r
+                       <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>\r
+                       <field reporter:label="Length" name="length" reporter:datatype="int"/>\r
+                       <field reporter:label="Padding" name="padding" reporter:datatype="text"/>\r
+                       <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>\r
+                       <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>\r
+                       <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>\r
+                               <retrieve/>\r
+                               <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>\r
+                               <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+       <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field name="date_applied" reporter:datatype="timestamp"/>\r
+                       <field name="org" reporter:datatype="org_unit"/>\r
+                       <field name="original_value" reporter:datatype="text"/>\r
+                       <field name="new_value" reporter:datatype="text"/>\r
+                       <field name="field_name" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>\r
+                       <link field="org" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>\r
+                               <retrieve permission="STAFF_LOGIN" context_field="org"/>\r
+                               <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>\r
+                               <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Circ" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>\r
+                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>\r
+                       <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>\r
+               </links>\r
+       </class>\r
+       <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Circ" name="xact" reporter:datatype="link"/>\r
+                       <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>\r
+                       <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>\r
+                       <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>\r
+               </links>\r
+       </class>\r
+       <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Name" name="name" reporter:datatype="text"/>\r
+                       <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>\r
+                       <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>\r
+                               <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+       <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">\r
+                       <field reporter:label="ID" name="id" reporter:datatype="id"/>\r
+                       <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>\r
+                       <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>\r
+                       <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>\r
+                       <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>\r
+                       <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="floating_group" reltype="has_a" key="id" class="cfg"/>\r
+                       <link field="org_unit" reltype="has_a" key="id" class="aou"/>\r
+               </links>\r
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">\r
+                       <actions>\r
+                               <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>\r
+                               <retrieve/>\r
+                               <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>\r
+                               <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>\r
+                       </actions>\r
+               </permacrud>\r
+       </class>\r
+\r
+\r
+<!--   START OF CUSTOM SOURCES -->\r
+\r
+       \r
+               <class id="ariscirc" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::aris_circulation" oils_persist:tablename="extend_reporter.aris_circulation" reporter:core="true" reporter:label="ARIS Circulations" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">\r
+                       <field reporter:label="Circ ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>\r
+                       <field reporter:label="Patron Home Library" name="patron_library" reporter:datatype="link"/>\r
+                       <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />\r
+                       <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>\r
+                       <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>\r
+                       <field reporter:label="ARIS Audience" name="aris_audience" reporter:datatype="text"/>\r
+                       <field reporter:label="ARIS Format" name="aris_format" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>\r
+               </links>\r
+       </class>\r
+       <class id="ariscounts" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::aris_copy_counts" oils_persist:tablename="extend_reporter.aris_copy_counts" reporter:core="true" reporter:label="ARIS Item Counts" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">\r
+                       <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>\r
+                       <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>\r
+                       <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp" />\r
+                       <field reporter:label="ARIS Audience" name="aris_audience" reporter:datatype="text"/>\r
+                       <field reporter:label="ARIS Format" name="aris_format" reporter:datatype="text"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="acp"/>          \r
+                       <link field="copy_owning_lib" reltype="has_a" key="copy_owning_lib" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <class id="bibnumbers" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::bib_numbers" oils_persist:tablename="extend_reporter.bib_numbers" reporter:core="false" reporter:label="Bibliographic Record Numbers" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">\r
+                       <field reporter:label="Bilographic Record ID" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="III BNumber" name="bnumber" reporter:datatype="text" />\r
+                       <field reporter:label="OCLC Number" name="oclc_number" reporter:datatype="text" />\r
+                       <field reporter:label="ISBN" name="isbn" reporter:datatype="text" />\r
+                       <field reporter:label="ISSN" name="issn" reporter:datatype="text" />\r
+                       <field reporter:label="LCCN" name="lccn" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>\r
+               </links>\r
+       </class>\r
+       <class id="dusty_books" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::dusty_books" oils_persist:tablename="extend_reporter.dusty_books" reporter:core="false" reporter:label="Dusty Books" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">\r
+                       <field reporter:label="bib id" name="bib_id" reporter:datatype="id" />\r
+                       <field reporter:label="copy id" name="copy_id" reporter:datatype="id" />\r
+                       <field reporter:label="owning library" name="circ_lib" reporter:datatype="org_unit" />\r
+                       <field reporter:label="circs" name="circs" reporter:datatype="int" />\r
+                       <field reporter:label="last checkout" name="last_checkout" reporter:datatype="timestamp" />\r
+                       <field reporter:label="price per circ" name="price_per_circ" reporter:datatype="money" />\r
+                       <field reporter:label="isbn" name="isbn" reporter:datatype="text" />\r
+                       <field reporter:label="issn" name="issn" reporter:datatype="text" />\r
+               </fields>\r
+               <links>\r
+                       <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>\r
+                       <link field="bib_id" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>        \r
+       <class id="serials_holdings" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::serials_holdings" oils_persist:tablename="extend_reporter.serials_holdings" reporter:core="false" reporter:label="Serials Holdings Statement" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="record_entry_id_seq">\r
+                       <field reporter:label="mfhd record id" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="marc record id" name="record" reporter:datatype="id" />\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />\r
+                       <field reporter:label="ereated" name="create_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="edited" name="edit_date" reporter:datatype="timestamp"/>\r
+                       <field reporter:label="issn" name="issn" reporter:datatype="text"/>\r
+                       <field reporter:label="title" name="title" reporter:datatype="text"/>\r
+                       <field reporter:label="holdings" name="holdings" reporter:datatype="text"/>                     \r
+               </fields>\r
+               <links>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="sitem"/>\r
+                       <link field="record" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <class id="serial_items" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::serial_item_list" oils_persist:tablename="extend_reporter.serial_item_list" reporter:core="false" reporter:label="Serial Item List" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="item_id_seq">\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />\r
+                       <field reporter:label="marc record id" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="tcn" name="tcn_value" reporter:datatype="text"/>\r
+                       <field reporter:label="issn" name="issn" reporter:datatype="text" />\r
+                       <field reporter:label="title" name="title" reporter:datatype="text" />\r
+                       <field reporter:label="issue" name="issue_name" reporter:datatype="text" />\r
+                       <field reporter:label="item id" name="item_id" reporter:datatype="id" />                        \r
+                       <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>                      \r
+                       <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>                      \r
+               </fields>\r
+               <links>\r
+                       <link field="item_id" reltype="has_a" key="id" map="" class="sitem"/>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <class id="last_issue" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::last_issue_received" oils_persist:tablename="extend_reporter.last_issue_received" reporter:core="false" reporter:label="Last Issue Received" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="item_id_seq">\r
+                       <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />\r
+                       <field reporter:label="marc record id" name="id" reporter:datatype="id" />\r
+                       <field reporter:label="tcn" name="tcn_value" reporter:datatype="text"/>\r
+                       <field reporter:label="issn" name="issn" reporter:datatype="text" />\r
+                       <field reporter:label="title" name="title" reporter:datatype="text" />\r
+                       <field reporter:label="issue" name="issue_name" reporter:datatype="text" />\r
+                       <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>                      \r
+               </fields>\r
+               <links>\r
+                       <link field="item_id" reltype="has_a" key="id" map="" class="sitem"/>\r
+                       <link field="id" reltype="has_a" key="id" map="" class="bre"/>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+       <class id="circ_activity" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::circ_activity" oils_persist:tablename="extend_reporter.circ_activity" reporter:core="false" reporter:label="Circulation Activity" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="item_id_seq">\r
+                       <field reporter:label="circulating library" name="circ_lib" reporter:datatype="org_unit" />\r
+                       <field reporter:label="owning library" name="copy_owning_lib" reporter:datatype="org_unit" />\r
+                       <field reporter:label="year" name="year" reporter:datatype="int"/>\r
+                       <field reporter:label="month" name="month" reporter:datatype="int" />\r
+                       <field reporter:label="type" name="type" reporter:datatype="text" />\r
+                       <field reporter:label="copy location" name="copy_location" reporter:datatype="link" />\r
+                       <field reporter:label="count" name="count" reporter:datatype="int"/>                    \r
+               </fields>\r
+               <links>\r
+                       <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+                       <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>\r
+               </links>\r
+       </class>\r
+       <class id="payments_combined_detail" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::payments_combined_detail" oils_persist:tablename="extend_reporter.payments_combined_detail" reporter:core="false" reporter:label="Payments Combined Detail" oils_persist:readonly="true">\r
+               <fields oils_persist:primary="xact" oils_persist:sequence="billable_xact_id_seq">\r
+                       <field reporter:label="xact" name="xact_id" reporter:datatype="link" />\r
+                       <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>\r
+                       <field name="cash_drawer" reporter:datatype="text"/>\r
+                       <field name="note" reporter:datatype="text"/>\r
+                       <field name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field name="usr" reporter:datatype="id"/>\r
+                       <field name="patron" reporter:datatype="text"/>\r
+                       <field name="patron_barcode" reporter:datatype="text"/>\r
+                       <field name="amount_collected" reporter:datatype="money"/>\r
+                       <field name="owning_library" reporter:datatype="text"/> \r
+                       <field name="billing_type" reporter:datatype="text"/>\r
+                       <field name="pay_type" reporter:datatype="text"/>                       \r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>\r
+               </links>\r
+       </class>\r
+       \r
+       <class id="springfield_collection_agency" \r
+       controller="open-ils.cstore" \r
+       oils_obj:fieldmapper="extend_reporter::springfield_collection_agency" \r
+       oils_persist:tablename="extend_reporter.springfield_collection_agency" \r
+       reporter:core="false" \r
+       reporter:label="Springfield Collectioni Agency" \r
+       oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">\r
+                       <field name="usr" reporter:datatype="id"/>\r
+                       <field name="copy" reporter:datatype="id"/>\r
+                       <field name="balance_owed" reporter:datatype="money"/>\r
+               </fields>\r
+               <links>\r
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+                       <link field="copy" reltype="has_a" key="id" map="" class="acp"/>\r
+               </links>\r
+       </class>\r
+\r
+\r
+<class id="cash_report_mimic" \r
+controller="open-ils.cstore" \r
+oils_obj:fieldmapper="extend_reporter::materialized_money" \r
+oils_persist:tablename="extend_reporter.materialized_money" \r
+reporter:core="false" \r
+reporter:label="Cash Report Mimic" \r
+oils_persist:readonly="true">\r
+               <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">\r
+                       <field name="owning_lib" reporter:datatype="id"/>\r
+                       <field name="payment_ts" reporter:datatype="timestamp"/>\r
+                       <field name="name" reporter:datatype="text"/>                   \r
+                       <field name="billing_type" reporter:datatype="text"/>   \r
+                       <field name="pay_method" reporter:datatype="text"/>                                     \r
+                       <field name="amount_collected" reporter:datatype="money"/>              \r
+               </fields>\r
+               <links>\r
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>\r
+               </links>\r
+       </class>\r
+\r
+\r
+\r
+<class id="mat_payments_to_xact_summary" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::materialized_money_to_paying_user" oils_persist:tablename="extend_reporter.materialized_money_to_paying_user" reporter:core="false" reporter:label="Materialized Money to Paying User" oils_persist:readonly="true">\r
+       <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">\r
+               <field name="usr" reporter:datatype="id"/>\r
+               <field name="xact" reporter:datatype="id"/>\r
+               <field name="billing_ts" reporter:datatype="timestamp"/>\r
+               <field name="billing_type" reporter:datatype="text"/>\r
+               <field name="total_owed" reporter:datatype="money"/>\r
+               <field name="pay_method" reporter:datatype="text"/>\r
+               <field name="payment_ts" reporter:datatype="timestamp"/>                                 \r
+               <field name="accepting_usr" reporter:datatype="id"/>                \r
+               <field name="cash_drawer" reporter:datatype="id"/>                                  \r
+               <field name="amount_collected" reporter:datatype="money"/>                            \r
+       </fields>\r
+       <links>  \r
+               <link field="usr" reltype="has_a" key="id" map="" class="au"/>\r
+               <link field="xact" reltype="has_many" key="xact" map="" class="mb"/>\r
+               <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+               <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>\r
+       </links>\r
+</class>\r
+\r
+<class id="mat_payments_to_xact_summary_2" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::materialized_money_to_paying_user_2" oils_persist:tablename="extend_reporter.materialized_money_to_paying_user_2" reporter:core="false" reporter:label="Materialized Money to Paying User 2" oils_persist:readonly="true">\r
+       <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">\r
+               <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>\r
+               <field name="billing_type" reporter:datatype="text"/>\r
+               <field name="pay_method" reporter:datatype="text"/>\r
+               <field name="cash_drawer" reporter:datatype="link"/>      \r
+               <field name="payment_ts" reporter:datatype="timestamp"/>\r
+               <field name="total_owed" reporter:datatype="money"/>\r
+               <field name="billing_ts" reporter:datatype="timestamp"/>\r
+               <field name="amount_collected" reporter:datatype="money"/>                              \r
+       </fields>\r
+       <links>  \r
+               <link field="id" reltype="might_have" key="id" map="" class="circ"/>\r
+               <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>\r
+       </links>\r
+</class>\r
+\r
+\r
+\r
+<class id="mat_payments_to_xact_summary_3" controller="open-ils.cstore" oils_obj:fieldmapper="extend_reporter::materialized_money_to_paying_user_2" oils_persist:tablename="extend_reporter.materialized_money_to_paying_user_2" reporter:core="false" reporter:label="Materialized Money to Paying User 3" oils_persist:readonly="true">\r
+       <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">\r
+               <field reporter:label="Circulation ID" name="circ_id" reporter:datatype="link"/>\r
+               <field name="billing_type" reporter:datatype="text"/>\r
+               <field name="pay_method" reporter:datatype="text"/>\r
+               <field name="cash_drawer" reporter:datatype="link"/>  \r
+               <field name="accepting_usr" reporter:datatype="link"/>       \r
+               <field name="payment_ts" reporter:datatype="timestamp"/>\r
+               <field name="total_owed" reporter:datatype="money"/>\r
+               <field name="billing_ts" reporter:datatype="timestamp"/>\r
+               <field name="amount_collected" reporter:datatype="money"/>                            \r
+       </fields>\r
+       <links>  \r
+               <link field="circ_id" reltype="might_have" key="id" map="" class="circ"/>\r
+               <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>\r
+               <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+       </links>\r
+</class>\r
+       \r
+       \r
+<class id="cwmaterializedmoney" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="extend_reporter::materialized_money" oils_persist:tablename="extend_reporter.materialized_money" reporter:core="true" reporter:label="CWMARS Materialized Money">\r
+       <fields oils_persist:primary="pay_xact" oils_persist:sequence="money.billable_xact_id_seq">\r
+               <field reporter:label="Payment Xact" name="pay_xact" reporter:datatype="id"/>\r
+               <field reporter:label="Bill Xact" name="bill_xact" reporter:datatype="id"/>\r
+               <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>\r
+               <field reporter:label="Billing Total Owed" name="total_owed" reporter:datatype="money"/>\r
+               <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>\r
+               <field reporter:label="Payment Method" name="pay_method" reporter:datatype="text"/>\r
+               <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>\r
+               <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money"/>\r
+               <field reporter:label="Workstation" name="cash_drawer" reporter:datatype="link"/>\r
+               <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>\r
+               <field reporter:label="Active Circulation" name="act_circ" reporter:datatype="link"/>\r
+               <field reporter:label="All Circulation" name="all_circ" reporter:datatype="link"/>\r
+       </fields>\r
+       <links>\r
+               <link field="act_circ" reltype="might_have" key="id" map="" class="circ"/>\r
+               <link field="all_circ" reltype="might_have" key="id" map="" class="combcirc"/>\r
+               <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>\r
+               <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>\r
+       </links> \r
+</class>\r
+       \r
+\r
+\r
+</IDL>\r
+\r
+<!--\r
+    vim:noet:ts=4:sw=4:\r
+-->\r