Sha256: 2d4e8e17d6f59274986bfdbcb5e7ff13a9d81e219540ae6d87aa7db84c045dde

Contents?: true

Size: 1.41 KB

Versions: 14

Compression:

Stored size: 1.41 KB

Contents

# ISO <<Abstract>> ProcessStep
# 19115-3 writer output in XML

# History:
# 	Stan Smith 2019-09-27 original script.

require_relative 'class_liProcessStep'
require_relative 'class_leProcessStep'

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_3

            class ProcessStep

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

               def writeXML(hProcess, inContext = nil)

                  # classes used
                  liProcessClass = LI_ProcessStep.new(@xml, @hResponseObj)
                  leProcessClass = LE_ProcessStep.new(@xml, @hResponseObj)

                  outContext = inContext

                  # use LE_ProcessStep if hProcess has any ...
                  # processingInformation, reports
                  # stepProducts (output)

                  useLE = false
                  useLE = true unless hProcess[:processingInformation].empty?
                  useLE = true unless hProcess[:reports].empty?
                  useLE = true unless hProcess[:stepProducts].empty?

                  if useLE
                     leProcessClass.writeXML(hProcess, outContext)
                  else
                     liProcessClass.writeXML(hProcess, outContext)
                  end

               end # writeXML
            end # processStep class

         end
      end
   end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_processStep.rb