Sha256: 6da6da08390dbb7aa02bc1914fc4b0e74b84b5692da1dde3412c458988e4862d

Contents?: true

Size: 1.25 KB

Versions: 14

Compression:

Stored size: 1.25 KB

Contents

# ISO <<Abstract>> Source
# 19115-3 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_3

            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

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_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb