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/fgdc/modules/module_entityAttribute.rb', line 20
def self.unpack(xEntity, title, hResponseObj)
intMetadataClass = InternalMetadata.new
hDictionary = intMetadataClass.newDataDictionary
hCitation = intMetadataClass.newCitation
hDictionary[:citation] = hCitation
hCitation[:title] = 'Data Dictionary for: ' + title
axDetail = xEntity.xpath('./detailed')
unless axDetail.empty?
axDetail.each do |xDetail|
hEntity = Entity.unpack(xDetail, hDictionary, hResponseObj)
unless hEntity.nil?
hDictionary[:entities] << hEntity
end
end
end
axOverview = xEntity.xpath('./overview')
unless axOverview.empty?
axOverview.each do |xOverview|
hEntity = EntityOverview.unpack(xOverview, hResponseObj)
unless hEntity.nil?
hDictionary[:entities] << hEntity
end
end
end
if axDetail.empty? && axOverview.empty?
hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: entityAttribute description is missing'
end
return hDictionary
end
|