LP#1744385: Final seed data fixups
authorMike Rylander <mrylander@gmail.com>
Fri, 23 Feb 2018 15:32:19 +0000 (10:32 -0500)
committerDan Wells <dbw2@calvin.edu>
Wed, 28 Feb 2018 21:19:50 +0000 (16:19 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql
Open-ILS/src/sql/Pg/954.data.MODS33-xsl.sql
Open-ILS/src/sql/Pg/upgrade/WWWW.data.display-field-seed-data.sql
Open-ILS/src/sql/Pg/upgrade/YYYY.data.mods-title-punctuation-change.sql
Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.virtual_index_defs.sql

index fb829c6..ab4468d 100644 (file)
@@ -214,7 +214,7 @@ INSERT INTO config.metabib_field ( id, field_class, name, label,
 INSERT INTO config.metabib_field (id, field_class, name,
     label, xpath, display_field, search_field, browse_field)
 VALUES (
-    38, 'keyword', 'edition',
+    38, 'identifier', 'edition',
     oils_i18n_gettext(38, 'Edition', 'cmf', 'label'),
     $$//mods33:mods/mods33:originInfo//mods33:edition[1]$$,
     TRUE, TRUE, FALSE
@@ -232,7 +232,7 @@ VALUES (
 INSERT INTO config.metabib_field (id, field_class, name,
     label, xpath, display_field, search_field, browse_field)
 VALUES (
-    40, 'keyword', 'publisher',
+    40, 'identifier', 'publisher',
     oils_i18n_gettext(40, 'Publisher', 'cmf', 'label'),
     $$//mods33:mods/mods33:originInfo//mods33:publisher[1]$$,
     TRUE, TRUE, FALSE
@@ -320,11 +320,11 @@ VALUES (
 INSERT INTO config.metabib_field (id, field_class, name, format,
     label, xpath, display_xpath, display_field, search_field, browse_field)
 VALUES (
-    52, 'keyword', 'origin_info', 'marcxml',
+    52, 'identifier', 'origin_info', 'marcxml',
     oils_i18n_gettext(52, 'Origin Info', 'cmf', 'label'),
     $$//*[@tag='260']$$,
     $$//*[local-name()='subfield' and contains('abc',@code)]$$,
-    TRUE, TRUE, FALSE
+    TRUE, FALSE, FALSE
 );
 
 INSERT INTO config.metabib_field (id, field_class, name, format, weight,
@@ -341,7 +341,7 @@ INSERT INTO config.metabib_field_virtual_map (real, virtual)
             45
       FROM  config.metabib_field
       WHERE search_field
-            AND id NOT IN (15, 45)
+            AND id NOT IN (15, 45, 38, 40)
             AND id NOT IN (SELECT real FROM config.metabib_field_virtual_map);
 
 UPDATE config.metabib_field_virtual_map SET weight = -1 WHERE real = 39;
index 69b4ce6..488c636 100644 (file)
@@ -98,6 +98,9 @@ Added Log Comment
                                                <xsl:with-param name="chopString">
                                                        <xsl:value-of select="$title"/>
                                                </xsl:with-param>
+                        <xsl:with-param name="punctuation">
+                          <xsl:text>,;/ </xsl:text>
+                        </xsl:with-param>
                                        </xsl:call-template>
                                </xsl:variable>
                                <xsl:choose>
@@ -1353,6 +1356,45 @@ Added Log Comment
                
                <!--3.2 change tmee additional note fields-->
                
+        <xsl:for-each select="marc:datafield[@tag=502]">
+            <note type="thesis">
+                <xsl:call-template name="uri"/>
+                <xsl:variable name="str">
+                    <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                        <xsl:value-of select="."/>
+                        <xsl:text> </xsl:text>
+                    </xsl:for-each>
+                </xsl:variable>
+                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+            </note>
+        </xsl:for-each>
+
+        <xsl:for-each select="marc:datafield[@tag=504]">
+            <note type="bibliography">
+                <xsl:call-template name="uri"/>
+                <xsl:variable name="str">
+                    <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                        <xsl:value-of select="."/>
+                        <xsl:text> </xsl:text>
+                    </xsl:for-each>
+                </xsl:variable>
+                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+            </note>
+        </xsl:for-each>
+
+        <xsl:for-each select="marc:datafield[@tag=508]">
+            <note type="creation/production credits">
+                <xsl:call-template name="uri"/>
+                <xsl:variable name="str">
+                    <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                        <xsl:value-of select="."/>
+                        <xsl:text> </xsl:text>
+                    </xsl:for-each>
+                </xsl:variable>
+                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+            </note>
+        </xsl:for-each>
+
                <xsl:for-each select="marc:datafield[@tag=506]">
                        <note type="restrictions">
                                <xsl:call-template name="uri"></xsl:call-template>
@@ -1460,9 +1502,7 @@ Added Log Comment
                
 
                
-               
-               
-               <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or  @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
+        <xsl:for-each select="marc:datafield[@tag=501 or @tag=507 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
                        <note>
                                <xsl:call-template name="uri"></xsl:call-template>
                                <xsl:variable name="str">
index b3670ff..e824cdc 100644 (file)
@@ -113,6 +113,9 @@ Revision 1.2 - Added Log Comment  2003/03/24 19:37:42  ckeith
                                                <xsl:with-param name="chopString">
                                                        <xsl:value-of select="$title"/>
                                                </xsl:with-param>
+                        <xsl:with-param name="punctuation">
+                          <xsl:text>,;/ </xsl:text>
+                        </xsl:with-param>
                                        </xsl:call-template>
                                </xsl:variable>
                                <xsl:choose>
@@ -1390,6 +1393,45 @@ Revision 1.2 - Added Log Comment  2003/03/24 19:37:42  ckeith
 
                <!--3.2 change tmee additional note fields-->
 
+        <xsl:for-each select="marc:datafield[@tag=502]">
+            <note type="thesis">
+                <xsl:call-template name="uri"/>
+                <xsl:variable name="str">
+                    <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                        <xsl:value-of select="."/>
+                        <xsl:text> </xsl:text>
+                    </xsl:for-each>
+                </xsl:variable>
+                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+            </note>
+        </xsl:for-each>
+
+        <xsl:for-each select="marc:datafield[@tag=504]">
+            <note type="bibliography">
+                <xsl:call-template name="uri"/>
+                <xsl:variable name="str">
+                    <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                        <xsl:value-of select="."/>
+                        <xsl:text> </xsl:text>
+                    </xsl:for-each>
+                </xsl:variable>
+                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+            </note>
+        </xsl:for-each>
+
+        <xsl:for-each select="marc:datafield[@tag=508]">
+            <note type="creation/production credits">
+                <xsl:call-template name="uri"/>
+                <xsl:variable name="str">
+                    <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                        <xsl:value-of select="."/>
+                        <xsl:text> </xsl:text>
+                    </xsl:for-each>
+                </xsl:variable>
+                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+            </note>
+        </xsl:for-each>
+
                <xsl:for-each select="marc:datafield[@tag=506]">
                        <note type="restrictions">
                                <xsl:call-template name="uri"/>
@@ -1496,7 +1538,7 @@ Revision 1.2 - Added Log Comment  2003/03/24 19:37:42  ckeith
                </xsl:for-each>
 
                <xsl:for-each
-                       select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or  @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
+            select="marc:datafield[@tag=501 or @tag=507 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
                        <note>
                                <xsl:call-template name="uri"/>
                                <xsl:variable name="str">
index 4230c34..5ec2eeb 100644 (file)
@@ -9,7 +9,7 @@ UPDATE config.metabib_field SET display_xpath = facet_xpath, display_field = TRU
 INSERT INTO config.metabib_field (id, field_class, name, 
     label, xpath, display_field, search_field, browse_field)
 VALUES (
-    38, 'keyword', 'edition', 
+    38, 'identifier', 'edition', 
     oils_i18n_gettext(38, 'Edition', 'cmf', 'label'),
     $$//mods33:mods/mods33:originInfo//mods33:edition[1]$$,
     TRUE, TRUE, FALSE
@@ -27,7 +27,7 @@ VALUES (
 INSERT INTO config.metabib_field (id, field_class, name, 
     label, xpath, display_field, search_field, browse_field)
 VALUES (
-    40, 'keyword', 'publisher', 
+    40, 'identifier', 'publisher', 
     oils_i18n_gettext(40, 'Publisher', 'cmf', 'label'),
     $$//mods33:mods/mods33:originInfo//mods33:publisher[1]$$,
     TRUE, TRUE, FALSE
@@ -112,11 +112,11 @@ VALUES (
 INSERT INTO config.metabib_field (id, field_class, name, format,
     label, xpath, display_xpath, display_field, search_field, browse_field)
 VALUES (
-    52, 'keyword', 'origin_info', 'marcxml',
+    52, 'identifier', 'origin_info', 'marcxml',
     oils_i18n_gettext(52, 'Origin Info', 'cmf', 'label'),
     $$//*[@tag='260']$$,
     $$//*[local-name()='subfield' and contains('abc',@code)]$$,
-    TRUE, TRUE, FALSE
+    TRUE, FALSE, FALSE
 );
 
 
index eb7e34e..febf832 100644 (file)
@@ -4901,7 +4901,7 @@ Revision 1.2 - Added Log Comment  2003/03/24 19:37:42  ckeith
                 </xsl:for-each>
 
                 <xsl:for-each
-                        select="marc:datafield[@tag=501 or @tag=507 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">+
+                        select="marc:datafield[@tag=501 or @tag=507 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
                         <note>
                                 <xsl:call-template name="uri"/>
                                 <xsl:variable name="str">
index 491d009..9e4e425 100644 (file)
@@ -17,7 +17,7 @@ INSERT INTO config.metabib_field_virtual_map (real, virtual)
             45
       FROM  config.metabib_field
       WHERE search_field
-            AND id NOT IN (15, 45)
+            AND id NOT IN (15, 45, 38, 40) -- keyword|keyword, self, edition, publisher
             AND id NOT IN (SELECT real FROM config.metabib_field_virtual_map);
 
 UPDATE config.metabib_field SET xpath=$$//mods32:mods/mods32:subject[not(descendant::mods32:geographicCode)]$$ WHERE id = 16;