Sha256: 092076b8b0667ed37b4f3a81dee5bda066162cdb2ff186fcc2c9ec2f605a955c

Contents?: true

Size: 1.5 KB

Versions: 15

Compression:

Stored size: 1.5 KB

Contents

# ISO <<Class>> EX_TemporalExtent
# 19115-1 writer output in XML

# History:
# 	Stan Smith 2019-03-19 original script

require_relative 'class_timeInstant'
require_relative 'class_timePeriod'

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_1

            class EX_TemporalExtent

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

               def writeXML(hTempEle)

                  # classes used
                  timeInstClass = TimeInstant.new(@xml, @hResponseObj)
                  timePeriodClass = TimePeriod.new(@xml, @hResponseObj)

                  @xml.tag!('gex:EX_TemporalExtent') do

                     # temporal extent - time instant
                     hTimeInst = hTempEle[:timeInstant]
                     unless hTimeInst.empty?
                        @xml.tag!('gex:extent') do
                           timeInstClass.writeXML(hTimeInst)
                        end
                     end

                     # temporal extent - time period
                     hTimePeriod = hTempEle[:timePeriod]
                     unless hTimePeriod.empty?
                        @xml.tag!('gex:extent') do
                           timePeriodClass.writeXML(hTimePeriod)
                        end
                     end

                  end # EX_TemporalExtent tag
               end # writeXML
            end # EX_TemporalExtent class

         end
      end
   end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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