adding bib_level mapping table
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Apr 2008 15:07:36 +0000 (15:07 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Apr 2008 15:07:36 +0000 (15:07 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9228 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql

index fc571fe..b5862db 100644 (file)
                        <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"/>
             </actions>
         </permacrud>
        </class>
+       <class id="cblvl" controller="open-ils.cstore" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map">
+               <fields oils_persist:primary="code">
+                       <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+                       <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+                       <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+                       <field reporter:label="Bib Level Code" name="code" oils_obj:array_position="3" oils_persist:virtual="false"  reporter:datatype="text"/>
+                       <field reporter:label="Bib Level" name="value" oils_obj:array_position="4" oils_persist:virtual="false"  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_LEVEL" global_required="true"/>
+                <retrieve/>
+                <update permission="UPDATE_BIB_LEVEL" global_required="true"/>
+                <delete permission="DELETE_BIB_LEVEL" global_required="true"/>
+            </actions>
+        </permacrud>
+       </class>
        <class id="sra" controller="open-ils.cstore" 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 name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
index d6aac97..a6760e1 100644 (file)
@@ -429,5 +429,10 @@ CREATE TABLE config.item_type_map (
        value   TEXT    NOT NULL
 );
 
+CREATE TABLE config.bib_level_map (
+       code    TEXT    PRIMARY KEY,
+       value   TEXT    NOT NULL
+);
+
 COMMIT;
 
index 169c2a0..71f6010 100644 (file)
@@ -683,6 +683,14 @@ INSERT INTO config.item_type_map (code, value) VALUES ('i', oils_i18n_gettext('N
 INSERT INTO config.item_type_map (code, value) VALUES ('j', oils_i18n_gettext('Musical sound recording'));
 INSERT INTO config.item_type_map (code, value) VALUES ('m', oils_i18n_gettext('Computer file'));
 
+INSERT INTO config.bib_level_map (code, value) VALUES ('a', oils_i18n_gettext('Monographic component part'));
+INSERT INTO config.bib_level_map (code, value) VALUES ('b', oils_i18n_gettext('Serial component part'));
+INSERT INTO config.bib_level_map (code, value) VALUES ('c', oils_i18n_gettext('Collection'));
+INSERT INTO config.bib_level_map (code, value) VALUES ('d', oils_i18n_gettext('Subunit'));
+INSERT INTO config.bib_level_map (code, value) VALUES ('i', oils_i18n_gettext('Integrating resource'));
+INSERT INTO config.bib_level_map (code, value) VALUES ('m', oils_i18n_gettext('Monograph/Item'));
+INSERT INTO config.bib_level_map (code, value) VALUES ('s', oils_i18n_gettext('Serial'));
+
 --005.schema.actors.sql:
 
 -- The PINES levels