lib/adiwg/mdtranslator/writers/iso/classes/class_browseGraphic.rb in adiwg-mdtranslator-0.10.2 vs lib/adiwg/mdtranslator/writers/iso/classes/class_browseGraphic.rb in adiwg-mdtranslator-0.12.0

- old
+ new

@@ -1,51 +1,62 @@ # ISO <<Class>> MD_BrowseGraphic # writer output in XML # History: # Stan Smith 2013-10-17 original script +# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers -class MD_BrowseGraphic +module ADIWG + module Mdtranslator + module Writers + module Iso - def initialize(xml) - @xml = xml - end + class MD_BrowseGraphic - def writeXML(graphic) + def initialize(xml) + @xml = xml + end - @xml.tag!('gmd:MD_BrowseGraphic') do + def writeXML(graphic) - # browse graphic - file name - required - s = graphic[:bGName] - if !s.nil? - @xml.tag!('gmd:fileName') do - @xml.tag!('gco:CharacterString',s) - end - elsif $showAllTags - @xml.tag!('gmd:fileName') - end + @xml.tag!('gmd:MD_BrowseGraphic') do - # browse graphic - file description - s = graphic[:bGDescription] - if !s.nil? - @xml.tag!('gmd:fileDescription') do - @xml.tag!('gco:CharacterString',s) - end - elsif $showAllTags - @xml.tag!('gmd:fileDescription') - end + # browse graphic - file name - required + s = graphic[:bGName] + if !s.nil? + @xml.tag!('gmd:fileName') do + @xml.tag!('gco:CharacterString', s) + end + elsif $showAllTags + @xml.tag!('gmd:fileName') + end - # browse graphic - file type - s = graphic[:bGType] - if !s.nil? - @xml.tag!('gmd:fileType') do - @xml.tag!('gco:CharacterString',s) - end - elsif $showAllTags - @xml.tag!('gmd:fileType') - end + # browse graphic - file description + s = graphic[:bGDescription] + if !s.nil? + @xml.tag!('gmd:fileDescription') do + @xml.tag!('gco:CharacterString', s) + end + elsif $showAllTags + @xml.tag!('gmd:fileDescription') + end - end + # browse graphic - file type + s = graphic[:bGType] + if !s.nil? + @xml.tag!('gmd:fileType') do + @xml.tag!('gco:CharacterString', s) + end + elsif $showAllTags + @xml.tag!('gmd:fileType') + end - end + end -end \ No newline at end of file + end + + end + + end + end + end +end