18
19
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/adiwg/mdtranslator/readers/fgdc/modules/module_geologicAge.rb', line 18
def self.unpack(xGeoAge, hResponseObj)
intMetadataClass = InternalMetadata.new
intGeoAge = intMetadataClass.newGeologicAge
scale = xGeoAge.xpath('./geolscal').text
unless scale.empty?
intGeoAge[:ageTimeScale] = scale
end
if scale.empty?
hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: BIO geologic age time scale is missing'
end
estimate = xGeoAge.xpath('./geolest').text
unless estimate.empty?
intGeoAge[:ageEstimate] = estimate
end
if estimate.empty?
hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: BIO geologic age estimate is missing'
end
uncertain = xGeoAge.xpath('./geolun').text
unless uncertain.empty?
intGeoAge[:ageUncertainty] = uncertain
end
explain = xGeoAge.xpath('./geolexpl').text
unless explain.empty?
intGeoAge[:ageExplanation] = explain
end
axReferences = xGeoAge.xpath('./geolcit')
unless axReferences.empty?
axReferences.each do |xCitation|
hCitation = Citation.unpack(xCitation, hResponseObj)
intGeoAge[:ageReferences] << hCitation unless hCitation.nil?
end
end
return intGeoAge
end
|