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
|
# File 'lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_descriptiveKeyword.rb', line 15
def self.unpack(hDesKeyword)
intMetadataClass = InternalMetadata.new
intKeyword = intMetadataClass.newKeyword
if hDesKeyword.has_key?('keyword')
aKeywords = hDesKeyword['keyword']
aKeywords.each do |keyword|
intKeyword[:keyword] << keyword
end
end
if hDesKeyword.has_key?('keywordType')
s = hDesKeyword['keywordType']
if s != ''
intKeyword[:keywordType] = s
end
end
if hDesKeyword.has_key?('thesaurus')
hCitation = hDesKeyword['thesaurus']
unless hCitation.empty?
intKeyword[:keyTheCitation] = Adiwg_Citation.unpack(hCitation)
end
end
return intKeyword
end
|