Sha256: 057393b5386f66ace741ebb9d506a3860d3b1f030f165f428712ef2e89b6e4e4

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 KB

Contents

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

# History:
#  Stan Smith 2017-11-21 original script

module ADIWG
   module Mdtranslator
      module Writers
         module Fgdc

            class Series

               def initialize(xml, hResponseObj)
                  @xml = xml
                  @hResponseObj = hResponseObj
               end

               def writeXML(hSeries)

                  # series 8.7.1 (sername) - series name
                  # <- hCitation[:series][:seriesName] (required)
                  unless hSeries[:seriesName].nil?
                     @xml.tag!('sername', hSeries[:seriesName])
                  end
                  if hSeries[:seriesName].nil?
                     @hResponseObj[:writerPass] = false
                     @hResponseObj[:writerMessages] << 'Series is missing name'
                  end

                  # series 8.7.2 (issue) - series issue
                  # <- hCitation[:series][:seriesIssue] (required)
                  unless hSeries[:seriesIssue].nil?
                     @xml.tag!('issue', hSeries[:seriesIssue])
                  end
                  if hSeries[:seriesIssue].nil?
                     @hResponseObj[:writerPass] = false
                     @hResponseObj[:writerMessages] << 'Series is missing issue'
                  end

               end # writeXML
            end # Series

         end
      end
   end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.10.0 lib/adiwg/mdtranslator/writers/fgdc/classes/class_series.rb
adiwg-mdtranslator-2.9.2 lib/adiwg/mdtranslator/writers/fgdc/classes/class_series.rb
adiwg-mdtranslator-2.9.1 lib/adiwg/mdtranslator/writers/fgdc/classes/class_series.rb
adiwg-mdtranslator-2.9.0 lib/adiwg/mdtranslator/writers/fgdc/classes/class_series.rb
adiwg-mdtranslator-2.8.0 lib/adiwg/mdtranslator/writers/fgdc/classes/class_series.rb
adiwg-mdtranslator-2.7.0 lib/adiwg/mdtranslator/writers/fgdc/classes/class_series.rb