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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQuality.rb', line 15
def self.unpack(hDataQuality, responseObj, inContext = nil)
@MessagePath = ADIWG::Mdtranslator::Readers::MdJson::MdJson
if hDataQuality.empty?
@MessagePath.issueWarning(300, responseObj)
return nil
end
intMetadataClass = InternalMetadata.new
intDataQuality = intMetadataClass.newDataQuality
outContext = 'dataQuality'
if hDataQuality.has_key?('scope')
hObject = hDataQuality['scope']
unless hObject.empty?
hReturn = Scope.unpack(hObject, responseObj)
unless hReturn.nil?
intDataQuality[:scope] = hReturn
end
end
end
if hDataQuality.has_key?('standaloneQualityReport')
hObject = hDataQuality['standaloneQualityReport']
unless hObject.empty?
intDataQuality[:standaloneQualityReport] = {}
intDataQuality[:standaloneQualityReport][:abstract] = hObject["abstract"]
unless hObject["reportRefereence"].nil? || hObject["reportReference"].empty?
intDataQuality[:standaloneQualityReport][:reportReference] = Citation.unpack(hObject["reportReference"], responseObj, inContext)
end
end
end
if hDataQuality.has_key?('report')
hDataQuality['report'].each do |item|
report = DataQualityReport.unpack(item, responseObj, inContext)
unless report.nil?
intDataQuality[:report] << report
end
end
end
return intDataQuality
end
|