Sha256: 3045be3e734cc669df22dc38c514f331807eae130a0405dd62547894d37b72bc
Contents?: true
Size: 1.2 KB
Versions: 7
Compression:
Stored size: 1.2 KB
Contents
# ISO <<Class>> MD_Usage # writer output in XML # History: # Stan Smith 2013-11-19 original script # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure require 'class_responsibleParty' class MD_Usage def initialize(xml) @xml = xml end def writeXML(hUsage) # classes used in MD_Usage rPartyClass = CI_ResponsibleParty.new(@xml) @xml.tag!('gmd:MD_Usage') do # usage - specific usage - required s = hUsage[:specificUsage] if s.nil? @xml.tag!('gmd:specificUsage',{'gco:nilReason'=>'missing'}) else @xml.tag!('gmd:specificUsage') do @xml.tag!('gco:CharacterString',s) end end # usage - user determined limitations s = hUsage[:userLimits] if !s.nil? @xml.tag!('gmd:userDeterminedLimitations') do @xml.tag!('gco:CharacterString',s) end elsif $showAllTags @xml.tag!('gmd:userDeterminedLimitations') end # usage - user contact info - responsible party aContacts = hUsage[:userContacts] if !aContacts.empty? aContacts.each do |rParty| @xml.tag!('gmd:userContactInfo') do rPartyClass.writeXML(rParty) end end elsif $showAllTags @xml.tag!('gmd:userContactInfo') end end end end
Version data entries
7 entries across 7 versions & 1 rubygems