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/mdJson/modules/module_vectorObject.rb', line 15
def self.unpack(hVecObj, responseObj, inContext = nil)
@MessagePath = ADIWG::Mdtranslator::Readers::MdJson::MdJson
if hVecObj.empty?
@MessagePath.issueWarning(900, responseObj, inContext)
return nil
end
intMetadataClass = InternalMetadata.new
intVecObj = intMetadataClass.newVectorObject
if hVecObj.has_key?('objectType')
unless hVecObj['objectType'] == ''
intVecObj[:objectType] = hVecObj['objectType']
end
end
if intVecObj[:objectType].nil?
@MessagePath.issueError(901, responseObj, inContext)
end
if hVecObj.has_key?('objectCount')
unless hVecObj['objectCount'] == ''
intVecObj[:objectCount] = hVecObj['objectCount']
end
end
return intVecObj
end
|