first commit to Android project
authordrizea <danielrizea27@gmail.com>
Mon, 4 Jun 2012 13:53:56 +0000 (16:53 +0300)
committerdrizea <danielrizea27@gmail.com>
Mon, 4 Jun 2012 13:53:56 +0000 (16:53 +0300)
91 files changed:
Open-ILS/src/Android/AndroidManifest.xml [new file with mode: 0644]
Open-ILS/src/Android/assets/fm_IDL.xml [new file with mode: 0644]
Open-ILS/src/Android/bin/EvergreenApp.apk [new file with mode: 0644]
Open-ILS/src/Android/bin/classes.dex [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$attr.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$color.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$drawable.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$id.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$layout.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$string.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$style.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/accountAccess/AuthenticateUser.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/GlobalConfigs.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/Utils.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/Organisation.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Content.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Details.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Info.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Simple.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordInfo.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalog.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$1.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1$1.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$3.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$SearchArrayAdapter.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/Event.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/Sys.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLException.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLField.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLLink.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLObject.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLParser.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/test/TestIDL.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/test/TestLogin.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/open_ils/util/Utils.class [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/action_search.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/address_book.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-ldpi/address_book.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-ldpi/ic_launcher.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-mdpi/address_book.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
Open-ILS/src/Android/bin/resources.ap_ [new file with mode: 0644]
Open-ILS/src/Android/gen/org/evergreen/android/R.java [new file with mode: 0644]
Open-ILS/src/Android/lib/org.openils_ild.jar [new file with mode: 0644]
Open-ILS/src/Android/lib/org.opensrf.jar [new file with mode: 0644]
Open-ILS/src/Android/lib/simple-xml-2.6.4.jar [new file with mode: 0644]
Open-ILS/src/Android/proguard.cfg [new file with mode: 0644]
Open-ILS/src/Android/project.properties [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-hdpi/action_search.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-hdpi/address_book.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-ldpi/address_book.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-ldpi/ic_launcher.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-mdpi/address_book.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
Open-ILS/src/Android/res/layout/main.xml [new file with mode: 0644]
Open-ILS/src/Android/res/layout/record_details_info.xml [new file with mode: 0644]
Open-ILS/src/Android/res/layout/record_details_simple.xml [new file with mode: 0644]
Open-ILS/src/Android/res/layout/search_result_item.xml [new file with mode: 0644]
Open-ILS/src/Android/res/layout/search_result_list.xml [new file with mode: 0644]
Open-ILS/src/Android/res/values/colors.xml [new file with mode: 0644]
Open-ILS/src/Android/res/values/strings.xml [new file with mode: 0644]
Open-ILS/src/Android/res/values/styles.xml [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AuthenticateUser.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/globals/GlobalConfigs.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/globals/Utils.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/Organisation.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Content.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Details.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Info.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Simple.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordInfo.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalog.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/Event.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/Sys.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/idl/IDLException.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/idl/IDLField.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/idl/IDLLink.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/idl/IDLObject.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/idl/IDLParser.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/test/TestIDL.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/test/TestLogin.java [new file with mode: 0644]
Open-ILS/src/Android/src/org/open_ils/util/Utils.java [new file with mode: 0644]

diff --git a/Open-ILS/src/Android/AndroidManifest.xml b/Open-ILS/src/Android/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..8db0af6
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="org.evergreen.android"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk android:minSdkVersion="8" />
+       <uses-permission android:name="android.permission.INTERNET" /> 
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name" 
+        android:theme="@style/EvergreenTheme"
+        >
+        <activity
+            android:name=".searchCatalog.SearchCatalogListView"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        
+        <activity android:name=".searchCatalog.RecordDetails_Info"></activity>
+               <activity android:name=".searchCatalog.RecordDetails_Content"></activity>
+        <activity android:name=".searchCatalog.RecordDetails_Details"></activity>
+        <activity android:name=".searchCatalog.RecordDetails"></activity>
+        <activity android:name=".searchCatalog.RecordDetails_Simple"></activity>
+    </application>
+    
+</manifest>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/assets/fm_IDL.xml b/Open-ILS/src/Android/assets/fm_IDL.xml
new file mode 100644 (file)
index 0000000..88b1b71
--- /dev/null
@@ -0,0 +1,9996 @@
+<?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
+
+-->
+
+<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" />
+               </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"/>
+                       <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="Owner" name="owner" reporter:datatype="link"/>
+                       <field reporter:label="Field" name="field" 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_TRASH_FIELD" context_field="owner"/>
+                               <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
+                               <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"/>
+               </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"/>
+               </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"/>
+               </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>
+                               <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"/>
+               </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_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"/>
+               </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="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="Filter?" name="filter" reporter:datatype="bool"/>
+                       <field reporter:label="Sorter?" name="sorter" 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="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="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">
+               <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"/>
+                       <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"/>
+               </fields>
+               <links>
+                       <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
+               </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" 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"/>
+            <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>
+    </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="Definition 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="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="Event 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="aws" controller="open-ils.cstore" 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>
+       </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"/>
+               </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="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="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="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="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" 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>
+       </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="aun" controller="open-ils.cstore" 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>
+       </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="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="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"/>
+               </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="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="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="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" 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>
+       </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="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" />
+                       <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="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"/>
+            </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"/>
+               </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" 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>
+       </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"  reporter:datatype="text"/>
+                       <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
+                       <field reporter:label="Prefix" 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/Title" 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="circ"/>
+                       <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"/>
+                       <field name="description" reporter:label="Description" reporter:datatype="text"/>
+                       <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
+                       <field name="fm_class" reporter:label="Fielmapper 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"/>
+               </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"/>
+                       <field name="description" reporter:datatype="text"/>
+                       <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"/>
+               </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="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" 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>
+       </class>
+       <class id="mfp" controller="open-ils.cstore" 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>
+       </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 (xact_finish IS NULL AND 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,
+        ARRAY_TO_STRING(ARRAY_ACCUM(
+            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
+                ELSE 0
+            END
+        ),',') AS out,
+
+        ARRAY_TO_STRING(ARRAY_ACCUM(
+            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
+                ELSE 0
+            END
+        ),',') AS overdue,
+
+        ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
+        ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
+        ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id 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" 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="Check Out 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>
+       </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="Check Out 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="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="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="Check Out 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"/>
+               </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" 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>
+       </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">
+               <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" />
+               </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="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="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="Is Floating" name="floating" reporter:datatype="bool"/>
+                       <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"/>
+               </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="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="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" reporter:selector="label"/>
+                       <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="asfge"/>
+                       <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" 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="Thaw Date (if frozen)" 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"/>
+               </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>
+       </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, 999) AS
+                               copy_location_order_position,
+                       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_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
+               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)
+               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
+                       (ahr.expire_time is NULL OR ahr.expire_time > NOW())
+               ]]></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="Thaw Date (if frozen)" 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 Display Name" name="usr_display_name" 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" />
+               </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="Thaw Date (if frozen)" 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"/>
+               </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="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 permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
+                    <context field="id"/>
+                    <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" 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>
+       </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" 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>
+       </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="cnct" controller="open-ils.cstore" 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>
+       </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" 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>
+       </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" 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>
+       </class>
+       <class id="mgp" controller="open-ils.cstore" 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>
+       </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" 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>
+       </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="Is Floating" name="floating" reporter:datatype="bool"/>
+                       <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="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="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"/>
+               </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?" name="floating" reporter:datatype="bool"/>
+                       <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"/>
+               </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" 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>
+       </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" 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"/>
+               </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="xact" reltype="has_a" key="id" map="" class="mbt"/>
+               </links>
+       </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="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"/>
+               </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="xact" reltype="has_a" key="id" map="" class="mbt"/>
+               </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"/>
+               </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="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" />
+                       <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" 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>
+       </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" 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"/>
+               </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"/>
+               </links>
+       </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" />
+               </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" 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>
+               <!--
+                       For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
+                       But here's what it should look like if we ever do use pcrud.
+               -->
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+                       <actions>
+                               <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
+                               <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" 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" 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>
+               <!--
+                       For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
+                       But here's what it should look like if we ever do use pcrud.
+               -->
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+                       <actions>
+                               <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
+                               <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" 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">
+            <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="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"/>
+                       <field reporter:label="Description" name="description" reporter:datatype="text"/>
+                       <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="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" />
+               </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="Shelving 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"/>
+                       <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="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"/>
+               </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"/>
+               </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.usr_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="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"/>
+        </fields>
+    </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="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.billing_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="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="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)
+                            ) 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>
+
+       <!-- ********************************************************************************************************************* -->
+       <!-- 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:source_definition>
+
+            SELECT 
+                li.id AS lineitem, 
+                (
+                    SELECT COUNT(lid.id) 
+                    FROM acq.lineitem_detail lid
+                    WHERE lineitem = li.id
+                ) AS item_count,
+                (
+                    SELECT COUNT(lid.id) 
+                    FROM acq.lineitem_detail lid
+                    WHERE recv_time IS NOT NULL AND lineitem = li.id
+                ) AS recv_count,
+                (
+                    SELECT COUNT(lid.id) 
+                    FROM acq.lineitem_detail lid
+                    WHERE cancel_reason IS NOT NULL AND lineitem = li.id
+                ) AS cancel_count,
+                (
+                    SELECT COUNT(lid.id) 
+                    FROM acq.lineitem_detail lid
+                        JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
+                    WHERE NOT debit.encumbrance AND lineitem = li.id
+                ) AS invoice_count,
+                (
+                    SELECT COUNT(DISTINCT(lid.id)) 
+                    FROM acq.lineitem_detail lid
+                        JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
+                    WHERE lineitem = li.id
+                ) AS claim_count,
+                (
+                    SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
+                    FROM acq.lineitem_detail lid
+                    WHERE lid.cancel_reason IS NULL AND lineitem = li.id
+                ) AS estimated_amount,
+                (
+                    SELECT SUM(debit.amount)::NUMERIC(8,2)
+                    FROM acq.lineitem_detail lid
+                        JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
+                    WHERE debit.encumbrance AND lineitem = li.id
+                ) AS encumbrance_amount,
+                (
+                    SELECT SUM(debit.amount)::NUMERIC(8,2)
+                    FROM acq.lineitem_detail lid
+                        JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
+                    WHERE NOT debit.encumbrance AND lineitem = li.id
+                ) AS paid_amount
+
+                FROM acq.lineitem AS li
+        </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="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
+               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
+               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="Check Out 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="int"/>
+            <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="text"/>
+            <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
+            <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="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"/>
+        </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="date_applied" 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/>
+                               <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>
+
+
+       <!-- ********************************************************************************************************************* -->
+
+</IDL>
+
+<!--
+    vim:noet:ts=4:sw=4:
+-->
diff --git a/Open-ILS/src/Android/bin/EvergreenApp.apk b/Open-ILS/src/Android/bin/EvergreenApp.apk
new file mode 100644 (file)
index 0000000..de9db1e
Binary files /dev/null and b/Open-ILS/src/Android/bin/EvergreenApp.apk differ
diff --git a/Open-ILS/src/Android/bin/classes.dex b/Open-ILS/src/Android/bin/classes.dex
new file mode 100644 (file)
index 0000000..19e5a56
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes.dex differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$attr.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$attr.class
new file mode 100644 (file)
index 0000000..3f6ee62
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$attr.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$color.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$color.class
new file mode 100644 (file)
index 0000000..c47c966
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$color.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$drawable.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$drawable.class
new file mode 100644 (file)
index 0000000..b5e5945
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$drawable.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$id.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$id.class
new file mode 100644 (file)
index 0000000..cb2195a
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$id.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$layout.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$layout.class
new file mode 100644 (file)
index 0000000..b4f75c1
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$layout.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$string.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$string.class
new file mode 100644 (file)
index 0000000..d16063e
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$string.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$style.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$style.class
new file mode 100644 (file)
index 0000000..68b4bab
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$style.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R.class
new file mode 100644 (file)
index 0000000..f9bc5ee
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/accountAccess/AuthenticateUser.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/accountAccess/AuthenticateUser.class
new file mode 100644 (file)
index 0000000..2e31138
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/accountAccess/AuthenticateUser.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/GlobalConfigs.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/GlobalConfigs.class
new file mode 100644 (file)
index 0000000..f3b353e
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/GlobalConfigs.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/Utils.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/Utils.class
new file mode 100644 (file)
index 0000000..bbb2dda
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/Utils.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/Organisation.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/Organisation.class
new file mode 100644 (file)
index 0000000..da093c9
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/Organisation.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails.class
new file mode 100644 (file)
index 0000000..5ec0143
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Content.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Content.class
new file mode 100644 (file)
index 0000000..13ab63d
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Content.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Details.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Details.class
new file mode 100644 (file)
index 0000000..bc4fe47
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Details.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Info.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Info.class
new file mode 100644 (file)
index 0000000..857337c
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Info.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Simple.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Simple.class
new file mode 100644 (file)
index 0000000..86dfba3
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Simple.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordInfo.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordInfo.class
new file mode 100644 (file)
index 0000000..60885a8
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordInfo.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalog.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalog.class
new file mode 100644 (file)
index 0000000..2f16260
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalog.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$1.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$1.class
new file mode 100644 (file)
index 0000000..414583a
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$1.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1$1.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1$1.class
new file mode 100644 (file)
index 0000000..f41a89b
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1$1.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1.class
new file mode 100644 (file)
index 0000000..8da4640
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2.class
new file mode 100644 (file)
index 0000000..c56de43
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$3.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$3.class
new file mode 100644 (file)
index 0000000..16f487c
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$3.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$SearchArrayAdapter.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$SearchArrayAdapter.class
new file mode 100644 (file)
index 0000000..f5ef03a
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$SearchArrayAdapter.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView.class
new file mode 100644 (file)
index 0000000..b16719c
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/Event.class b/Open-ILS/src/Android/bin/classes/org/open_ils/Event.class
new file mode 100644 (file)
index 0000000..28c641b
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/Event.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/Sys.class b/Open-ILS/src/Android/bin/classes/org/open_ils/Sys.class
new file mode 100644 (file)
index 0000000..7deb18a
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/Sys.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLException.class b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLException.class
new file mode 100644 (file)
index 0000000..403248f
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLException.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLField.class b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLField.class
new file mode 100644 (file)
index 0000000..3632ad8
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLField.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLLink.class b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLLink.class
new file mode 100644 (file)
index 0000000..9044093
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLLink.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLObject.class b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLObject.class
new file mode 100644 (file)
index 0000000..ac873b8
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLObject.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLParser.class b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLParser.class
new file mode 100644 (file)
index 0000000..5ac4857
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/idl/IDLParser.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/test/TestIDL.class b/Open-ILS/src/Android/bin/classes/org/open_ils/test/TestIDL.class
new file mode 100644 (file)
index 0000000..caf2457
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/test/TestIDL.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/test/TestLogin.class b/Open-ILS/src/Android/bin/classes/org/open_ils/test/TestLogin.class
new file mode 100644 (file)
index 0000000..de1c975
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/test/TestLogin.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/open_ils/util/Utils.class b/Open-ILS/src/Android/bin/classes/org/open_ils/util/Utils.class
new file mode 100644 (file)
index 0000000..101840f
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/open_ils/util/Utils.class differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/action_search.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/action_search.png
new file mode 100644 (file)
index 0000000..f4d4eb3
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/action_search.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/address_book.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/address_book.png
new file mode 100644 (file)
index 0000000..a0a17e1
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/address_book.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/ic_launcher.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..882eb14
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/ic_launcher.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-ldpi/address_book.png b/Open-ILS/src/Android/bin/res/drawable-ldpi/address_book.png
new file mode 100644 (file)
index 0000000..357355d
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-ldpi/address_book.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-ldpi/ic_launcher.png b/Open-ILS/src/Android/bin/res/drawable-ldpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..18689f6
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-ldpi/ic_launcher.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-mdpi/address_book.png b/Open-ILS/src/Android/bin/res/drawable-mdpi/address_book.png
new file mode 100644 (file)
index 0000000..2f70335
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-mdpi/address_book.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-mdpi/ic_launcher.png b/Open-ILS/src/Android/bin/res/drawable-mdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..02e96b9
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-mdpi/ic_launcher.png differ
diff --git a/Open-ILS/src/Android/bin/resources.ap_ b/Open-ILS/src/Android/bin/resources.ap_
new file mode 100644 (file)
index 0000000..40468e4
Binary files /dev/null and b/Open-ILS/src/Android/bin/resources.ap_ differ
diff --git a/Open-ILS/src/Android/gen/org/evergreen/android/R.java b/Open-ILS/src/Android/gen/org/evergreen/android/R.java
new file mode 100644 (file)
index 0000000..1f5c3f2
--- /dev/null
@@ -0,0 +1,73 @@
+/* AUTO-GENERATED FILE.  DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found.  It
+ * should not be modified by hand.
+ */
+
+package org.evergreen.android;
+
+public final class R {
+    public static final class attr {
+    }
+    public static final class color {
+        public static final int background1=0x7f040005;
+        public static final int background2=0x7f040006;
+        public static final int background3=0x7f040007;
+        public static final int bg_gray=0x7f04000b;
+        public static final int emphasis=0x7f04000a;
+        public static final int foreground1=0x7f040003;
+        public static final int foreground2=0x7f040004;
+        /**   Defined colors for Evergreen Theme 
+         */
+        public static final int green=0x7f040009;
+        public static final int title_background=0x7f040000;
+        public static final int title_separator=0x7f040008;
+        public static final int title_text=0x7f040001;
+        public static final int title_text_alt=0x7f040002;
+        public static final int white=0x7f04000c;
+    }
+    public static final class drawable {
+        public static final int action_search=0x7f020000;
+        public static final int address_book=0x7f020001;
+        public static final int ic_launcher=0x7f020002;
+    }
+    public static final class id {
+        public static final int chose_organisation=0x7f070011;
+        public static final int record_details_info_author=0x7f070001;
+        public static final int record_details_info_publisher=0x7f070002;
+        public static final int record_details_info_title=0x7f070000;
+        public static final int record_details_simple_author=0x7f070004;
+        public static final int record_details_simple_isbn=0x7f070009;
+        public static final int record_details_simple_publisher=0x7f070005;
+        public static final int record_details_simple_series=0x7f070007;
+        public static final int record_details_simple_subject=0x7f070006;
+        public static final int record_details_simple_synopsis=0x7f070008;
+        public static final int record_details_simple_title=0x7f070003;
+        public static final int searchButton=0x7f07000f;
+        public static final int searchText=0x7f07000e;
+        public static final int search_record_author=0x7f07000c;
+        public static final int search_record_img=0x7f07000a;
+        public static final int search_record_publishing=0x7f07000d;
+        public static final int search_record_title=0x7f07000b;
+        public static final int search_results_list=0x7f070010;
+    }
+    public static final class layout {
+        public static final int main=0x7f030000;
+        public static final int record_details_info=0x7f030001;
+        public static final int record_details_simple=0x7f030002;
+        public static final int search_result_item=0x7f030003;
+        public static final int search_result_list=0x7f030004;
+    }
+    public static final class string {
+        public static final int app_name=0x7f050001;
+        public static final int hello=0x7f050000;
+    }
+    public static final class style {
+        public static final int EvergreenTheme=0x7f060004;
+        public static final int sectionHeader=0x7f060000;
+        public static final int spacer=0x7f060003;
+        public static final int textLarge=0x7f060002;
+        public static final int textSmall=0x7f060001;
+    }
+}
diff --git a/Open-ILS/src/Android/lib/org.openils_ild.jar b/Open-ILS/src/Android/lib/org.openils_ild.jar
new file mode 100644 (file)
index 0000000..af2ba36
Binary files /dev/null and b/Open-ILS/src/Android/lib/org.openils_ild.jar differ
diff --git a/Open-ILS/src/Android/lib/org.opensrf.jar b/Open-ILS/src/Android/lib/org.opensrf.jar
new file mode 100644 (file)
index 0000000..f4a5023
Binary files /dev/null and b/Open-ILS/src/Android/lib/org.opensrf.jar differ
diff --git a/Open-ILS/src/Android/lib/simple-xml-2.6.4.jar b/Open-ILS/src/Android/lib/simple-xml-2.6.4.jar
new file mode 100644 (file)
index 0000000..be60eae
Binary files /dev/null and b/Open-ILS/src/Android/lib/simple-xml-2.6.4.jar differ
diff --git a/Open-ILS/src/Android/proguard.cfg b/Open-ILS/src/Android/proguard.cfg
new file mode 100644 (file)
index 0000000..b1cdf17
--- /dev/null
@@ -0,0 +1,40 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+    native <methods>;
+}
+
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers class * extends android.app.Activity {
+   public void *(android.view.View);
+}
+
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+  public static final android.os.Parcelable$Creator *;
+}
diff --git a/Open-ILS/src/Android/project.properties b/Open-ILS/src/Android/project.properties
new file mode 100644 (file)
index 0000000..b00386b
--- /dev/null
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=Google Inc.:Google APIs:8
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/action_search.png b/Open-ILS/src/Android/res/drawable-hdpi/action_search.png
new file mode 100644 (file)
index 0000000..f12e005
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/action_search.png differ
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/address_book.png b/Open-ILS/src/Android/res/drawable-hdpi/address_book.png
new file mode 100644 (file)
index 0000000..427b05e
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/address_book.png differ
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/ic_launcher.png b/Open-ILS/src/Android/res/drawable-hdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..8074c4c
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/ic_launcher.png differ
diff --git a/Open-ILS/src/Android/res/drawable-ldpi/address_book.png b/Open-ILS/src/Android/res/drawable-ldpi/address_book.png
new file mode 100644 (file)
index 0000000..cba08b1
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-ldpi/address_book.png differ
diff --git a/Open-ILS/src/Android/res/drawable-ldpi/ic_launcher.png b/Open-ILS/src/Android/res/drawable-ldpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..1095584
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-ldpi/ic_launcher.png differ
diff --git a/Open-ILS/src/Android/res/drawable-mdpi/address_book.png b/Open-ILS/src/Android/res/drawable-mdpi/address_book.png
new file mode 100644 (file)
index 0000000..10d7e22
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-mdpi/address_book.png differ
diff --git a/Open-ILS/src/Android/res/drawable-mdpi/ic_launcher.png b/Open-ILS/src/Android/res/drawable-mdpi/ic_launcher.png
new file mode 100644 (file)
index 0000000..a07c69f
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-mdpi/ic_launcher.png differ
diff --git a/Open-ILS/src/Android/res/layout/main.xml b/Open-ILS/src/Android/res/layout/main.xml
new file mode 100644 (file)
index 0000000..bc12cd8
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" >
+
+    <TextView
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:text="@string/hello" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/layout/record_details_info.xml b/Open-ILS/src/Android/res/layout/record_details_info.xml
new file mode 100644 (file)
index 0000000..a806b6b
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical">
+
+    <TextView 
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:text="TITLE"   
+        />
+
+     <TextView
+    android:id="@+id/record_details_info_title"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"   
+        />
+    
+    
+    <TextView  
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:text="AUTHOR"   
+        />
+    
+    <TextView
+    android:id="@+id/record_details_info_author"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"   
+    />
+        
+    <TextView  
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:text="PUBLISHER"   
+        />
+    
+    <TextView
+    android:id="@+id/record_details_info_publisher"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"   
+        />
+    
+</LinearLayout>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/layout/record_details_simple.xml b/Open-ILS/src/Android/res/layout/record_details_simple.xml
new file mode 100644 (file)
index 0000000..71f6c93
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"   
+        
+        >
+<LinearLayout 
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+
+           <TextView  
+           xmlns:android="http://schemas.android.com/apk/res/android"
+           style="@style/sectionHeader"  
+           android:text="Basic Information"
+               /> 
+           
+           
+           <TextView 
+               style="@style/textLarge"
+           android:text="TITLE"   
+               />
+       
+            <TextView
+           android:id="@+id/record_details_simple_title"
+               style="@style/textSmall"
+           />
+           
+           <TextView  
+               style="@style/textLarge"
+           android:text="AUTHOR"   
+               />
+           
+           <TextView
+           android:id="@+id/record_details_simple_author"
+               style="@style/textSmall"   
+           />
+               
+           <TextView  
+               style="@style/textLarge"
+           android:text="PUBLISHER"   
+               />
+           
+           <TextView
+           android:id="@+id/record_details_simple_publisher"
+               style="@style/textSmall"   
+               />
+               <TextView 
+               style="@style/spacer"    
+               />
+           
+               <TextView  
+           xmlns:android="http://schemas.android.com/apk/res/android"
+           style="@style/sectionHeader"  
+           android:text="Content"
+               /> 
+           
+               
+                <TextView 
+               style="@style/textLarge"
+           android:text="SUBJECT"   
+               />
+       
+            <TextView
+           android:id="@+id/record_details_simple_subject"
+               style="@style/textSmall"
+           />
+           
+           <TextView  
+               style="@style/textLarge"
+           android:text="SERIES"   
+               />
+           
+           <TextView
+           android:id="@+id/record_details_simple_series"
+               style="@style/textSmall"   
+           />
+               
+           <TextView  
+               style="@style/textLarge"
+           android:text="SYNOPSIS"   
+               />
+           
+           <TextView
+           android:id="@+id/record_details_simple_synopsis"
+               style="@style/textSmall"   
+               />
+               
+               <TextView  
+           xmlns:android="http://schemas.android.com/apk/res/android"
+           style="@style/sectionHeader"  
+           android:text="Other"
+               /> 
+               
+                           <TextView  
+               style="@style/textLarge"
+           android:text="ISBN"   
+               />
+           
+           <TextView
+           android:id="@+id/record_details_simple_isbn"
+               style="@style/textSmall"   
+               />
+               
+               
+       </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/layout/search_result_item.xml b/Open-ILS/src/Android/res/layout/search_result_item.xml
new file mode 100644 (file)
index 0000000..ea8ffbb
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:gravity="left|center"
+       android:paddingBottom="3px"
+       android:paddingTop="3px" 
+       android:paddingLeft="3px" 
+    android:orientation="horizontal" >
+
+       <ImageView
+               android:id="@+id/search_record_img"
+               android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:layout_marginRight="6dip"
+               android:src="@drawable/address_book"/>
+       
+       <LinearLayout 
+       android:layout_width="wrap_content"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" 
+       >
+               <TextView
+               android:id="@+id/search_record_title"
+               android:paddingLeft="10dip"
+               android:gravity="left"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content" />   
+           
+                       <TextView
+               android:id="@+id/search_record_author"
+               android:paddingRight="10dip"
+               android:layout_width="wrap_content"
+               android:gravity="right"
+               android:layout_height="wrap_content" />
+                   
+                               <TextView
+               android:id="@+id/search_record_publishing"
+               android:paddingRight="10dip"
+               android:gravity="right"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content" />
+
+       </LinearLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/layout/search_result_list.xml b/Open-ILS/src/Android/res/layout/search_result_list.xml
new file mode 100644 (file)
index 0000000..2c1e759
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" >
+
+     <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:padding="4dp"
+            android:background="@android:color/white">
+
+            <EditText
+                    android:id="@+id/searchText"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"/>
+
+            <ImageButton
+                    android:id="@+id/searchButton"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:src="@drawable/action_search"
+
+                    android:paddingLeft="10dp"
+                    android:paddingRight="10dp"
+                    android:paddingTop="5dp"
+                    android:paddingBottom="5dp"
+                    android:background="@color/green"/>
+
+        </LinearLayout>
+    
+    
+       <ListView 
+         android:id="@+id/search_results_list"
+         android:layout_width="fill_parent"
+         android:layout_height="wrap_content"  
+         ></ListView>
+       
+       <!-- filler -->
+       <TextView android:layout_height="0dip" 
+          android:layout_width="fill_parent"
+          android:layout_weight="1" />
+       
+       
+       <Spinner 
+        android:id="@+id/chose_organisation"   
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_horizontal"
+           />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/values/colors.xml b/Open-ILS/src/Android/res/values/colors.xml
new file mode 100644 (file)
index 0000000..5f326a2
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright 2011 Wglxy.com
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<resources>
+    <color name="title_background">#ff355689</color>
+    <color name="title_text">#ffffffff</color>
+    <color name="title_text_alt">#ff000000</color>
+    <color name="foreground1">#ff355689</color>
+    <color name="foreground2">#ff7081a3</color>
+    <color name="background1">#ffffffff</color>
+    <color name="background2">#ffd5ddeb</color>
+    <color name="background3">#ffe3e8f1</color>
+    <color name="title_separator">#40ffffff</color>
+       
+    
+    <!--  Defined colors for Evergreen Theme -->
+       <color name="green">#99cc00 </color>
+       
+       <color name="emphasis">#31b6e7</color>
+    <color name="bg_gray">#cecbce</color>
+       
+    <color name="white">#ffffff</color>
+</resources>
diff --git a/Open-ILS/src/Android/res/values/strings.xml b/Open-ILS/src/Android/res/values/strings.xml
new file mode 100644 (file)
index 0000000..6fa0813
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <string name="hello">Hello World, EvergreenAppActivity!</string>
+    <string name="app_name">EvergreenApp</string>
+
+</resources>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/values/styles.xml b/Open-ILS/src/Android/res/values/styles.xml
new file mode 100644 (file)
index 0000000..4ea885f
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <style name="sectionHeader" parent="android:attr/listSeparatorTextViewStyle">
+        <item name="android:layout_width">fill_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:paddingTop">2dip</item>
+        <item name="android:paddingBottom">2dip</item>
+        <item name="android:paddingLeft">8dip</item>
+        <item name="android:textSize">16sp</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:background">@color/background3</item>
+        <item name="android:textColor">@color/foreground1</item>     
+    </style>
+    
+    
+    <style name="textSmall">
+        <item name="android:textSize">14sp</item>
+        <item name="android:paddingLeft">15dip</item>
+        <item name="android:paddingTop">4dip</item>
+               <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item> 
+    </style>
+    
+    <style name="textLarge">
+        <item name="android:textSize">18sp</item>
+        <item name="android:paddingLeft">10dip</item>
+        <item name="android:paddingTop">5dip</item>
+        <item name="android:textColor">@color/white</item>
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+    </style>
+    
+    <style name="spacer">
+        <item name="android:layout_width">fill_parent</item>
+        <item name="android:layout_height">14dip</item>
+    </style>
+    
+    <style name="EvergreenTheme" parent="android:Theme.Black.NoTitleBar">
+       </style>
+    
+</resources>
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AuthenticateUser.java b/Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AuthenticateUser.java
new file mode 100644 (file)
index 0000000..8ec8804
--- /dev/null
@@ -0,0 +1,188 @@
+
+package org.evergreen.android.accountAccess;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.opensrf.Method;
+import org.opensrf.net.http.GatewayRequest;
+import org.opensrf.net.http.HttpConnection;
+import org.opensrf.net.http.HttpRequest;
+
+/**
+ * The Class AuthenticateUser.
+ */
+public class AuthenticateUser {
+
+       /** The SERVICE. */
+       public static String SERVICE = "open-ils.auth";
+
+       /** The METHO d_ multicas s_ search. */
+       public static String METHOD_AUTH_INIT = "open-ils.auth.authenticate.init";
+
+       /** The METHO d_ sli m_ retrive. */
+       public static String METHOD_AUTH_COMPLETE = "open-ils.auth.authenticate.complete";
+
+       /** The conn. */
+       public HttpConnection conn;
+
+       /** The http address. */
+       public String httpAddress = "http://ulysses.calvin.edu";
+
+       /** The TAG. */
+       public String TAG = "AuthenticareUser";
+       
+       /** The auth token. 
+        *  Sent with every request that needs authentication
+        * */
+       private String authToken = null;
+       
+       //for demo purpose
+       /** The user name. */
+       private String userName = "staff";
+
+       /** The password. */
+       private String password = "demo123";
+       
+       /**
+        * Instantiates a new authenticate user.
+        *
+        * @param httpAddress the http address
+        */
+       public AuthenticateUser(String httpAddress) {
+
+               this.httpAddress = httpAddress;
+
+               try {
+                       // configure the connection
+                       
+                       System.out.println("Connection with " + httpAddress);
+                       conn = new HttpConnection(httpAddress + "/osrf-gateway-v1");
+
+               } catch (Exception e) {
+                       System.err.println("Exception in establishing connection "
+                                       + e.getMessage());
+               }
+
+               // OSRFRegistry.registerObject("mvr", WireProtocol.ARRAY, new String[]
+               // {"title","author","doc_id","doc_type","pubdate","isbn","publisher","tcn","subject","type_of_resources","call_numbers","edition","online_loc","synopsis","physical_description","toc","copy_count","series","serials","foreign_copy_maps"});
+
+       }
+
+       /**
+        * Md5.
+        *
+        * @param s the s
+        * @return the string
+        */
+       public String md5(String s) {
+           try {
+               // Create MD5 Hash
+               MessageDigest digest = java.security.MessageDigest.getInstance("MD5");
+               digest.update(s.getBytes());
+               byte messageDigest[] = digest.digest();
+
+               // Create Hex String
+               StringBuffer hexString = new StringBuffer();
+               for (int i=0; i<messageDigest.length; i++){
+                       String hex = Integer.toHexString(0xFF & messageDigest[i]);
+                       if (hex.length() == 1) {
+                           // could use a for loop, but we're only dealing with a single byte
+                           hexString.append('0');
+                       }
+                       hexString.append(hex);
+               }
+               return hexString.toString();
+               
+           } catch (NoSuchAlgorithmException e) {
+               e.printStackTrace();
+           }
+           
+           return "";
+       }
+       
+       /**
+        * Authenticate.
+        */
+       public void authenticate(){
+               
+               String seed = authenticateInit();
+               
+               authenticateComplete(seed);
+       }
+       
+       /**
+        * Authenticate init.
+        * @return seed for phase 2 of login
+        */
+       private String authenticateInit() {
+
+               Method method = new Method(METHOD_AUTH_INIT);
+
+               method.addParam(userName);
+
+               // sync test
+               HttpRequest req = new GatewayRequest(conn, SERVICE, method).send();
+               Object resp;
+               
+               String seed = null;
+               
+               while ((resp = req.recv()) != null) {
+                       System.out.println("Sync Response: " + resp);
+                       seed = resp.toString();
+               }
+               
+               System.out.println("Seed " + seed);
+               
+               return seed;
+       }
+       
+       
+       /**
+        * Authenticate complete.
+        * Phase 2 of login process
+        * Application send's username and hash to confirm login
+        * @param seed the seed
+        */
+       private void authenticateComplete(String seed) {
+               
+               //calculate hash to pass to server for authentication process phase 2
+               //seed = "b18a9063e0c6f49dfe7a854cc6ab5775";
+               String hash = md5(seed+md5(password));
+               System.out.println("Hash " + hash);
+               
+               Method method = new Method(METHOD_AUTH_COMPLETE);
+               
+               HashMap<String,String> complexParam = new HashMap<String, String>();
+               
+               
+               complexParam.put("username", userName);
+               complexParam.put("password", hash+"'");
+
+               
+               method.addParam(complexParam);
+               System.out.println("Compelx param " + complexParam);
+               
+               // sync test
+               HttpRequest req = new GatewayRequest(conn, SERVICE, method).send();
+               Object resp;
+
+               
+               while ((resp = req.recv()) != null) {
+                       System.out.println("Sync Response: " + resp);
+                       
+                       String queryResult = ((Map<String,String>) resp).get("desc");
+                        
+                       System.out.println("Result " + queryResult);
+                       
+                       if(queryResult.equals("Success")){
+                               authToken = ((Map<String,String>) resp).get("authtoken");
+                       }
+               }
+               
+               
+       }
+
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/globals/GlobalConfigs.java b/Open-ILS/src/Android/src/org/evergreen/android/globals/GlobalConfigs.java
new file mode 100644 (file)
index 0000000..f5ab2bc
--- /dev/null
@@ -0,0 +1,6 @@
+package org.evergreen.android.globals;
+
+public class GlobalConfigs {
+
+       //public static String httpAddress = "http://ulysses.calvin.edu";
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/globals/Utils.java b/Open-ILS/src/Android/src/org/evergreen/android/globals/Utils.java
new file mode 100644 (file)
index 0000000..fd8caf7
--- /dev/null
@@ -0,0 +1,5 @@
+package org.evergreen.android.globals;
+
+public class Utils {
+
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/Organisation.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/Organisation.java
new file mode 100644 (file)
index 0000000..1dd8047
--- /dev/null
@@ -0,0 +1,20 @@
+package org.evergreen.android.searchCatalog;
+
+public class Organisation {
+
+       public String name = null;
+       
+       public String shortName = null;
+       
+       public Integer id = null;
+       
+       public Integer level = null;
+       
+       public Integer parent = null;
+       
+       public Integer canHaveVolumesBool = null;
+       
+       public Organisation(){
+               
+       }
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails.java
new file mode 100644 (file)
index 0000000..a1eb4b9
--- /dev/null
@@ -0,0 +1,47 @@
+package org.evergreen.android.searchCatalog;
+
+import android.app.TabActivity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.widget.TabHost;
+import android.widget.TabHost.TabSpec;
+
+public class RecordDetails extends TabActivity{
+
+       @Override
+       protected void onCreate(Bundle savedInstanceState) {
+               super.onCreate(savedInstanceState);
+               
+        TabHost tabHost = getTabHost();
+        
+        
+        RecordInfo record = (RecordInfo) getIntent().getSerializableExtra("recordInfo");
+        
+        // Tab for Photos
+        TabSpec photospec = tabHost.newTabSpec("Info");
+        // setting Title and Icon for the Tab
+        photospec.setIndicator("Info");
+        Intent photosIntent = new Intent(this, RecordDetails_Info.class);
+        photospec.setContent(photosIntent);
+        photosIntent.putExtra("recordInfo", record);
+        
+        // Tab for Songs
+        TabSpec songspec = tabHost.newTabSpec("Content");
+        songspec.setIndicator("Content");
+        Intent songsIntent = new Intent(this, RecordDetails_Content.class);
+        songspec.setContent(songsIntent);
+        songsIntent.putExtra("recordInfo", record);
+        // Tab for Videos
+        TabSpec videospec = tabHost.newTabSpec("Other");
+        videospec.setIndicator("Other");
+        Intent videosIntent = new Intent(this, RecordDetails_Details.class);
+        videospec.setContent(videosIntent);
+        videosIntent.putExtra("recordInfo",record);
+        // Adding all TabSpec to TabHost
+        tabHost.addTab(photospec); // Adding photos tab
+        tabHost.addTab(songspec); // Adding songs tab
+        tabHost.addTab(videospec); // Adding videos tab
+               
+       }
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Content.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Content.java
new file mode 100644 (file)
index 0000000..c03b957
--- /dev/null
@@ -0,0 +1,13 @@
+package org.evergreen.android.searchCatalog;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class RecordDetails_Content extends Activity{
+
+       @Override
+       protected void onCreate(Bundle savedInstanceState) {
+               // TODO Auto-generated method stub
+               super.onCreate(savedInstanceState);
+       }
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Details.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Details.java
new file mode 100644 (file)
index 0000000..7c48d11
--- /dev/null
@@ -0,0 +1,13 @@
+package org.evergreen.android.searchCatalog;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class RecordDetails_Details extends Activity{
+
+       @Override
+       protected void onCreate(Bundle savedInstanceState) {
+               // TODO Auto-generated method stub
+               super.onCreate(savedInstanceState);
+       }
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Info.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Info.java
new file mode 100644 (file)
index 0000000..a7543e7
--- /dev/null
@@ -0,0 +1,40 @@
+package org.evergreen.android.searchCatalog;
+
+import java.security.PublicKey;
+
+import org.evergreen.android.R;
+import org.evergreen.android.R.id;
+import org.evergreen.android.R.layout;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.TextView;
+
+public class RecordDetails_Info extends Activity{
+
+       
+       private TextView titleTextView;
+       
+       private TextView authorTextView;
+       
+       private TextView publisherTextView;
+       
+       @Override
+       protected void onCreate(Bundle savedInstanceState) {
+               // TODO Auto-generated method stub
+               super.onCreate(savedInstanceState);
+               setContentView(R.layout.record_details_info);
+               
+               RecordInfo record = (RecordInfo)getIntent().getSerializableExtra("recordInfo");
+               
+               titleTextView = (TextView) findViewById(R.id.record_details_info_title);
+               authorTextView = (TextView) findViewById(R.id.record_details_info_author);
+               publisherTextView = (TextView) findViewById(R.id.record_details_info_publisher);
+               
+               
+               titleTextView.setText(record.title);
+               authorTextView.setText(record.author);
+               publisherTextView.setText(record.publisher);
+               
+       }
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Simple.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordDetails_Simple.java
new file mode 100644 (file)
index 0000000..9b7098c
--- /dev/null
@@ -0,0 +1,50 @@
+package org.evergreen.android.searchCatalog;
+
+import org.evergreen.android.R;
+import org.evergreen.android.R.id;
+import org.evergreen.android.R.layout;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.TextView;
+
+public class RecordDetails_Simple extends Activity {
+
+       
+       private TextView titleTextView;
+       private TextView authorTextView;
+       private TextView publisherTextView;
+       private TextView seriesTextView;
+       private TextView subjectTextView;
+       private TextView synopsisTextView;
+       private TextView isbnTextView;
+       
+       @Override
+       protected void onCreate(Bundle savedInstanceState) {
+               super.onCreate(savedInstanceState);
+               setContentView(R.layout.record_details_simple);
+               
+               titleTextView = (TextView) findViewById(R.id.record_details_simple_title);
+               authorTextView = (TextView) findViewById(R.id.record_details_simple_author);
+               publisherTextView = (TextView) findViewById(R.id.record_details_simple_publisher);
+               
+               seriesTextView = (TextView) findViewById(R.id.record_details_simple_series);
+               subjectTextView = (TextView) findViewById(R.id.record_details_simple_subject);
+               synopsisTextView = (TextView) findViewById(R.id.record_details_simple_synopsis);
+               
+               isbnTextView = (TextView) findViewById(R.id.record_details_simple_isbn);
+               
+               RecordInfo record = (RecordInfo) getIntent().getSerializableExtra("recordInfo");
+               
+               titleTextView.setText(record.title);
+               authorTextView.setText(record.author);
+               publisherTextView.setText(record.pubdate + " " + record.publisher);
+               
+               seriesTextView.setText(record.series);
+               subjectTextView.setText(record.subject);
+               synopsisTextView.setText(record.synopsis);
+               
+               isbnTextView.setText(record.isbn);
+               
+       }
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordInfo.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/RecordInfo.java
new file mode 100644 (file)
index 0000000..1384646
--- /dev/null
@@ -0,0 +1,104 @@
+package org.evergreen.android.searchCatalog;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+public class RecordInfo implements Serializable{
+
+       
+       //{"title","author","doc_id","doc_type","pubdate","isbn","publisher","tcn","subject","type_of_resources","call_numbers","edition","online_loc","synopsis","physical_description","toc","copy_count","series","serials","foreign_copy_maps"});
+       
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 10123L;
+
+       public String title = null;
+       
+       public String author = null;
+       
+       public String pubdate = null;
+       
+       public String isbn = null;
+       
+       public Integer doc_id = null;
+       
+       public String publisher = null;
+       
+       public String subject = null;
+       
+       public String online_loc = null;
+       
+       public String synopsis = null;
+       
+       public String physical_description = null;
+       
+       public String series = null;
+       
+       public RecordInfo(Map<String,?> info){
+               
+               try{
+                       
+                       this.title = (String)info.get("title");
+                       this.author = (String)info.get("author");
+                       this.pubdate = (String)info.get("pubdate");
+                       this.publisher = (String)info.get("publisher");
+                       this.doc_id = (Integer)info.get("doc_id");
+                       
+               }
+               catch(Exception e){System.out.println("Exception basic info " + e.getMessage());};
+               
+               try{    
+                       this.isbn = (String)info.get("isbn");           
+               }catch(Exception e){ 
+                       System.out.println("Exception isbn " + e.getMessage());
+                       };
+               
+               try{    
+                       
+                       Map<String,?> subjectMap = (Map<String,?>) info.get("subject");
+                       
+                       this.subject = "";
+                       
+                       int no = subjectMap.entrySet().size();
+                       int i=0;
+                       for(Entry<String,?> entry : subjectMap.entrySet()){
+                               i++;
+                               if(i<no)
+                                       this.subject += entry.getKey() + " \n";
+                               else
+                                       this.subject += entry.getKey();
+                       }
+
+               }catch(Exception e){ 
+                       System.out.println("Exception subject " + e.getMessage());
+                       };
+               try{            
+       
+                       this.online_loc = ((List)info.get("online_loc")).get(0).toString();
+               
+               }catch(Exception e){ 
+                       System.out.println("Exception online_loc " + e.getMessage());
+                       };
+               try{    
+                       this.physical_description = (String)info.get("physical_description");
+               }catch(Exception e){ 
+                       System.out.println("Exception physical_description " + e.getMessage());
+                       };
+               try{            
+                       this.series = "";
+                       List<String> seriesList = (List) info.get("series");
+                       for(int i=0;i<seriesList.size();i++)
+                               if(i<seriesList.size()-1)
+                                       this.series += seriesList.get(i) + ", ";
+                               else
+                                       this.series += seriesList.get(i);
+               }catch(Exception e){ 
+                       System.out.println("Exception series " + e.getMessage());
+                       };
+
+               
+       }
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalog.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalog.java
new file mode 100644 (file)
index 0000000..3813c1c
--- /dev/null
@@ -0,0 +1,418 @@
+
+package org.evergreen.android.searchCatalog;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.open_ils.idl.IDLParser;
+import org.opensrf.Method;
+import org.opensrf.net.http.GatewayRequest;
+import org.opensrf.net.http.HttpConnection;
+import org.opensrf.net.http.HttpRequest;
+import org.opensrf.net.http.HttpRequestHandler;
+
+import android.content.Context;
+import android.util.Log;
+
+/**
+ * The Class SearchCatalog.
+ */
+public class SearchCatalog {
+
+       /** The SERVICE. */
+       public static String SERVICE = "open-ils.search";
+       
+       /** The METHO d_ multicas s_ search. */
+       public static String METHOD_MULTICASS_SEARCH = "open-ils.search.biblio.multiclass.query";
+       
+       /** The METHO d_ sli m_ retrive. */
+       public static String METHOD_SLIM_RETRIVE  = "open-ils.search.biblio.record.mods_slim.retrieve";
+
+       /** The conn. */
+       public HttpConnection conn;
+       
+       /** The collections request. */
+       public static String collectionsRequest = "/opac/common/js/";
+       
+       /** The locale. */
+       public String locale = "en-US";  
+       
+       /** The http address. */
+       public String httpAddress = "http://ulysses.calvin.edu";
+       
+       /** The TAG. */
+       public String TAG = "SearchCatalog";
+       
+       /** The organisations. */
+       public ArrayList<Organisation> organisations;
+       
+       //the org on witch the searches will be made
+       /** The selected organization. */
+       private Organisation selectedOrganization = null;
+       
+       private Context context;
+       /**
+        * Instantiates a new search catalog.
+        *
+        * @param httpAddress the http address
+        * @param locale the locale
+        */
+       public SearchCatalog(String httpAddress, String locale, Context context) {
+               super();
+               this.context = context;
+               this.httpAddress = httpAddress;
+               try{
+                       // configure the connection
+                       conn = new HttpConnection(httpAddress+"/osrf-gateway-v1");
+                       this.locale = locale;
+                       collectionsRequest += locale + "/OrgTree.js";
+                       
+               }catch(Exception e){
+                       System.err.println("Exception in establishing connection " +  e.getMessage());
+               }
+               //registering classes so no longer necessary to register object classes manually
+               readIDLFile();
+
+               this.organisations = new ArrayList<Organisation>();
+               getOrganisations();
+       }
+       
+       
+       /**
+        * Gets the organisations get's OrgTree.js from server, parses the input and recovers the organisations
+        *
+        * @return the organisations
+        */
+       private void getOrganisations(){
+               
+               String orgFile = null;
+               try{
+                       orgFile = getNetPageContent(httpAddress+collectionsRequest);
+                       System.out.println("Request org " + httpAddress + collectionsRequest );
+               }catch(Exception e){};
+               
+               
+               if(orgFile != null){
+                       System.out.println("Page content " + orgFile);
+                       
+                       String orgArray = orgFile.substring( orgFile.indexOf("=")+1, orgFile.indexOf(";"));  
+                       
+                       String arrayContent = orgArray.substring(orgArray.indexOf("[")+1,orgArray.lastIndexOf("]"));
+                       
+                       
+                       Log.d(TAG,"Array to pe parsed " + arrayContent);
+                       
+                       //parser for list
+                       
+                       //format [104,2,1,"Curriculum Center",1,"CURRICULUM"]  : [id,level,parent,name,can_have_volumes_bool,short_name]
+                       
+                       int index = 0;
+                       while(true){
+                               
+                               if(index >= arrayContent.length())
+                                       break;
+                               
+                               int start = arrayContent.indexOf("[", index)+1;
+                               int stop = arrayContent.indexOf("]", index);
+                               
+                               Log.d(TAG," start stop length index" + start+ " " + stop + " " + arrayContent.length() + " " + index);
+                               if(start == -1 || stop == -1)
+                                       break;
+                               
+                               index = stop+1;
+                               
+                               String content = arrayContent.substring(start,stop);
+                               
+                               System.out.println("Content " + content);
+                               
+                               StringTokenizer tokenizer = new StringTokenizer(content,",");
+                               
+                               Organisation org = new Organisation();
+                               
+                               //first is ID
+                               String element = (String)tokenizer.nextElement();
+                               System.out.println("Element  " + element);
+                               try{
+                                       org.id = Integer.parseInt(element);
+                               }catch(Exception e){};
+                               
+                               //level
+                               element = (String)tokenizer.nextElement();
+                               System.out.println("Element  " + element);
+                               try{
+                                       org.level = Integer.parseInt(element);
+                               }catch(Exception e){};
+                               
+                               //parent
+                               element = (String)tokenizer.nextElement();
+                               System.out.println("Element  " + element);
+                               try{
+                                       org.parent = Integer.parseInt(element);
+                               }catch(Exception e){};
+                               
+                               //name
+                               element = (String)tokenizer.nextToken("\",");
+                               System.out.println("Element  " + element);
+                               org.name = element;
+                               
+                               //can_have_volume_boo.
+                               element = (String)tokenizer.nextElement();
+                               System.out.println("Element  " + element);
+                               try{
+                                       org.canHaveVolumesBool = Integer.parseInt(element);
+                               }catch(Exception e){};
+                               
+                               //short name
+                               element = (String)tokenizer.nextToken("\",");
+                               System.out.println("Element  " + element);
+                               org.shortName = element;
+                               
+                               organisations.add(org);
+                       }
+                       
+               }
+       }
+       
+       
+       
+       /**
+        * Gets the net page content.
+        *
+        * @param url the url of the page to be retrieved
+        * @return the net page content
+        */
+       private String getNetPageContent(String url){
+               
+               String result = "";
+               
+               HttpResponse response = null;
+               
+               try{
+                       HttpClient client = new DefaultHttpClient();
+                       HttpGet request = new HttpGet(url);
+                       response = client.execute(request);
+               }catch(Exception e){
+                       System.out.println("Exception to GET page " + url);     
+               }
+               StringBuilder str = null;
+               
+               try{
+                       InputStream in = response.getEntity().getContent();
+                       BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+                       str = new StringBuilder();
+                       String line = null;
+                       while((line = reader.readLine()) != null)
+                       {
+                           str.append(line);
+                       }
+                       in.close();
+               }catch(Exception e){
+                       System.err.println("Error in retrieving response " + e.getMessage());
+               }
+               
+               result = str.toString();
+
+               
+               return result;
+       }
+
+       /**
+        * Gets the search results
+        *
+        * @param searchWords the search words
+        * @return the search results
+        */
+       public ArrayList<RecordInfo> getSearchResults(String searchWords){
+               
+               
+               ArrayList<RecordInfo> resultsRecordInfo = new ArrayList<RecordInfo>();
+               
+               
+                Method method = new Method(METHOD_MULTICASS_SEARCH);
+
+                HashMap complexParm = new HashMap<String,Integer>();
+
+                  try{
+                       if(this.selectedOrganization != null){
+                               if(this.selectedOrganization.id != null)
+                                       complexParm.put("org_unit", this.selectedOrganization.id);
+                               if(this.selectedOrganization.level != null)
+                                       complexParm.put("depth", this.selectedOrganization.level-1);
+                       }
+                       /*
+                       complexParm.put("limit", 10);
+                       complexParm.put("offset",0);
+                       complexParm.put("visibility_limit", 3000);
+                       complexParm.put("default_class","keyword");
+                       */
+                       
+               }catch(Exception e)
+               {
+                       System.out.println("Exception in JSON " + e.getMessage());
+               }
+               
+               System.out.println("JSON argument " + complexParm);
+               method.addParam(complexParm);
+               method.addParam(searchWords);
+               method.addParam(1);
+               
+               // sync test
+               HttpRequest req = new GatewayRequest(conn, SERVICE, method).send();
+               Object resp;
+               
+               //why in while ?
+               
+               ArrayList<String> ids = new ArrayList<String>();
+               
+               while ( (resp = req.recv()) != null){
+                   System.out.println("Sync Response: " + resp);
+                   
+                   Map<String,?> response = (Map<String,?>) resp;
+                   
+                   System.out.println(" ids : " + response.get("ids") + " " );
+                   
+                   List<List<String>> result_ids = (List) response.get("ids");
+                   
+                   for(int i=0;i<result_ids.size();i++){
+                       ids.add(result_ids.get(i).get(0));
+                   }
+
+               }
+               // exceptions are captured instead of thrown, 
+               // primarily to better support async requests
+               if (req.failed()) {
+                   req.getFailure().printStackTrace();
+                   return null;
+               }
+               
+               
+               System.out.println("Ids " + ids);
+               
+               //request other info based on ids
+               
+
+               for(int i=0;i<ids.size();i++){
+                       
+                       RecordInfo record = new RecordInfo(getItemShortInfo(ids.get(i)));
+                       resultsRecordInfo.add(record);
+                       System.out.println("Title " + record.title + " Author " + record.author + " Pub date" + record.pubdate +" Publisher" + record.publisher);
+               }
+               
+               return resultsRecordInfo;
+       }
+       
+       
+       
+       /**
+        * Gets the item short info.
+        *
+        * @param id the id
+        * @return the item short info
+        */
+       private Map<String,?> getItemShortInfo(String id){
+               
+               Method method = new Method(METHOD_SLIM_RETRIVE);
+               
+               method.addParam(id);
+
+                HttpRequest req = new GatewayRequest(conn, SERVICE, method).send();
+               Object resp;
+               while ( (resp = req.recv()) != null) {
+                   System.out.println("Sync Response: " + resp);
+                   return (Map<String,?>)resp;
+               }
+               
+               return null;
+       }
+       
+       
+       /**
+        * Search catalog.
+        *
+        * @param searchWords the search words
+        * @return the object
+        */
+       public Object searchCatalog(String searchWords){
+               
+               
+        Method method = new Method(METHOD_SLIM_RETRIVE);
+
+        method.addParam("keyword");
+        method.addParam(searchWords);
+        
+        
+        // sync test
+        HttpRequest req = new GatewayRequest(conn, SERVICE, method).send();
+        Object resp;
+        while ( (resp = req.recv()) != null) {
+            System.out.println("Sync Response: " + resp);
+            return resp;
+        }
+     
+        
+        // exceptions are captured instead of thrown, 
+        // primarily to better support async requests
+        if (req.failed()) {
+            req.getFailure().printStackTrace();
+            return null;
+        }
+        
+        return null;
+       }
+       
+       /**
+        * Search catalog.
+        *
+        * @param searchWords the search words
+        * @param requestHandler the request handler
+        */
+       public void searchCatalog(String searchWords, HttpRequestHandler requestHandler){
+                       
+        Method method = new Method(METHOD_SLIM_RETRIVE);
+    
+        method.addParam(searchWords);  
+
+        // sync test
+        HttpRequest req = new GatewayRequest(conn, SERVICE, method).send();
+        req.sendAsync(requestHandler);
+
+       }
+
+       
+       /**
+        * Select organisation.
+        *
+        * @param org the organization on witch the searches will be made
+        */
+       public void selectOrganisation(Organisation org){
+               
+               
+               Log.d(TAG,"Select search organisation " + (org.level-1) + " " + org.id ); 
+               this.selectedOrganization = org;
+               
+               
+       }
+       
+    private void readIDLFile(){
+       
+                String idlFile = "fm_IDL.xml";
+                try{
+                       Log.d("debug","Read fm");
+                       IDLParser parser = new IDLParser(context.getAssets().open(idlFile));
+                       parser.parse();
+               }catch(Exception e){
+                       System.err.println("Error in parsing IDL file " + idlFile + " " + e.getMessage());
+               };
+       
+   }
+}
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java b/Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java
new file mode 100644 (file)
index 0000000..7981b91
--- /dev/null
@@ -0,0 +1,252 @@
+package org.evergreen.android.searchCatalog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.evergreen.android.R;
+import org.open_ils.idl.IDLParser;
+
+import android.app.Activity;
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.AdapterView.OnItemSelectedListener;
+import android.widget.ArrayAdapter;
+import android.widget.EditText;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.Spinner;
+import android.widget.TextView;
+
+public class SearchCatalogListView extends Activity{
+    /**
+        * 
+        */
+
+
+       /** Called when the activity is first created. */
+       
+       private List<RecordInfo> recordList;
+       
+       private EditText searchText;
+       
+       private ImageButton searchButton;
+
+       private SearchCatalog search;
+       
+       private ListView lv;
+       
+       private SearchArrayAdapter adapter;
+       
+       private Context context;
+       
+       private ProgressDialog progressDialog;
+       
+       private ArrayList<RecordInfo> searchResults;
+       
+       private Spinner choseOrganisation;
+       
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.search_result_list);
+
+        
+        context = this;
+        search = new SearchCatalog("http://ulysses.calvin.edu","en-US",this);
+                
+        recordList= new ArrayList<RecordInfo>();
+
+        // Create a customized ArrayAdapter
+        adapter = new SearchArrayAdapter(
+                               getApplicationContext(), R.layout.search_result_item, recordList);
+               
+       // Get reference to ListView holder
+       lv = (ListView) this.findViewById(R.id.search_results_list);
+               
+       //System.out.println("Here it is "  + lv);
+       // Set the ListView adapter
+       lv.setAdapter(adapter);
+       
+       
+       lv.setOnItemClickListener(new OnItemClickListener() {
+               
+               @Override
+               public void onItemClick(AdapterView<?> arg0, View arg1, int position,
+                               long arg3) {
+                       
+               
+                       RecordInfo info = (RecordInfo)lv.getItemAtPosition(position);
+                       //start activity with book details
+                       
+                       Intent intent = new Intent(getBaseContext(),RecordDetails_Simple.class);
+                       //serialize object and pass it to next activity
+                       intent.putExtra("recordInfo", info);
+                       
+                       startActivity(intent);
+               }
+               });
+        
+        searchText = (EditText) findViewById(R.id.searchText);
+        choseOrganisation = (Spinner) findViewById(R.id.chose_organisation);
+        
+        searchButton = (ImageButton) findViewById(R.id.searchButton);
+        
+        searchButton.setOnClickListener(new OnClickListener() {
+       
+        
+                       @Override
+                       public void onClick(View v) {
+                               // TODO Auto-generated method stub
+                               
+                               final String text = searchText.getText().toString();
+                               
+                               
+                               progressDialog = new ProgressDialog(context);
+                               
+                               progressDialog.setMessage("Fetching data");
+                               progressDialog.show();
+                               
+                               if(text.length()>0){
+                                       
+                                       Thread searchThread = new Thread(new Runnable() {
+                                               
+                                               @Override
+                                               public void run() {
+                                                       // TODO Auto-generated method stub
+                                                       searchResults = search.getSearchResults(text);
+                                                       
+                                                       runOnUiThread(new Runnable() {
+                                                               
+                                                               @Override
+                                                               public void run() {
+                                                                       // TODO Auto-generated method stub
+                                                                       recordList.clear();
+                                                                       if(searchResults.size()>0){
+                                                                               //TODO
+                                                                               for(int j=0;j<searchResults.size();j++)
+                                                                                       recordList.add(searchResults.get(j));
+                                                                       }
+                                                                       adapter.notifyDataSetChanged();
+                                                                       progressDialog.dismiss();
+                                                               }
+                                                       });
+                                                       
+                                               }
+                                       });
+                                       
+                                       searchThread.start();
+
+
+                               }
+                       }
+               });
+
+        
+        int selectedPos = 0;
+        ArrayList<String> list = new ArrayList<String>();
+        for(int i=0;i<search.organisations.size();i++){
+               list.add(search.organisations.get(i).name);
+               
+               if(search.organisations.get(i).level -1 == 0)
+                       selectedPos = i;
+        }
+        
+        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,list);
+        choseOrganisation.setAdapter(adapter);
+       
+        choseOrganisation.setSelection(selectedPos);
+        
+        choseOrganisation.setOnItemSelectedListener(new OnItemSelectedListener() {
+                       @Override
+                       public void onItemSelected(AdapterView<?> arg0, View arg1,
+                                       int ID, long arg3) {
+                               //select the specific organization
+                               search.selectOrganisation(search.organisations.get(ID));
+                               
+                       }
+                       
+                       @Override
+                       public void onNothingSelected(AdapterView<?> arg0) {
+                               
+                       }
+        
+        });
+    
+    }
+    
+    class SearchArrayAdapter extends ArrayAdapter<RecordInfo> {
+       private static final String tag = "SearchArrayAdapter";
+       private Context context;
+       private ImageView recordImage;
+       private TextView recordTitle;
+       private TextView recordAuthor;
+       private TextView recordPublisher;
+       
+       private List<RecordInfo> records = new ArrayList<RecordInfo>();
+
+       public SearchArrayAdapter(Context context, int textViewResourceId,
+                       List<RecordInfo> objects) {
+               super(context, textViewResourceId, objects);
+               this.context = context;
+               this.records = objects;
+       }
+
+       public int getCount() {
+               return this.records.size();
+       }
+
+       public RecordInfo getItem(int index) {
+               return this.records.get(index);
+       }
+
+       public View getView(int position, View convertView, ViewGroup parent) {
+               View row = convertView;
+               if (row == null) {
+                       // ROW INFLATION
+                       Log.d(tag, "Starting XML Row Inflation ... ");
+                       LayoutInflater inflater = (LayoutInflater) this.getContext()
+                                       .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+                       row = inflater.inflate(R.layout.search_result_item, parent, false);
+                       Log.d(tag, "Successfully completed XML Row Inflation!");
+               }
+
+               // Get item
+               RecordInfo record = getItem(position);
+               
+               // Get reference to ImageView 
+               recordImage = (ImageView) row.findViewById(R.id.search_record_img);
+               
+               // Get reference to TextView - title
+               recordTitle = (TextView) row.findViewById(R.id.search_record_title);
+               
+               // Get reference to TextView - author
+               recordAuthor = (TextView) row.findViewById(R.id.search_record_author);
+
+               //Get referance to TextView - record Publisher date+publisher
+               recordPublisher = (TextView) row.findViewById(R.id.search_record_publishing);
+    
+               //set text
+               
+               recordTitle.setText(record.title);
+               recordAuthor.setText(record.author);
+               recordPublisher.setText(record.pubdate + " " + record.publisher);
+
+               return row;
+       }
+    }
+    
+
+}
+
+
diff --git a/Open-ILS/src/Android/src/org/open_ils/Event.java b/Open-ILS/src/Android/src/org/open_ils/Event.java
new file mode 100644 (file)
index 0000000..69a73a1
--- /dev/null
@@ -0,0 +1,33 @@
+package org.open_ils;
+
+import java.util.Map;
+import java.util.HashMap;
+
+public class Event extends HashMap<String, Object> {
+
+    public Event() {
+    }
+
+    public Event(Map<String, Object> map) {
+        super(map);
+    }
+
+    public static Event parseEvent(Object map) {
+        if( map != null && map instanceof Map) {
+            Map m = (Map) map;
+            if( m.containsKey("ilsevent") && m.containsKey("textcode")) 
+                return new Event(m);
+        }
+        
+        return null;
+    }
+
+    public String getTextCode() {
+        return (String) get("textcode");
+    }
+
+    public int getCode() {
+        return Integer.parseInt((String) get("ilsevent"));
+    }
+}
+
diff --git a/Open-ILS/src/Android/src/org/open_ils/Sys.java b/Open-ILS/src/Android/src/org/open_ils/Sys.java
new file mode 100644 (file)
index 0000000..0d66edc
--- /dev/null
@@ -0,0 +1,70 @@
+package org.open_ils;
+
+import org.opensrf.*;
+import org.opensrf.util.*;
+import org.open_ils.*;
+import org.open_ils.idl.*;
+import org.opensrf.util.*;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.io.IOException;
+
+
+public class Sys {
+
+    private static IDLParser idlParser = null;
+
+    /**
+     * Initializes the connection to the OpenSRF network and parses the IDL file.
+     * @param attrs A map of configuration attributes.  Options include:<br/>
+     * <ul>
+     * <li>configFile - The OpenSRF core config file</li>
+     * <li>configContext - The path to the config chunk in the config XML, typically "opensrf"</li>
+     * <li>logProtocol - Currently supported option is "file".</li>
+     * <li>logLevel - The log level.  Options are 1,2,3, or 4 (error, warn, info, debug)</li>
+     * <li>syslogFacility - For future use, when syslog is a supported log option</li>
+     * <li>idlFile - The path to the IDL file.  May be relative or absolute.  If this option is 
+     * not provided, the system will ask the OpenSRF Settings server for the IDL file path.</li>
+     * </ul>
+     */
+    public static void init(Map<String, String> attrs) throws ConfigException, SessionException, IOException, IDLException {
+
+        String configFile = attrs.get("configFile");
+        String configContext = attrs.get("configContext");
+        String logProto = attrs.get("logProtocol");
+        String logFile = attrs.get("logFile");
+        String logLevel = attrs.get("logLevel");
+        String syslogFacility = attrs.get("syslogFacility");
+        String idlFile = attrs.get("idlFile");
+
+
+        if(idlParser != null) {
+            /** if we've parsed the IDL file, then all of the global setup has been done.
+            *   We just need to verify this thread is connected to the OpenSRF network. */
+            org.opensrf.Sys.bootstrapClient(configFile, configContext);
+            return;
+        }
+
+        /** initialize the logging infrastructure */
+        if("file".equals(logProto))
+            Logger.init(Short.parseShort(logLevel), new FileLogger(logFile));
+
+        if("syslog".equals(logProto)) 
+            throw new ConfigException("syslog not yet implemented");
+
+        /** connect to the opensrf network. */
+        org.opensrf.Sys.bootstrapClient(configFile, configContext);
+
+        /** Grab the IDL file setting if not explicitly provided */
+        if(idlFile == null) {
+            SettingsClient client = SettingsClient.instance();
+            idlFile = client.getString("/IDL");
+        }
+
+        /** Parse the IDL if necessary */
+        idlParser = new IDLParser(idlFile);
+        idlParser.parse();
+    }
+}
+
diff --git a/Open-ILS/src/Android/src/org/open_ils/idl/IDLException.java b/Open-ILS/src/Android/src/org/open_ils/idl/IDLException.java
new file mode 100644 (file)
index 0000000..1b84d24
--- /dev/null
@@ -0,0 +1,10 @@
+package org.open_ils.idl;
+
+public class IDLException extends Exception {
+    public IDLException(String info) {
+        super(info);
+    }
+    public IDLException(String info, Throwable cause) {
+        super(info, cause);
+    }
+}
diff --git a/Open-ILS/src/Android/src/org/open_ils/idl/IDLField.java b/Open-ILS/src/Android/src/org/open_ils/idl/IDLField.java
new file mode 100644 (file)
index 0000000..6955bc5
--- /dev/null
@@ -0,0 +1,46 @@
+package org.open_ils.idl;
+
+public class IDLField {
+
+    /** Field name */
+    private String name;
+
+    /** Where this field resides in the array when serilized */
+    private int arrayPos;
+
+    /** True if this field does not belong in the database */
+    private boolean isVirtual;
+
+    public void setName(String name) {
+      this.name = name;
+    }
+    public void setArrayPos(int arrayPos) {
+      this.arrayPos = arrayPos;
+    }
+    public void setIsVirtual(boolean isVirtual) {
+      this.isVirtual = isVirtual;
+    }
+    public String getName() {
+      return this.name;
+    }
+    public int getArrayPos() {
+      return this.arrayPos;
+    }
+    public boolean getIsVirtual() {
+      return this.isVirtual;
+    }
+
+    public void toXML(StringBuffer sb) {
+        sb.append("\t\t\t<field name='");
+        sb.append(name);
+        sb.append("' ");
+        sb.append(IDLParser.OILS_NS_OBJ_PREFIX);
+        sb.append(":array_position='");
+        sb.append(arrayPos);
+        sb.append("' ");
+        sb.append(IDLParser.OILS_NS_PERSIST_PREFIX);
+        sb.append(":virtual='");
+        sb.append(isVirtual);
+        sb.append("'/>\n");
+    }
+}
diff --git a/Open-ILS/src/Android/src/org/open_ils/idl/IDLLink.java b/Open-ILS/src/Android/src/org/open_ils/idl/IDLLink.java
new file mode 100644 (file)
index 0000000..69a5772
--- /dev/null
@@ -0,0 +1,46 @@
+package org.open_ils.idl;
+
+
+public class IDLLink {
+
+   /**The field on the IDLObject this link extends from */
+   private String field;
+   private String reltype;
+   private String key;
+   private String map;
+   /**The IDL class linked to */
+   private String IDLClass;
+
+
+   public void setField(String field) {
+      this.field = field;
+   }
+   public void setReltype(String reltype) {
+      this.reltype = reltype;
+   }
+   public void setKey(String key) {
+      this.key = key;
+   }
+   public void setMap(String map) {
+      this.map = map;
+   }
+   public void setIDLClass(String IDLClass) {
+      this.IDLClass = IDLClass;
+   }
+   public String getField() {
+      return this.field;
+   }
+   public String getReltype() {
+      return this.reltype;
+   }
+   public String getKey() {
+      return this.key;
+   }
+   public String getMap() {
+      return this.map;
+   }
+   public String getIDLClass() {
+      return this.IDLClass;
+   }
+}
+
diff --git a/Open-ILS/src/Android/src/org/open_ils/idl/IDLObject.java b/Open-ILS/src/Android/src/org/open_ils/idl/IDLObject.java
new file mode 100644 (file)
index 0000000..aafde6e
--- /dev/null
@@ -0,0 +1,96 @@
+package org.open_ils.idl;
+import java.util.HashMap;
+import java.util.Iterator;
+
+
+public class IDLObject {
+
+    private String IDLClass;
+    private String fieldMapper;
+    private String controller;
+    private String rptLabel;
+    private HashMap<String, IDLField> fields;
+    private HashMap<String, IDLLink> links;
+    
+    /** true if this is a virtual object (does not live in the database) */
+    private boolean isVirtual;
+    
+    public IDLObject() {
+       fields = new HashMap<String, IDLField>();
+       links = new HashMap<String, IDLLink>();
+    }
+    
+    public String getIDLClass() {
+       return IDLClass;
+    }
+    
+    public void addLink(IDLLink link) {
+       links.put(link.getField(), link);
+    }
+    
+    public void addField(IDLField field) {
+       fields.put(field.getName(), field);
+    }
+    
+    public IDLField getField(String name) {
+        return (IDLField) fields.get(name);
+    }
+
+    public HashMap getFields() {
+        return fields;
+    }
+
+
+    /**
+     * Returns the link object found at the given field on 
+     * this IDLObject.
+     */
+    public IDLLink getLink(String fieldName) {
+        return (IDLLink) links.get(fieldName);
+    }
+    
+    public String getFieldMapper() {
+       return fieldMapper;
+    }
+    
+    public String getController() {
+       return controller;
+    }
+    
+    public String getRptLabel() {
+       return rptLabel;
+    }
+    public boolean isVirtual() {
+       return isVirtual;
+    }
+    
+    public void setIDLClass(String IDLClass) {
+       this.IDLClass = IDLClass;
+    }
+    
+    public void setFieldMapper(String fm) {
+       this.fieldMapper = fm;
+    }
+    public void setController(String controller) {
+       this.controller = controller;
+    }
+    public void setRptLabel(String label) {
+       this.rptLabel = label;
+    }
+    public void setIsVirtual(boolean isVirtual) {
+       this.isVirtual = isVirtual;
+    }
+
+
+    public void toXML(StringBuffer sb) {
+
+        sb.append("\t\t<fields>");
+        Iterator itr = fields.keySet().iterator();        
+        IDLField field;
+        while(itr.hasNext()) {
+            field = fields.get((String) itr.next()); 
+            field.toXML(sb);
+        }
+        sb.append("\t\t</fields>");
+    }
+}
diff --git a/Open-ILS/src/Android/src/org/open_ils/idl/IDLParser.java b/Open-ILS/src/Android/src/org/open_ils/idl/IDLParser.java
new file mode 100644 (file)
index 0000000..dbfa507
--- /dev/null
@@ -0,0 +1,217 @@
+package org.open_ils.idl;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.opensrf.util.OSRFRegistry;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+import android.util.Log;
+
+
+public class IDLParser {
+
+    public static final String OILS_NS_BASE="http://opensrf.org/spec/IDL/base/v1";
+    public static final String OILS_NS_OBJ="http://open-ils.org/spec/opensrf/IDL/objects/v1";
+    public static final String OILS_NS_OBJ_PREFIX="oils_obj";
+    public static final String OILS_NS_PERSIST="http://open-ils.org/spec/opensrf/IDL/persistence/v1";
+    public static final String OILS_NS_PERSIST_PREFIX="oils_persist";
+    public static final String OILS_NS_REPORTER="http://open-ils.org/spec/opensrf/IDL/reporter/v1";
+    public static final String OILS_NS_REPORTER_PREFIX="reporter";
+
+    /** The source for the IDL XML */
+    InputStream inStream;
+    HashMap<String, IDLObject> IDLObjects;
+    IDLObject current;
+    private int fieldIndex;
+
+    /** If true, we retain the full set of IDL objects in memory.  This is true by default. */
+    private boolean keepIDLObjects;
+
+    private int parsedObjectCount;
+
+    public IDLParser() {
+        IDLObjects = new HashMap<String, IDLObject>();
+        keepIDLObjects = true;
+        parsedObjectCount = 0;
+        fieldIndex = 0;
+    }
+
+    public IDLParser(String fileName) throws IOException {
+        this(new FileInputStream(fileName));
+    }
+
+    public IDLParser(InputStream inStream) {
+        this();
+        this.inStream = inStream;
+    }
+
+
+    /**
+    * Parses the IDL XML
+    */
+    public void parse() throws IOException, IDLException {
+    
+        try {
+            //XMLInputFactory factory = XMLInputFactory.newInstance();
+            
+            XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
+            factory.setNamespaceAware(true);
+            XmlPullParser xpp = factory.newPullParser();
+
+            xpp.setInput(this.inStream,null );
+            int eventType = xpp.getEventType();
+
+            /** disable as many unused features as possible to speed up the parsing */
+            /*
+            factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.FALSE);
+            factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
+            factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE);
+            factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);
+            factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE);
+             */
+    
+        /** create the stream reader */
+    
+            while(eventType != XmlPullParser.END_DOCUMENT) {
+                /** cycle through the XML events */
+    
+               // eventType = reader.next();
+    
+                switch(eventType) {
+    
+                    case XmlPullParser.START_TAG:
+                        handleStartElement(xpp);
+                        break;
+    
+                    case XmlPullParser.END_TAG: 
+                        handleEndElement(xpp);
+                        break;
+                }
+                eventType = xpp.next();
+            }
+
+        } catch(XmlPullParserException se) {
+            throw new IDLException("Error parsing IDL XML", se);
+        }
+   }
+
+    /**
+    * Returns the IDLObject with the given IDLClass 
+    */
+    public IDLObject getObject(String IDLClass) {
+      return (IDLObject) IDLObjects.get(IDLClass);
+    }
+
+    /**
+     * Returns the full set of IDL objects as a hash from classname to object.
+     * If keepIDLObjects is false, the map will be empty.
+     */
+    public HashMap<String, IDLObject> getIDLObjects() {
+        return IDLObjects;
+    }
+
+    /**
+     * Returns the number of parsed objects, regardless of the keepIDLObjects setting.
+     */
+    public int getObjectCount() {
+        return parsedObjectCount;
+    }
+
+
+    public void handleStartElement(XmlPullParser reader) {
+
+        if(!OILS_NS_BASE.equals(reader.getNamespace())) return;
+        String localpart = reader.getName();
+    
+        if( "class".equals(localpart) ) {
+            fieldIndex = 0;
+            current = new IDLObject();
+            current.setIDLClass(reader.getAttributeValue(null, "id"));
+            current.setController(reader.getAttributeValue(null, "controller"));
+            String persist = reader.getAttributeValue(OILS_NS_PERSIST, "virtual");
+            current.setIsVirtual("persist".equals(reader.getAttributeValue(OILS_NS_PERSIST, "virtual")));
+            return;
+        }
+    
+        if( "field".equals(localpart) ) {
+            IDLField field = new IDLField();
+            field.setName(reader.getAttributeValue(null, "name"));
+            field.setArrayPos(fieldIndex++);
+            field.setIsVirtual("true".equals(reader.getAttributeValue(OILS_NS_PERSIST, "virtual")));
+            current.addField(field);
+            //Log.d("parser","Field " + localpart + " " + field );
+        }
+
+        if( "link".equals(localpart) ) {
+            IDLLink link = new IDLLink();
+            link.setField(reader.getAttributeValue(null, "field"));
+            link.setReltype(reader.getAttributeValue(null, "reltype"));
+            link.setKey(reader.getAttributeValue(null, "key"));
+            link.setMap(reader.getAttributeValue(null, "map"));
+            link.setIDLClass(reader.getAttributeValue(null, "class"));
+            current.addLink(link);
+        }
+    }
+
+    public void handleEndElement(XmlPullParser reader) throws IDLException {
+
+        if(!OILS_NS_BASE.equals(reader.getNamespace())) return;
+        String localpart = reader.getName();
+
+        if("class".equals(localpart)) {
+
+            if(keepIDLObjects)
+                IDLObjects.put(current.getIDLClass(), current);
+
+            HashMap fields = current.getFields();
+            String fieldNames[] = new String[fields.size()];
+
+            for(Iterator itr = fields.keySet().iterator(); itr.hasNext(); ) {
+                String key = (String) itr.next();
+                IDLField field = (IDLField) fields.get(key);
+                try {
+                    fieldNames[ field.getArrayPos() ] = field.getName();
+                } catch(ArrayIndexOutOfBoundsException E) {
+                    String msg = "class="+current.getIDLClass()+";field="+key+
+                        ";fieldcount="+fields.size()+";currentpos="+field.getArrayPos();
+                    throw new IDLException(msg, E);
+                }
+            }
+
+            OSRFRegistry.registerObject(
+                current.getIDLClass(), OSRFRegistry.WireProtocol.ARRAY, fieldNames);
+
+            parsedObjectCount++;
+
+            current = null;
+        }
+    }
+
+
+    public String toXML() {
+        StringBuffer sb = new StringBuffer();
+        Set keys = IDLObjects.keySet();
+        Iterator itr = IDLObjects.keySet().iterator();
+        String IDLClass;
+        IDLObject obj;
+        while(itr.hasNext()) {
+            IDLClass = (String) itr.next();
+            obj = IDLObjects.get(IDLClass);
+            obj.toXML(sb);
+        }
+        return sb.toString();
+    }
+}
+
+
+
+
+
+
diff --git a/Open-ILS/src/Android/src/org/open_ils/test/TestIDL.java b/Open-ILS/src/Android/src/org/open_ils/test/TestIDL.java
new file mode 100644 (file)
index 0000000..632c28e
--- /dev/null
@@ -0,0 +1,24 @@
+package org.open_ils.test;
+import org.open_ils.idl.*;
+import org.opensrf.*;
+import org.opensrf.util.*;
+
+public class TestIDL {
+    public static void main(String args[]) throws Exception {
+        String idlFile = "fm_IDL.xml";
+        IDLParser parser = new IDLParser(idlFile);
+        parser.parse();
+        //System.out.print(parser.toXML());
+
+        OSRFObject bre = new OSRFObject("bre");
+        bre.put("id", new Integer(1));
+        bre.put("isnew", new Boolean(false));
+        bre.put("isdeleted", new Boolean(true));
+        
+        
+        System.out.println(bre);
+        System.out.println(new JSONWriter(bre).write());
+        
+        
+    }
+}
diff --git a/Open-ILS/src/Android/src/org/open_ils/test/TestLogin.java b/Open-ILS/src/Android/src/org/open_ils/test/TestLogin.java
new file mode 100644 (file)
index 0000000..265fa37
--- /dev/null
@@ -0,0 +1,29 @@
+package org.open_ils.test;
+import org.open_ils.util.Utils;
+import org.open_ils.Event;
+import org.opensrf.*;
+import java.util.Map;
+import java.util.HashMap;
+
+
+public class TestLogin {
+    public static void main(String args[]) {
+        try {
+
+            if(args.length < 3) {
+                System.err.println("usage: java org.open_ils.test.TestLogin <opensrf_config> <username> <password>");
+                return;
+            }
+
+            Sys.bootstrapClient(args[0], "/config/opensrf");
+            Map<String,String> params = new HashMap<String,String>();
+            params.put("username", args[1]);
+            params.put("password", args[2]);
+            Event evt = Utils.login(params);
+            System.out.println(evt);
+        } catch(Exception e) {
+            System.err.println(e);
+        }
+    }
+}
+
diff --git a/Open-ILS/src/Android/src/org/open_ils/util/Utils.java b/Open-ILS/src/Android/src/org/open_ils/util/Utils.java
new file mode 100644 (file)
index 0000000..ba61a1b
--- /dev/null
@@ -0,0 +1,77 @@
+package org.open_ils.util;
+import org.open_ils.*;
+import org.opensrf.*;
+import org.opensrf.util.*;
+import java.util.Map;
+import java.util.HashMap;
+import java.security.MessageDigest;
+
+public class Utils {
+    
+    /**
+     * Logs in.
+     * @param params Login arguments, which may consist of<br/>
+     * username<br/>
+     * barcode - if username is provided, barcode will be ignored<br/>
+     * password<br/>
+     * workstation - name of the workstation where the login is occuring<br/>
+     * type - type of login, currently "opac", "staff", and "temp"<br/>
+     * org - optional org ID to provide login context when no workstation is used.
+     * @return An Event object.  On success, the event 'payload' will contain
+     * 'authtoken' and 'authtime' fields, which represent the session key and 
+     * session inactivity timeout, respectively.
+     */
+    public static Event login(Map params) throws MethodException {
+
+        Map<String, String> initMap = new HashMap<String, String>();
+        String init = (params.get("username") != null) ? 
+            params.get("username").toString() : params.get("barcode").toString();
+            System.out.println("Here");
+            
+        Object resp = ClientSession.atomicRequest(
+            "open-ils.auth",
+            "open-ils.auth.authenticate.init", new Object [] {initMap});
+        System.out.println("Here");
+        /** see if the server responded with some type of unexpected event */
+        
+        Event evt = Event.parseEvent(resp);
+        if(evt != null) return evt;
+
+        params.put("password", md5Hex(resp + md5Hex(params.get("password").toString())));
+
+        resp = ClientSession.atomicRequest(
+            "open-ils.auth",
+            "open-ils.auth.authenticate.complete", new Object[]{params});
+
+        return Event.parseEvent(resp);
+    }
+
+
+    /**
+     * Generates the hex md5sum of a string.
+     * @param s The string to md5sum
+     * @return The 32-character hex md5sum
+     */
+    public static String md5Hex(String s) {
+        StringBuffer sb = new StringBuffer();
+        MessageDigest md;
+        try {
+            md = MessageDigest.getInstance("MD5");
+        } catch(Exception e) {
+            return null;
+        }
+
+        md.update(s.getBytes());
+        byte[] digest = md.digest();
+        for (int i = 0; i < digest.length; i++) {
+            int b = digest[i] & 0xff;
+            String hex = Integer.toHexString(b);
+            if (hex.length() == 1) sb.append("0");
+            sb.append(hex);
+        }
+        return sb.toString();
+    }
+}
+
+
+