Sha256: 73795bb0967f4b0401d0cae5c567345b25884353674bc72155c17969a626d914

Contents?: true

Size: 1.25 KB

Versions: 13

Compression:

Stored size: 1.25 KB

Contents

# ISO <<Abstract>> Source
# 19115-1 writer output in XML

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

require_relative 'class_liSource'
require_relative 'class_leSource'

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_1

            class Source

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

               def writeXML(hSource, inContext = nil)

                  # classes used
                  liSourceClass = LI_Source.new(@xml, @hResponseObj)
                  leSourceClass = LE_Source.new(@xml, @hResponseObj)

                  outContext = inContext

                  # use LE_Source if hSource has any ...
                  # processedLevel, resolution

                  useLE = false
                  useLE = true unless hSource[:processedLevel].empty?
                  useLE = true unless hSource[:resolution].empty?

                  if useLE
                     leSourceClass.writeXML(hSource, outContext)
                  else
                     liSourceClass.writeXML(hSource, outContext)
                  end

               end # writeXML
            end # Source class

         end
      end
   end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc6 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc5 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc4 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc3 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc2 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.18.0rc1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb
adiwg-mdtranslator-2.17.1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb