Sha256: 719c60cbecaeee33d068886c574b9128674abb549552020b7f33e8e9c4f9b94f

Contents?: true

Size: 1.72 KB

Versions: 38

Compression:

Stored size: 1.72 KB

Contents

# FGDC <<Class>> Browse
# FGDC CSDGM writer output in XML

# History:
#  Stan Smith 2018-02-26 refactored error and warning messaging
#  Stan Smith 2017-12-12 original script

require_relative '../fgdc_writer'

module ADIWG
   module Mdtranslator
      module Writers
         module Fgdc

            class Browse

               def initialize(xml, hResponseObj)
                  @xml = xml
                  @hResponseObj = hResponseObj
                  @NameSpace = ADIWG::Mdtranslator::Writers::Fgdc
               end

               def writeXML(hGraphic, inContext = nil)

                  # browse 1.10.1 (browsen) - browse name (required)
                  unless hGraphic[:graphicName].nil?
                     @xml.tag!('browsen', hGraphic[:graphicName])
                  end
                  if hGraphic[:graphicName].nil?
                     @NameSpace.issueWarning(20, 'browsen', inContext)
                  end

                  # browse 1.10.2 (browsed) - browse description (required)
                  unless hGraphic[:graphicDescription].nil?
                     @xml.tag!('browsed', hGraphic[:graphicDescription])
                  end
                  if hGraphic[:graphicDescription].nil?
                     @NameSpace.issueWarning(21, 'browsed', inContext)
                  end

                  # browse 1.10.3 (browset) - browse type (required)
                  unless hGraphic[:graphicType].nil?
                     @xml.tag!('browset', hGraphic[:graphicType])
                  end
                  if hGraphic[:graphicType].nil?
                     @NameSpace.issueWarning(22, 'browset', inContext)
                  end

               end # writeXML
            end # Browse

         end
      end
   end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb