15
16
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
|
# File 'lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_resourceMaintenance.rb', line 15
def self.unpack(hResource)
intMetadataClass = InternalMetadata.new
intResMaint = intMetadataClass.newResourceMaint
if hResource.has_key?('maintenanceFrequency')
s = hResource['maintenanceFrequency']
if s != ''
intResMaint[:maintFreq] = s
end
end
if hResource.has_key?('maintenanceNote')
aNotes = hResource['maintenanceNote']
unless aNotes.empty?
intResMaint[:maintNotes] = aNotes
end
end
if hResource.has_key?('maintenanceContact')
aContact = hResource['maintenanceContact']
unless aContact.empty?
aContact.each do |hContact|
intResMaint[:maintContacts] << Adiwg_ResponsibleParty.unpack(hContact)
end
end
end
return intResMaint
end
|