9
10
11
12
13
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
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_evaluationMethod.rb', line 9
def self.unpack(hMethod, responseObj, inContext = nil)
intMetadataClass = InternalMetadata.new
intMethod = intMetadataClass.newEvaluationMethod
if hMethod.has_key?('type')
intMethod[:type] = hMethod['type']
end
if hMethod.has_key?('dateTime')
intMethod[:dateTime] = hMethod['dateTime']
end
if hMethod.has_key?('methodDescription')
intMethod[:methodDescription] = hMethod['methodDescription']
end
if hMethod.has_key?('evaluationProcedure')
intMethod[:evaluationProcedure] = Citation.unpack(hMethod['evaluationProcedure'], responseObj)
end
if hMethod.has_key?('referenceDocuments')
hMethod['referenceDocuments'].each do |item|
hReturn = Citation.unpack(item, responseObj)
unless hReturn.nil?
intMethod[:referenceDocuments] << hReturn
end
end
intMethod[:referenceDocuments] = hMethod['referenceDocuments']
end
if hMethod.has_key?('evaluationMethodType')
intMethod[:evaluationMethodType] = hMethod['evaluationMethodType']
end
if hMethod.has_key?('deductiveSource')
intMethod[:deductiveSource] = hMethod['deductiveSource']
end
if hMethod.has_key?('samplingScheme')
intMethod[:samplingScheme] = hMethod['samplingScheme']
end
if hMethod.has_key?('lotDescription')
intMethod[:lotDescription] = hMethod['lotDescription']
end
if hMethod.has_key?('samplingRatio')
intMethod[:samplingRatio] = hMethod['samplingRatio']
end
return intMethod
end
|