Sha256: a6bf5e1e82bd5342c3326fa5c8a4de103632b7d4a7614e2bc164f793558eb5f6

Contents?: true

Size: 946 Bytes

Versions: 6

Compression:

Stored size: 946 Bytes

Contents

# ISO <<Class>> TimeInstant
# writer output in XML

# History:
# 	Stan Smith 2013-11-04 original script
#   Stan Smith 2014-07-08 modify require statements to function in RubyGem structure

require 'module_dateTimeFun'

class TimeInstant

	def initialize(xml)
		@xml = xml
	end

	def writeXML(hTempI)

		timeID = hTempI[:timeID]
		if timeID.nil?
			$idCount = $idCount.succ
			timeID = 'timeInstant' + $idCount
		end

		@xml.tag!('gml:TimeInstant',{'gml:id'=>timeID}) do

			# time instant - description
			s = hTempI[:description]
			if !s.nil?
				@xml.tag!('gml:description',s)
			elsif $showAllTags
				@xml.tag!('gml:description')
			end

			# time instant - time position
			hDateTime = hTempI[:timePosition]
			timeInstant = hDateTime[:dateTime]
			timeResolution = hDateTime[:dateResolution]
			dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(timeInstant,timeResolution)
			@xml.tag!('gml:timePosition',dateStr)

		end

	end

end


Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.9.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_timeInstant.rb
adiwg-mdtranslator-0.8.6 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_timeInstant.rb
adiwg-mdtranslator-0.8.5 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_timeInstant.rb
adiwg-mdtranslator-0.8.2 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_timeInstant.rb
adiwg-mdtranslator-0.8.1 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_timeInstant.rb
adiwg-mdtranslator-0.8.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_timeInstant.rb