[open-ils-commits] r10624 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Sep 17 14:38:48 EDT 2008
Author: dbs
Date: 2008-09-17 14:38:44 -0400 (Wed, 17 Sep 2008)
New Revision: 10624
Modified:
trunk/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
i18nize vandelay insert statements and move them into 950.data.seed-values.sql
Modified: trunk/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/012.schema.vandelay.sql 2008-09-17 18:17:19 UTC (rev 10623)
+++ trunk/Open-ILS/src/sql/Pg/012.schema.vandelay.sql 2008-09-17 18:38:44 UTC (rev 10624)
@@ -35,22 +35,6 @@
ident BOOL NOT NULL DEFAULT FALSE
);
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath ) VALUES ('title','Title of work','//*[@tag="245"]/*[contains("abcmnopr", at code)]');
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath ) VALUES ('author','Author of work','//*[@tag="100" or @tag="110" or @tag="113"]/*[contains("ad", at code)]');
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath ) VALUES ('language','Lanuage of work','//*[@tag="240"]/*[@code="l"][1]');
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath ) VALUES ('pagination','Pagination','//*[@tag="300"]/*[@code="a"][1]');
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath, ident, remove ) VALUES ('isbn','ISBN','//*[@tag="020"]/*[@code="a"]', TRUE, $r$(?:-|\s.+$)$r$);
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath, ident, remove ) VALUES ('issn','ISSN','//*[@tag="022"]/*[@code="a"]', TRUE, $r$(?:-|\s.+$)$r$);
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath ) VALUES ('price','Price','//*[@tag="020" or @tag="022"]/*[@code="c"][1]');
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath, ident ) VALUES ('rec_identifier','Accession Number','//*[@tag="001"]', TRUE);
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath, ident ) VALUES ('eg_tcn','TCN Value','//*[@tag="901"]/*[@code="a"]', TRUE);
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath, ident ) VALUES ('eg_tcn_source','TCN Source','//*[@tag="901"]/*[@code="b"]', TRUE);
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath, ident ) VALUES ('eg_identifier','Internal ID','//*[@tag="901"]/*[@code="c"]', TRUE);
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath ) VALUES ('publisher','Publisher','//*[@tag="260"]/*[@code="b"][1]');
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath, remove ) VALUES ('pubdate','Publication Date','//*[@tag="260"]/*[@code="c"][1]',$r$\D$r$);
-INSERT INTO vandelay.bib_attr_definition ( code, description, xpath ) VALUES ('edition','Edition','//*[@tag="250"]/*[@code="a"][1]');
-
-
-- Each TEXT field (other than 'name') should hold an XPath predicate for pulling the data needed
-- DROP TABLE vandelay.import_item_attr_definition CASCADE;
CREATE TABLE vandelay.import_item_attr_definition (
@@ -83,53 +67,6 @@
CONSTRAINT vand_import_item_attr_def_idx UNIQUE (owner,name)
);
-INSERT INTO vandelay.import_item_attr_definition (
- owner, name, tag, owning_lib, circ_lib, location,
- call_number, circ_modifier, barcode, price, copy_number,
- circulate, ref, holdable, opac_visible, status
-) VALUES (
- 1,
- 'Evergreen 852 export format',
- '852',
- '[@code = "b"][1]',
- '[@code = "b"][2]',
- 'c',
- 'j',
- 'g',
- 'p',
- 'y',
- 't',
- '[@code = "x" and text() = "circulating"]',
- '[@code = "x" and text() = "reference"]',
- '[@code = "x" and text() = "holdable"]',
- '[@code = "x" and text() = "visible"]',
- 'z'
-);
-
-INSERT INTO vandelay.import_item_attr_definition (
- owner,
- name,
- tag,
- owning_lib,
- location,
- call_number,
- circ_modifier,
- barcode,
- price,
- status
-) VALUES (
- 1,
- 'Unicorn Import format -- 999',
- '999',
- 'm',
- 'l',
- 'a',
- 't',
- 'i',
- 'p',
- 'k'
-);
-
CREATE TABLE vandelay.bib_queue (
queue_type TEXT NOT NULL DEFAULT 'bib' CHECK (queue_type = 'bib'),
item_attr_def TEXT REFERENCES vandelay.import_item_attr_definition (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
@@ -642,7 +579,6 @@
remove TEXT NOT NULL DEFAULT '',
ident BOOL NOT NULL DEFAULT FALSE
);
-INSERT INTO vandelay.authority_attr_definition ( code, description, xpath, ident ) VALUES ('rec_identifier','Identifier','//*[@tag="001"]', TRUE);
CREATE TABLE vandelay.authority_queue (
queue_type TEXT NOT NULL DEFAULT 'authority' CHECK (queue_type = 'authority'),
@@ -707,5 +643,72 @@
AFTER INSERT OR UPDATE ON vandelay.queued_authority_record
FOR EACH ROW EXECUTE PROCEDURE vandelay.ingest_authority_marc();
+-- Vandelay (for importing and exporting records) 012.schema.vandelay.sql
+/*
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (1, 'title', oils_i18n_gettext(1, 'vqbrad', 'Title of work', 'description'),'//*[@tag="245"]/*[contains("abcmnopr", at code)]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (2, 'author', oils_i18n_gettext(1, 'vqbrad', 'Author of work', 'description'),'//*[@tag="100" or @tag="110" or @tag="113"]/*[contains("ad", at code)]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (3, 'language', oils_i18n_gettext(3, 'vqbrad', 'Language of work', 'description'),'//*[@tag="240"]/*[@code="l"][1]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (4, 'pagination', oils_i18n_gettext(4, 'vqbrad', 'Pagination', 'description'),'//*[@tag="300"]/*[@code="a"][1]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident, remove ) VALUES (5, 'isbn',oils_i18n_gettext(5, 'vqbrad', 'ISBN', 'description'),'//*[@tag="020"]/*[@code="a"]', TRUE, $r$(?:-|\s.+$)$r$);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident, remove ) VALUES (6, 'issn',oils_i18n_gettext(6, 'vqbrad', 'ISSN', 'description'),'//*[@tag="022"]/*[@code="a"]', TRUE, $r$(?:-|\s.+$)$r$);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (7, 'price',oils_i18n_gettext(7, 'vqbrad', 'Price', 'description'),'//*[@tag="020" or @tag="022"]/*[@code="c"][1]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident ) VALUES (8, 'rec_identifier',oils_i18n_gettext(8, 'vqbrad', 'Accession Number', 'description'),'//*[@tag="001"]', TRUE);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident ) VALUES (9, 'eg_tcn',oils_i18n_gettext(9, 'vqbrad', 'TCN Value', 'description'),'//*[@tag="901"]/*[@code="a"]', TRUE);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident ) VALUES (10, 'eg_tcn_source',oils_i18n_gettext(10, 'vqbrad', 'TCN Source', 'description'),'//*[@tag="901"]/*[@code="b"]', TRUE);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident ) VALUES (11, 'eg_identifier',oils_i18n_gettext(11, 'vqbrad', 'Internal ID', 'description'),'//*[@tag="901"]/*[@code="c"]', TRUE);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (12, 'publisher',oils_i18n_gettext(12, 'vqbrad', 'Publisher', 'description'),'//*[@tag="260"]/*[@code="b"][1]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, remove ) VALUES (13, 'pubdate',oils_i18n_gettext(13, 'vqbrad', 'Publication Date', 'description'),'//*[@tag="260"]/*[@code="c"][1]',$r$\D$r$);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (14, 'edition',oils_i18n_gettext(14, 'vqbrad', 'Edition', 'description'),'//*[@tag="250"]/*[@code="a"][1]');
+
+INSERT INTO vandelay.import_item_attr_definition (
+ owner, name, tag, owning_lib, circ_lib, location,
+ call_number, circ_modifier, barcode, price, copy_number,
+ circulate, ref, holdable, opac_visible, status
+) VALUES (
+ 1,
+ 'Evergreen 852 export format',
+ '852',
+ '[@code = "b"][1]',
+ '[@code = "b"][2]',
+ 'c',
+ 'j',
+ 'g',
+ 'p',
+ 'y',
+ 't',
+ '[@code = "x" and text() = "circulating"]',
+ '[@code = "x" and text() = "reference"]',
+ '[@code = "x" and text() = "holdable"]',
+ '[@code = "x" and text() = "visible"]',
+ 'z'
+);
+
+INSERT INTO vandelay.import_item_attr_definition (
+ owner,
+ name,
+ tag,
+ owning_lib,
+ location,
+ call_number,
+ circ_modifier,
+ barcode,
+ price,
+ status
+) VALUES (
+ 1,
+ 'Unicorn Import format -- 999',
+ '999',
+ 'm',
+ 'l',
+ 'a',
+ 't',
+ 'i',
+ 'p',
+ 'k'
+);
+
+INSERT INTO vandelay.authority_attr_definition ( code, description, xpath, ident ) VALUES ('rec_identifier','Identifier','//*[@tag="001"]', TRUE);
+*/
+
COMMIT;
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2008-09-17 18:17:19 UTC (rev 10623)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2008-09-17 18:38:44 UTC (rev 10624)
@@ -1359,3 +1359,69 @@
INSERT INTO search.relevance_adjustment (field, bump_type, multiplier) VALUES(15, 'word_order', 10);
+-- Vandelay (for importing and exporting records) 012.schema.vandelay.sql
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (1, 'title', oils_i18n_gettext(1, 'vqbrad', 'Title of work', 'description'),'//*[@tag="245"]/*[contains("abcmnopr", at code)]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (2, 'author', oils_i18n_gettext(1, 'vqbrad', 'Author of work', 'description'),'//*[@tag="100" or @tag="110" or @tag="113"]/*[contains("ad", at code)]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (3, 'language', oils_i18n_gettext(3, 'vqbrad', 'Language of work', 'description'),'//*[@tag="240"]/*[@code="l"][1]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (4, 'pagination', oils_i18n_gettext(4, 'vqbrad', 'Pagination', 'description'),'//*[@tag="300"]/*[@code="a"][1]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident, remove ) VALUES (5, 'isbn',oils_i18n_gettext(5, 'vqbrad', 'ISBN', 'description'),'//*[@tag="020"]/*[@code="a"]', TRUE, $r$(?:-|\s.+$)$r$);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident, remove ) VALUES (6, 'issn',oils_i18n_gettext(6, 'vqbrad', 'ISSN', 'description'),'//*[@tag="022"]/*[@code="a"]', TRUE, $r$(?:-|\s.+$)$r$);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (7, 'price',oils_i18n_gettext(7, 'vqbrad', 'Price', 'description'),'//*[@tag="020" or @tag="022"]/*[@code="c"][1]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident ) VALUES (8, 'rec_identifier',oils_i18n_gettext(8, 'vqbrad', 'Accession Number', 'description'),'//*[@tag="001"]', TRUE);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident ) VALUES (9, 'eg_tcn',oils_i18n_gettext(9, 'vqbrad', 'TCN Value', 'description'),'//*[@tag="901"]/*[@code="a"]', TRUE);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident ) VALUES (10, 'eg_tcn_source',oils_i18n_gettext(10, 'vqbrad', 'TCN Source', 'description'),'//*[@tag="901"]/*[@code="b"]', TRUE);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, ident ) VALUES (11, 'eg_identifier',oils_i18n_gettext(11, 'vqbrad', 'Internal ID', 'description'),'//*[@tag="901"]/*[@code="c"]', TRUE);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (12, 'publisher',oils_i18n_gettext(12, 'vqbrad', 'Publisher', 'description'),'//*[@tag="260"]/*[@code="b"][1]');
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath, remove ) VALUES (13, 'pubdate',oils_i18n_gettext(13, 'vqbrad', 'Publication Date', 'description'),'//*[@tag="260"]/*[@code="c"][1]',$r$\D$r$);
+INSERT INTO vandelay.bib_attr_definition ( id, code, description, xpath ) VALUES (14, 'edition',oils_i18n_gettext(14, 'vqbrad', 'Edition', 'description'),'//*[@tag="250"]/*[@code="a"][1]');
+
+INSERT INTO vandelay.import_item_attr_definition (
+ owner, name, tag, owning_lib, circ_lib, location,
+ call_number, circ_modifier, barcode, price, copy_number,
+ circulate, ref, holdable, opac_visible, status
+) VALUES (
+ 1,
+ 'Evergreen 852 export format',
+ '852',
+ '[@code = "b"][1]',
+ '[@code = "b"][2]',
+ 'c',
+ 'j',
+ 'g',
+ 'p',
+ 'y',
+ 't',
+ '[@code = "x" and text() = "circulating"]',
+ '[@code = "x" and text() = "reference"]',
+ '[@code = "x" and text() = "holdable"]',
+ '[@code = "x" and text() = "visible"]',
+ 'z'
+);
+
+INSERT INTO vandelay.import_item_attr_definition (
+ owner,
+ name,
+ tag,
+ owning_lib,
+ location,
+ call_number,
+ circ_modifier,
+ barcode,
+ price,
+ status
+) VALUES (
+ 1,
+ 'Unicorn Import format -- 999',
+ '999',
+ 'm',
+ 'l',
+ 'a',
+ 't',
+ 'i',
+ 'p',
+ 'k'
+);
+
+INSERT INTO vandelay.authority_attr_definition ( code, description, xpath, ident ) VALUES ('rec_identifier','Identifier','//*[@tag="001"]', TRUE);
+
+
More information about the open-ils-commits
mailing list