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/mdJson/modules/module_schema.rb', line 15
def self.unpack(hSchema, responseObj)
@MessagePath = ADIWG::Mdtranslator::Readers::MdJson::MdJson
if hSchema.empty?
@MessagePath.issueError(720, responseObj)
return nil
end
intMetadataClass = InternalMetadata.new
intSchema = intMetadataClass.newSchema
if hSchema.has_key?('name')
intSchema[:name] = hSchema['name']
end
if intSchema[:name].nil? || intSchema[:name] == ''
@MessagePath.issueError(721, responseObj)
end
if hSchema.has_key?('version')
intSchema[:version] = hSchema['version']
end
if intSchema[:version].nil? || intSchema[:version] == ''
@MessagePath.issueWarning(722, responseObj)
end
return intSchema
end
|