lib/adiwg/mdtranslator/writers/iso/classes/class_citation.rb in adiwg-mdtranslator-1.1.1 vs lib/adiwg/mdtranslator/writers/iso/classes/class_citation.rb in adiwg-mdtranslator-1.2.0
- old
+ new
@@ -7,14 +7,15 @@
# Stan Smith 2014-05-16 modified for JSON schema 0.4.0
# Stan Smith 2014-05-16 added MD_Identifier
# Stan Smith 2014-05-28 modified for json schema 0.5.0
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
# Stan Smith 2014-08-18 modify identifier section for schema 0.6.0
-# Stan Smith 2014-08-18 process isbn and issn from identifier section per 0.6.0
+# Stan Smith 2014-08-18 process isbn and ISSN from identifier section per 0.6.0
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
+# Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
-require 'code_presentationForm'
+require 'class_codelist'
require 'class_responsibleParty'
require 'class_date'
require 'class_identifier'
module ADIWG
@@ -29,11 +30,11 @@
end
def writeXML(hCitation)
# classes used
- presFormClass = $IsoNS::CI_PresentationFormCode.new(@xml)
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
rPartyClass = $IsoNS::CI_ResponsibleParty.new(@xml)
dateClass = $IsoNS::CI_Date.new(@xml)
idClass = $IsoNS::MD_Identifier.new(@xml)
@xml.tag!('gmd:CI_Citation') do
@@ -103,10 +104,10 @@
# citation - presentation forms - CI_PresentationFormCode
aPresForms = hCitation[:citResourceForms]
if !aPresForms.empty?
aPresForms.each do |presForm|
@xml.tag!('gmd:presentationForm') do
- presFormClass.writeXML(presForm)
+ codelistClass.writeXML('iso_presentationForm',presForm)
end
end
elsif $showAllTags
@xml.tag!('gmd:presentationForm')
end