Sha256: 0247bde148e0040db75d941e6b1a01f1666773d54f992f49f5b3a72753a2f7c3
Contents?: true
Size: 1000 Bytes
Versions: 1
Compression:
Stored size: 1000 Bytes
Contents
# unpack time instant # Reader - ADIwg JSON V1 to internal data structure # History: # Stan Smith 2013-12-11 original script # Stan Smith 2014-07-07 resolve require statements using Mdtranslator.reader_module require ADIWG::Mdtranslator.reader_module('module_dateTime', $response[:readerVersionUsed]) module Md_TimeInstant def self.unpack(hTimeInst) # instance classes needed in script intMetadataClass = InternalMetadata.new # time instant intTimeInst = intMetadataClass.newTimeInstant if hTimeInst.has_key?('id') s = hTimeInst['id'] if s != '' intTimeInst[:timeId] = s end end if hTimeInst.has_key?('description') s = hTimeInst['description'] if s != '' intTimeInst[:description] = s end end # time instant will only be inserted if time position provided if hTimeInst.has_key?('timePosition') s = hTimeInst['timePosition'] if s != '' intTimeInst[:timePosition] = Md_DateTime.unpack(s) end end return intTimeInst end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
adiwg-mdtranslator-0.10.2 | lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_timeInstant.rb |