lib/adiwg/mdtranslator/writers/iso/classes/class_aggregateInformation.rb in adiwg-mdtranslator-1.1.1 vs lib/adiwg/mdtranslator/writers/iso/classes/class_aggregateInformation.rb in adiwg-mdtranslator-1.2.0

- old
+ new

@@ -5,13 +5,13 @@ # Stan Smith 2014-05-29 original script # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure # Stan Smith 2014-11-06 take initiativeType from internal initiativeType # ... rather than resourceType for 0.9.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_associationType' -require 'code_initiativeType' +require 'class_codelist' require 'class_citation' module ADIWG module Mdtranslator module Writers @@ -29,12 +29,11 @@ # ... aggregateDataSetIdentifier is being dropped and # ... resource identifiers are being carried inside the # ... citation > identifier section # classes used - assocCode = $IsoNS::DS_AssociationTypeCode.new(@xml) - initCode = $IsoNS::DS_InitiativeTypeCode.new(@xml) + codelistClass = $IsoNS::MD_Codelist.new(@xml) citationClass = $IsoNS::CI_Citation.new(@xml) @xml.tag!('gmd:MD_AggregateInformation') do # aggregate information - aggregate data set name - citation @@ -51,20 +50,20 @@ # aggregate information - association type s = hAssocRes[:associationType] if !s.nil? @xml.tag!('gmd:associationType') do - assocCode.writeXML(s) + codelistClass.writeXML('iso_associationType',s) end elsif $showAllTags @xml.tag!('gmd:associationType') end # aggregate information - initiative type s = hAssocRes[:initiativeType] if !s.nil? @xml.tag!('gmd:initiativeType') do - initCode.writeXML(s) + codelistClass.writeXML('iso_initiativeType',s) end elsif $showAllTags @xml.tag!('gmd:initiativeType') end