From 73be52e6d2f8fdaa1c0867271b5428a95803a289 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 10 Apr 2015 22:03:46 +0000 Subject: [PATCH] LP#1442815: teach record attributes about SKOS Add columns to the database for storing URIs of SKOS vocabularies and concepts. In particular: - add a vocabulary column to config.record_attr_definition to store the URI of the published vocabulary associated with the record attribute - add a concept_uri column to config.coded_value_map Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- Open-ILS/examples/fm_IDL.xml | 2 ++ Open-ILS/src/sql/Pg/002.schema.config.sql | 10 ++++++++-- ..._1of2.schema.teach_record_attributes_about_skos.sql | 9 +++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/lp1442815_1of2.schema.teach_record_attributes_about_skos.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 1fc96954d5..5983733b83 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -873,6 +873,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + @@ -1040,6 +1041,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index a11069e969..02cea6886d 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -792,7 +792,11 @@ CREATE TABLE config.record_attr_definition ( fixed_field TEXT, -- should exist in config.marc21_ff_pos_map.fixed_field -- For phys-char fields - phys_char_sf INT REFERENCES config.marc21_physical_characteristic_subfield_map (id) + phys_char_sf INT REFERENCES config.marc21_physical_characteristic_subfield_map (id), + +-- Source of vocabulary terms for this record attribute; +-- typically will be a URI referring to a SKOS vocabulary + vocabulary TEXT ); CREATE TABLE config.record_attr_index_norm_map ( @@ -811,7 +815,9 @@ CREATE TABLE config.coded_value_map ( description TEXT, opac_visible BOOL NOT NULL DEFAULT TRUE, -- For TPac selectors search_label TEXT, - is_simple BOOL NOT NULL DEFAULT FALSE + is_simple BOOL NOT NULL DEFAULT FALSE, + concept_uri TEXT -- URI expressing the SKOS concept that the + -- coded value represents ); CREATE VIEW config.language_map AS SELECT code, value FROM config.coded_value_map WHERE ctype = 'item_lang'; diff --git a/Open-ILS/src/sql/Pg/upgrade/lp1442815_1of2.schema.teach_record_attributes_about_skos.sql b/Open-ILS/src/sql/Pg/upgrade/lp1442815_1of2.schema.teach_record_attributes_about_skos.sql new file mode 100644 index 0000000000..0b8de3448b --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/lp1442815_1of2.schema.teach_record_attributes_about_skos.sql @@ -0,0 +1,9 @@ +BEGIN; + +ALTER TABLE config.record_attr_definition + ADD COLUMN vocabulary TEXT; + +ALTER TABLE config.coded_value_map + ADD COLUMN concept_uri TEXT; + +COMMIT; -- 2.43.2