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
|
# File 'lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_source.rb', line 13
def self.unpack(hSource)
intMetadataClass = InternalMetadata.new
intDataSource = intMetadataClass.newDataSource
if hSource.has_key?('description')
s = hSource['description']
if s != ''
intDataSource[:sourceDescription] = s
end
end
if hSource.has_key?('citation')
hCitation = hSource['citation']
unless hCitation.empty?
intDataSource[:sourceCitation] = Adiwg_Citation.unpack(hCitation)
end
end
if hSource.has_key?('processStep')
aSourceSteps = hSource['processStep']
unless aSourceSteps.empty?
aSourceSteps.each do |hStep|
intDataSource[:sourceSteps] << Adiwg_ProcessStep.unpack(hStep)
end
end
end
return intDataSource
end
|