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
|
# File 'lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_extent.rb', line 18
def self.unpack(hExtent)
intMetadataClass = InternalMetadata.new
intExtent = intMetadataClass.newExtent
if hExtent.has_key?('description')
s = hExtent['description']
if s != ''
intExtent[:extDesc] = s
end
end
if hExtent.has_key?('geographicElement')
aGeoElements = hExtent['geographicElement']
unless aGeoElements.empty?
intExtent[:extGeoElements] = Adiwg_GeographicElement.unpack(aGeoElements)
end
end
if hExtent.has_key?('temporalElement')
hTempElement = hExtent['temporalElement']
unless hTempElement.empty?
intExtent[:extTempElements] = Adiwg_TemporalElement.unpack(hTempElement)
end
end
if hExtent.has_key?('verticalElement')
aVertElements = hExtent['verticalElement']
unless aVertElements.empty?
aVertElements.each do |hVertElement|
intExtent[:extVertElements] << Adiwg_VerticalElement.unpack(hVertElement)
end
end
end
return intExtent
end
|