20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/adiwg/mdtranslator/readers/fgdc/modules/module_timeInstant.rb', line 20
def self.unpack(xDateTime, hResponseObj)
intMetadataClass = InternalMetadata.new
hTimeInstant = intMetadataClass.newTimeInstant
date = xDateTime.xpath('./caldate').text
time = xDateTime.xpath('./time').text
xGeoAge = xDateTime.xpath('./geolage')
unless date.empty?
hDateTime = DateTime.unpack(date, time, hResponseObj)
unless hDateTime.nil?
hTimeInstant[:timeInstant] = hDateTime
return hTimeInstant
end
end
unless xGeoAge.empty?
hGeoAge = GeologicAge.unpack(xGeoAge, hResponseObj)
unless hGeoAge.nil?
hTimeInstant[:geologicAge] = hGeoAge
return hTimeInstant
end
end
return nil
end
|