From 361032d47d096c241d562852e71211feb0198b56 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 26 Apr 2010 21:07:14 -0400 Subject: metadata, db sql (table structure), adds OCLC number, and; html metadata, renables showing of topic_register * db (sql) add oclc (Online Computer Library Center) number, affects table structure, (hence breakage & version bump) * new db name prefix "sisu_v2c_"; new pgsql db name prefix "SiSUv2c_" * OCLC == Online Computer Library Center --- lib/sisu/v2/db_columns.rb | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v2/db_columns.rb') diff --git a/lib/sisu/v2/db_columns.rb b/lib/sisu/v2/db_columns.rb index 0c2eb367..ba861f4d 100644 --- a/lib/sisu/v2/db_columns.rb +++ b/lib/sisu/v2/db_columns.rb @@ -1425,7 +1425,7 @@ module SiSU_DB_columns end def column_comment %{COMMENT ON COLUMN metadata_and_text.#{name} - IS 'metadata classify document library of congress (if available)';} + IS 'metadata classify document Library of Congress';} end def tuple t=if defined? @md.classify.loc \ @@ -1447,7 +1447,7 @@ module SiSU_DB_columns end def column_comment %{COMMENT ON COLUMN metadata_and_text.#{name} - IS 'metadata classify document dewey (if available)';} + IS 'metadata classify document Dewey';} end def tuple t=if defined? @md.classify.dewey \ @@ -1460,6 +1460,28 @@ module SiSU_DB_columns end self end + def classify_oclc + def name + 'classify_oclc' + end + def create_column + "#{name} VARCHAR(#{Db[:col_classify_library]}) NULL," + end + def column_comment + %{COMMENT ON COLUMN metadata_and_text.#{name} + IS 'metadata classify document Online Computer Library Center number';} + end + def tuple + t=if defined? @md.classify.oclc \ + and @md.classify.oclc=~/\S+/ + txt=@md.classify.oclc + special_character_escape(txt) + ["#{name}, ","'#{txt}', "] + else ['',''] + end + end + self + end def classify_pg def name 'classify_pg' -- cgit v1.2.3