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/xml_md_oai_pmh_dc.rb | 83 ++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 41 deletions(-) (limited to 'lib/sisu/v4/xml_md_oai_pmh_dc.rb') diff --git a/lib/sisu/v4/xml_md_oai_pmh_dc.rb b/lib/sisu/v4/xml_md_oai_pmh_dc.rb index 6abbe30e..56e19e0e 100644 --- a/lib/sisu/v4/xml_md_oai_pmh_dc.rb +++ b/lib/sisu/v4/xml_md_oai_pmh_dc.rb @@ -90,95 +90,96 @@ WOK @oai_pmh << %{ #{txt}\n} end if defined? @md.classify.subject \ - and @md.classify.subject=~/\S+/ # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) + and @md.classify.subject=~/\S+/ # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) txt=meta_content_clean(@md.classify.subject) @oai_pmh << %{ #{txt}\n} end - if defined? @md.notes.description \ - and @md.notes.description=~/\S+/ # DublinCore 4 - description - txt=meta_content_clean(@md.notes.description) - @oai_pmh << %{ #{txt}\n} + if defined? @md.classify.keywords \ + and @md.classify.keywords=~/\S+/ + txt=meta_content_clean(@md.classify.keywords) + @oai_pmh << %{ #{txt}\n} end - if @md.publisher # DublinCore 5 - publisher (current copy published by) + if @md.publisher # DublinCore 5 - publisher (current copy published by) txt=meta_content_clean(@md.publisher) @oai_pmh << %{ #{txt}\n} end if defined? @md.creator.contributor \ - and @md.creator.contributor=~/\S+/ # DublinCore 6 - contributor + and @md.creator.contributor=~/\S+/ # DublinCore 6 - contributor txt=meta_content_clean(@md.creator.contributor) @oai_pmh << %{ #{txt}\n} end if defined? @md.date.published \ - and @md.date.published=~/\S+/ # DublinCore 7 - date year-mm-dd + and @md.date.published=~/\S+/ # DublinCore 7 - date year-mm-dd @oai_pmh << %{ #{@md.date.published}\n} end if defined? @md.date.created \ - and @md.date.created=~/\S+/ # DublinCore 7 - date.created + and @md.date.created=~/\S+/ # DublinCore 7 - date.created @oai_pmh << %{ #{@md.date.created}\n} end if defined? @md.date.issued \ - and @md.date.issued=~/\S+/ # DublinCore 7 - date.issued + and @md.date.issued=~/\S+/ # DublinCore 7 - date.issued @oai_pmh << %{ #{@md.date.issued}\n} end if defined? @md.date.available \ - and @md.date.available=~/\S+/ # DublinCore 7 - date.available + and @md.date.available=~/\S+/ # DublinCore 7 - date.available @oai_pmh << %{ #{@md.date.available}\n} end if defined? @md.date.valid \ - and @md.date.valid=~/\S+/ # DublinCore 7 - date.valid + and @md.date.valid=~/\S+/ # DublinCore 7 - date.valid @oai_pmh << %{ #{@md.date.valid}\n} end if defined? @md.date.modified \ - and @md.date.modified=~/\S+/ # DublinCore 7 - date.modified + and @md.date.modified=~/\S+/ # DublinCore 7 - date.modified @oai_pmh << %{ #{@md.date.modified}\n} end - if @md.type # DublinCore 8 - type - txt=meta_content_clean(@md.type) + if defined? @md.notes.description \ + and @md.notes.description=~/\S+/ # DublinCore 4 - description + txt=meta_content_clean(@md.notes.description) + @oai_pmh << %{ #{txt}\n} + end + if defined? @md.notes.coverage \ + and @md.notes.coverage=~/\S+/ # DublinCore 14 - coverage + txt=meta_content_clean(@md.notes.coverage) + @oai_pmh << %{ #{txt}\n} + end + if defined? @md.notes.relation \ + and @md.notes.relation=~/\S+/ # DublinCore 13 - relation + txt=meta_content_clean(@md.notes.relation) + @oai_pmh << %{ #{txt}\n} + end + if defined? @md.notes.type \ + and @md.notes.type=~/\S+/ # DublinCore 8 - type + txt=meta_content_clean(@md.notes.type) @oai_pmh << %{ #{txt}\n} end - if defined? @md.classify.format \ - and @md.classify.format=~/\S+/ # DublinCore 9 - format - txt=meta_content_clean(@md.classify.format) + if defined? @md.notes.format \ + and @md.notes.format=~/\S+/ # DublinCore 9 - format + txt=meta_content_clean(@md.notes.format) @oai_pmh << %{ #{txt}\n} end - if defined? @md.classify.identifier \ - and @md.classify.identifier=~/\S+/ # DublinCore 10 - identifier - txt=meta_content_clean(@md.classify.identifier) - @oai_pmh << %{ #{txt}\n} - end + #if defined? @md.identifier.sisupod \ + #and @md.identifier.sisupod=~/\S+/ # DublinCore 10 - identifier + # txt=meta_content_clean(@md.identifier.sisupod) + # @oai_pmh << %{ #{txt}\n} + #end if defined? @md.original.source \ - and @md.original.source=~/\S+/ # DublinCore 11 - source + and @md.original.source=~/\S+/ # DublinCore 11 - source txt=meta_content_clean(@md.original.source) @oai_pmh << %{ #{txt}\n} end if defined? @md.title.language \ - and @md.title.language=~/\S+/ # DublinCore 12 - language (English) + and @md.title.language=~/\S+/ # DublinCore 12 - language (English) @oai_pmh << %{ #{@md.title.language}\n} end if defined? @md.original.language \ and @md.original.language=~/\S+/ @oai_pmh << %{ #{@md.original.language}\n} end - if defined? @md.classify.relation \ - and @md.classify.relation=~/\S+/ # DublinCore 13 - relation - txt=meta_content_clean(@md.relation) - @oai_pmh << %{ #{txt}\n} - end - if defined? @md.classify.coverage \ - and @md.classify.coverage=~/\S+/ # DublinCore 14 - coverage - txt=meta_content_clean(@md.classify.coverage) - @oai_pmh << %{ #{txt}\n} - end if defined? @md.rights.all \ - and @md.rights.all=~/\S+/ # DublinCore 15 - rights + and @md.rights.all=~/\S+/ # DublinCore 15 - rights txt=meta_content_clean(@md.rights.all) @oai_pmh << %{ #{txt}\n} end - if defined? @md.classify.keywords \ - and @md.classify.keywords=~/\S+/ - txt=meta_content_clean(@md.classify.keywords) - @oai_pmh << %{ #{txt}\n} - end @oai_pmh end def meta_content_clean(content='') -- cgit v1.2.3