14
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_resourceSpecificUsage.rb', line 14
def self.unpack(hUsage)
intMetadataClass = InternalMetadata.new
intUsage = intMetadataClass.newDataUsage
if hUsage.has_key?('specificUsage')
s = hUsage['specificUsage']
if s != ''
intUsage[:specificUsage] = s
end
end
if hUsage.has_key?('userDeterminedLimitation')
s = hUsage['userDeterminedLimitation']
if s != ''
intUsage[:userLimits] = s
end
end
if hUsage.has_key?('userContactInfo')
aContacts = hUsage['userContactInfo']
unless aContacts.empty?
aContacts.each do |hContact|
intUsage[:userContacts] << Adiwg_ResponsibleParty.unpack(hContact)
end
end
end
return intUsage
end
|