17
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
66
67
68
69
70
71
72
73
74
|
# File 'lib/adiwg/mdtranslator/readers/mdJson/modules/module_geometryProperties.rb', line 17
def self.unpack(hGeoProp, responseObj)
@MessagePath = ADIWG::Mdtranslator::Readers::MdJson::MdJson
if hGeoProp.empty?
@MessagePath.issueWarning(390, responseObj)
return nil
end
intMetadataClass = InternalMetadata.new
intGeoProp = intMetadataClass.newGeometryProperties
if hGeoProp.has_key?('featureName')
hGeoProp['featureName'].each do |item|
if item != ''
intGeoProp[:featureNames] << item
end
end
end
if hGeoProp.has_key?('description')
unless hGeoProp['description'] == ''
intGeoProp[:description] = hGeoProp['description']
end
end
if hGeoProp.has_key?('identifier')
aItems = hGeoProp['identifier']
aItems.each do |item|
hReturn = Identifier.unpack(item, responseObj)
unless hReturn.nil?
intGeoProp[:identifiers] << hReturn
end
end
end
if hGeoProp.has_key?('featureScope')
unless hGeoProp['featureScope'] == ''
intGeoProp[:featureScope] = hGeoProp['featureScope']
end
end
if hGeoProp.has_key?('acquisitionMethod')
unless hGeoProp['acquisitionMethod'] == ''
intGeoProp[:acquisitionMethod] = hGeoProp['acquisitionMethod']
end
end
return intGeoProp
end
|