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
|
# File 'lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_lineage.rb', line 13
def self.unpack(hLineage)
intMetadataClass = InternalMetadata.new
intDataLine = intMetadataClass.newLineage
if hLineage.has_key?('statement')
s = hLineage['statement']
if s != ''
intDataLine[:statement] = s
end
end
if hLineage.has_key?('processStep')
aProcSteps = hLineage['processStep']
unless aProcSteps.empty?
aProcSteps.each do |hProcStep|
intDataLine[:processSteps] << Adiwg_ProcessStep.unpack(hProcStep)
end
end
end
if hLineage.has_key?('source')
aSources = hLineage['source']
unless aSources.empty?
aSources.each do |hSource|
intDataLine[:dataSources] << Adiwg_Source.unpack(hSource)
end
end
end
return intDataLine
end
|