From b147bcd379f889e60fda61e48aac915eebc016b7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 15 Nov 2012 08:50:04 -0500 Subject: v4: document headers, metadata rearranged, wide-ranging effect --- lib/sisu/v4/shared_metadata.rb | 113 +++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 54 deletions(-) (limited to 'lib/sisu/v4/shared_metadata.rb') diff --git a/lib/sisu/v4/shared_metadata.rb b/lib/sisu/v4/shared_metadata.rb index 32555776..74d76c1e 100644 --- a/lib/sisu/v4/shared_metadata.rb +++ b/lib/sisu/v4/shared_metadata.rb @@ -104,6 +104,11 @@ module SiSU_Metadata @tag,@inf,@class=tr.digitized_by,@md.creator.digitized_by,'ext' meta << self.meta_para end + if defined? @md.creator.contributor \ + and @md.creator.contributor=~/\S+/ + @tag,@inf,@class=tr.contributor,@md.creator.contributor,'dc' #6 + meta << self.meta_para + end if defined? @md.rights.all \ and @md.rights.all=~/\S+/ @tag,@inf,@class=tr.rights,@md.rights.all,'dc' #15 @@ -114,24 +119,24 @@ module SiSU_Metadata @tag,@inf,@class=tr.subject,@md.classify.subject,'dc' #3 meta << self.meta_para end - if defined? @md.notes.description \ - and @md.notes.description=~/\S+/ - @tag,@inf,@class=tr.description,@md.notes.description,'dc' #4 + if defined? @md.classify.keywords \ + and @md.classify.keywords=~/\S+/ + @tag,@inf,@class=tr.keywords,@md.classify.keywords,'ext' meta << self.meta_para end - if defined? @md.publisher \ - and @md.publisher=~/\S+/ - @tag,@inf,@class=tr.publisher,@md.publisher,'dc' #5 + if defined? @md.classify.loc \ + and @md.classify.loc=~/\S+/ + @tag,@inf,@class=tr.cls_loc,@md.classify.loc,'id' meta << self.meta_para end - if defined? @md.creator.contributor \ - and @md.creator.contributor=~/\S+/ - @tag,@inf,@class=tr.contributor,@md.creator.contributor,'dc' #6 + if defined? @md.classify.dewey \ + and @md.classify.dewey=~/\S+/ + @tag,@inf,@class=tr.cls_dewey,@md.classify.dewey,'id' meta << self.meta_para end - if defined? @md.notes.abstract \ - and @md.notes.abstract=~/\S+/ - @tag,@inf,@class=tr.abstract,@md.notes.abstract,'ext' + if defined? @md.publisher \ + and @md.publisher=~/\S+/ + @tag,@inf,@class=tr.publisher,@md.publisher,'dc' #5 meta << self.meta_para end if defined? @md.date.created \ @@ -164,29 +169,24 @@ module SiSU_Metadata @tag,@inf,@class=tr.date,@md.date.published,'dc' #7 meta << self.meta_para end - if defined? @md.type \ - and @md.date=~/\S+/ - @tag,@inf,@class=tr.type,@md.type,'dc' #8 - meta << self.meta_para - end - if defined? @md.classify.loc \ - and @md.classify.loc=~/\S+/ - @tag,@inf,@class=tr.cls_loc,@md.classify.loc,'id' + if defined? @md.identifier.isbn \ + and @md.identifier.isbn=~/\S+/ + @tag,@inf,@class=tr.cls_isbn,@md.identifier.isbn,'id' meta << self.meta_para end - if defined? @md.classify.dewey \ - and @md.classify.dewey=~/\S+/ - @tag,@inf,@class=tr.cls_dewey,@md.classify.dewey,'id' + if defined? @md.identifier.oclc \ + and @md.identifier.oclc=~/\S+/ + @tag,@inf,@class=tr.cls_oclc,@md.identifier.oclc,'id' meta << self.meta_para end - if defined? @md.classify.pg \ - and @md.classify.pg=~/\S+/ - @tag,@inf,@class=tr.cls_gutenberg,@md.classify.pg,'id' + if defined? @md.notes.description \ + and @md.notes.description=~/\S+/ + @tag,@inf,@class=tr.description,@md.notes.description,'dc' #4 meta << self.meta_para end - if defined? @md.classify.isbn \ - and @md.classify.isbn=~/\S+/ - @tag,@inf,@class=tr.cls_isbn,@md.classify.isbn,'id' + if defined? @md.notes.abstract \ + and @md.notes.abstract=~/\S+/ + @tag,@inf,@class=tr.abstract,@md.notes.abstract,'ext' meta << self.meta_para end if defined? @md.notes.comment \ @@ -194,6 +194,36 @@ module SiSU_Metadata @tag,@inf,@class=tr.comments,@md.notes.comment,'ext' meta << self.meta_para end + if defined? @md.notes.coverage \ + and @md.notes.coverage=~/\S+/ + @tag,@inf,@class=tr.coverage,@md.notes.coverage,'dc' #14 + meta << self.meta_para + end + if defined? @md.notes.relation \ + and @md.notes.relation=~/\S+/ + @tag,@inf,@class=tr.relation,@md.notes.relation,'dc' #13 + meta << self.meta_para + end + #if defined? @md.notes.source \ + #and @md.notes.source=~/\S+/ + # @tag,@inf,@class=tr.source,@md.notes.source,'dc' #11 + # meta << self.meta_para + #end + if defined? @md.notes.history \ + and @md.notes.history=~/\S+/ + @tag,@inf,@class=tr.type,@md.notes.history,'dc' #8 + meta << self.meta_para + end + if defined? @md.notes.type \ + and @md.notes.type=~/\S+/ + @tag,@inf,@class=tr.type,@md.notes.type,'dc' #8 + meta << self.meta_para + end + if defined? @md.notes.format \ + and @md.notes.format=~/\S+/ + @tag,@inf,@class=tr.format,@md.notes.format,'dc' #9 + meta << self.meta_para + end if defined? @md.notes.prefix_a \ and @md.notes.prefix_a=~/\S+/ @tag,@inf,@class=tr.prefix_a,@md.notes.prefix_a,'inf' @@ -204,11 +234,6 @@ module SiSU_Metadata @tag,@inf,@class=tr.prefix_b,@md.notes.prefix_b,'inf' meta << self.meta_para end - if defined? @md.classify.identifier \ - and @md.classify.identifier=~/\S+/ - @tag,@inf,@class=tr.identifier,@md.classify.identifier,'dc' #10 - meta << self.meta_para - end if defined? @md.original.source \ and @md.original.source=~/\S+/ @tag,@inf,@class=tr.source,@md.original.source,'dc' #11 @@ -224,26 +249,6 @@ module SiSU_Metadata @tag,@inf,@class=tr.language_original,@md.original.language,'ext' meta << self.meta_para end - if defined? @md.classify.format \ - and @md.classify.format=~/\S+/ - @tag,@inf,@class=tr.format,@md.classify.format,'dc' #9 - meta << self.meta_para - end - if defined? @md.classify.relation \ - and @md.classify.relation=~/\S+/ - @tag,@inf,@class=tr.relation,@md.classify.relation,'dc' #13 - meta << self.meta_para - end - if defined? @md.classify.coverage \ - and @md.classify.coverage=~/\S+/ - @tag,@inf,@class=tr.coverage,@md.classify.coverage,'dc' #14 - meta << self.meta_para - end - if defined? @md.classify.keywords \ - and @md.classify.keywords=~/\S+/ - @tag,@inf,@class=tr.keywords,@md.classify.keywords,'ext' - meta << self.meta_para - end if @display_heading @tag,@inf=%{Version Information},'' meta << self.meta_para -- cgit v1.2.3