[open-ils-commits] r12464 - in trunk/Open-ILS/src: perlmods/OpenILS/Application perlmods/OpenILS/Utils sql/Pg (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Mar 7 16:34:48 EST 2009
Author: dbs
Date: 2009-03-07 16:34:43 -0500 (Sat, 07 Mar 2009)
New Revision: 12464
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
trunk/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
Upgrade to MODS 3.3 for ingest and ModsParser.pm; use an explicit format for config.metabib_field in seed data
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm 2009-03-07 19:47:23 UTC (rev 12463)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm 2009-03-07 21:34:43 UTC (rev 12464)
@@ -20,6 +20,7 @@
use Time::HiRes qw(time);
our %supported_formats = (
+ mods33 => {ns => 'http://www.loc.gov/mods/v3'},
mods32 => {ns => 'http://www.loc.gov/mods/v3'},
mods3 => {ns => 'http://www.loc.gov/mods/v3'},
mods => {ns => 'http://www.loc.gov/mods/'},
@@ -74,6 +75,12 @@
$supported_formats{mods32}{xslt} = $xslt->parse_stylesheet( $xslt_doc );
}
+ unless ($supported_formats{mods33}{xslt}) {
+ $log->debug("Loading MODS v33 XSLT", DEBUG);
+ my $xslt_doc = $parser->parse_file( $xsldir . "/MARC21slim2MODS33.xsl");
+ $supported_formats{mods33}{xslt} = $xslt->parse_stylesheet( $xslt_doc );
+ }
+
my $req = OpenSRF::AppSession
->create('open-ils.cstore')
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm 2009-03-07 19:47:23 UTC (rev 12463)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm 2009-03-07 21:34:43 UTC (rev 12464)
@@ -321,7 +321,7 @@
if(!$mods_sheet) {
my $xslt_doc = $parser->parse_file(
- OpenSRF::Utils::SettingsClient->new->config_value(dirs => 'xsl') . "/MARC21slim2MODS32.xsl");
+ OpenSRF::Utils::SettingsClient->new->config_value(dirs => 'xsl') . "/MARC21slim2MODS33.xsl");
$mods_sheet = $xslt->parse_stylesheet( $xslt_doc );
}
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-03-07 19:47:23 UTC (rev 12463)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-03-07 21:34:43 UTC (rev 12464)
@@ -138,7 +138,7 @@
name TEXT NOT NULL,
xpath TEXT NOT NULL,
weight INT NOT NULL DEFAULT 1,
- format TEXT NOT NULL DEFAULT 'mods32',
+ format TEXT NOT NULL DEFAULT 'mods33',
search_field BOOL NOT NULL DEFAULT TRUE,
facet_field BOOL NOT NULL DEFAULT FALSE
);
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-03-07 19:47:23 UTC (rev 12463)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-03-07 21:34:43 UTC (rev 12464)
@@ -11,38 +11,38 @@
INSERT INTO config.standing (id, value) VALUES (2, oils_i18n_gettext(2, 'Barred', 'cst', 'value'));
SELECT SETVAL('config.standing_id_seq'::TEXT, 100);
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'series', 'seriestitle', $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'title', 'abbreviated', $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='abbreviated')]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'title', 'translated', $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='translated')]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'title', 'alternative', $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='alternative')]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'title', 'uniform', $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='uniform')]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'title', 'proper', $$//mods32:mods/mods32:titleInfo[mods32:title and not (@type)]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'author', 'corporate', $$//mods32:mods/mods32:name[@type='corporate']/mods32:namePart[../mods32:role/mods32:roleTerm[text()='creator']]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'author', 'personal', $$//mods32:mods/mods32:name[@type='personal']/mods32:namePart[../mods32:role/mods32:roleTerm[text()='creator']]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'author', 'conference', $$//mods32:mods/mods32:name[@type='conference']/mods32:namePart[../mods32:role/mods32:roleTerm[text()='creator']]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'author', 'other', $$//mods32:mods/mods32:name[@type='personal']/mods32:namePart[not(../mods32:role)]$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'subject', 'geographic', $$//mods32:mods/mods32:subject/mods32:geographic$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'subject', 'name', $$//mods32:mods/mods32:subject/mods32:name$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'subject', 'temporal', $$//mods32:mods/mods32:subject/mods32:temporal$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'subject', 'topic', $$//mods32:mods/mods32:subject/mods32:topic$$ );
---INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
--- ( field_class, name, xpath ) VALUES ( 'subject', 'genre', $$//mods32:mods/mods32:genre$$ );
-INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES
- ( 'keyword', 'keyword', $$//mods32:mods/*[not(local-name()='originInfo')]$$ ); -- /* to fool vim */;
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'series', 'seriestitle', 'mods33', $$//mods33:mods/mods33:relatedItem[@type="series"]/mods33:titleInfo$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'title', 'abbreviated', 'mods33', $$//mods33:mods/mods33:titleInfo[mods33:title and (@type='abbreviated')]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'title', 'translated', 'mods33', $$//mods33:mods/mods33:titleInfo[mods33:title and (@type='translated')]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'title', 'alternative', 'mods33', $$//mods33:mods/mods33:titleInfo[mods33:title and (@type='alternative')]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'title', 'uniform', 'mods33', $$//mods33:mods/mods33:titleInfo[mods33:title and (@type='uniform')]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'title', 'proper', 'mods33', $$//mods33:mods/mods33:titleInfo[mods33:title and not (@type)]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'author', 'corporate', 'mods33', $$//mods33:mods/mods33:name[@type='corporate']/mods33:namePart[../mods33:role/mods33:roleTerm[text()='creator']]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'author', 'personal', 'mods33', $$//mods33:mods/mods33:name[@type='personal']/mods33:namePart[../mods33:role/mods33:roleTerm[text()='creator']]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'author', 'conference', 'mods33', $$//mods33:mods/mods33:name[@type='conference']/mods33:namePart[../mods33:role/mods33:roleTerm[text()='creator']]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'author', 'other', 'mods33', $$//mods33:mods/mods33:name[@type='personal']/mods33:namePart[not(../mods33:role)]$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'subject', 'geographic', 'mods33', $$//mods33:mods/mods33:subject/mods33:geographic$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'subject', 'name', 'mods33', $$//mods33:mods/mods33:subject/mods33:name$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'subject', 'temporal', 'mods33', $$//mods33:mods/mods33:subject/mods33:temporal$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'subject', 'topic', 'mods33', $$//mods33:mods/mods33:subject/mods33:topic$$ );
+--INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+-- ( field_class, name, xpath ) VALUES ( 'subject', 'genre', 'mods33', $$//mods33:mods/mods33:genre$$ );
+INSERT INTO config.metabib_field ( field_class, name, format, xpath ) VALUES
+ ( 'keyword', 'keyword', 'mods33', $$//mods33:mods/*[not(local-name()='originInfo')]$$ ); -- /* to fool vim */;
INSERT INTO config.non_cataloged_type ( id, owning_lib, name ) VALUES ( 1, 1, oils_i18n_gettext(1, 'Paperback Book', 'cnct', 'name') );
SELECT SETVAL('config.non_cataloged_type_id_seq'::TEXT, 100);
More information about the open-ils-commits
mailing list