class ADIWG::Mdtranslator::Writers::Iso19115_1::LE_ProcessStepReport

Public Class Methods

new(xml, hResponseObj) click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processReport.rb, line 16
def initialize(xml, hResponseObj)
   @xml = xml
   @hResponseObj = hResponseObj
   @NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
end

Public Instance Methods

writeXML(hReport, inContext = nil) click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processReport.rb, line 22
def writeXML(hReport, inContext = nil)

   outContext = 'process step report'
   outContext = inContext + ' ' + outContext unless inContext.nil?

   @xml.tag!('mrl:LE_ProcessStepReport') do

      # process step report - name (required)
      unless hReport[:name].nil?
         @xml.tag!('mrl:name') do
            @xml.tag!('gco:CharacterString', hReport[:name])
         end
      end
      if hReport[:name].nil?
         @NameSpace.issueWarning(440, 'mrl:name', outContext)
      end

      # process step report - description
      unless hReport[:description].nil?
         @xml.tag!('mrl:description') do
            @xml.tag!('gco:CharacterString', hReport[:description])
         end
      end
      if hReport[:description].nil? && @hResponseObj[:writerShowTags]
         @xml.tag!('mrl:description')
      end

      # process step report - file type
      unless hReport[:fileType].nil?
         @xml.tag!('mrl:fileType') do
            @xml.tag!('gco:CharacterString', hReport[:fileType])
         end
      end
      if hReport[:fileType].nil? && @hResponseObj[:writerShowTags]
         @xml.tag!('mrl:fileType')
      end

   end # mrl:LE_ProcessStepReport
end