Sha256: 8b7ae965efa922917c819f4bdd9544afcbebb9c7b0519fa58c1dcea4826ecb1d
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
# unpack process step # Reader - ADIwg JSON V1 to internal data structure # History: # Stan Smith 2013-11-26 original script # Stan Smith 2014-07-03 resolve require statements using Mdtranslator.reader_module require ADIWG::Mdtranslator.reader_module('module_responsibleParty', $response[:readerVersionUsed]) require ADIWG::Mdtranslator.reader_module('module_dateTime', $response[:readerVersionUsed]) module Md_ProcessStep def self.unpack(hProcStep) # instance classes needed in script intMetadataClass = InternalMetadata.new intDataPStep = intMetadataClass.newDataProcessStep # process step - step ID if hProcStep.has_key?('stepId') s = hProcStep['stepId'] if s != '' intDataPStep[:stepId] = s end end # process step - description if hProcStep.has_key?('description') s = hProcStep['description'] if s != '' intDataPStep[:stepDescription] = s end end # process step - rationale if hProcStep.has_key?('rationale') s = hProcStep['rationale'] if s != '' intDataPStep[:stepRationale] = s end end # process step - dateTime if hProcStep.has_key?('dateTime') s = hProcStep['dateTime'] if s != '' intDataPStep[:stepDateTime] = Md_DateTime.unpack(s) end end # process step - step processors if hProcStep.has_key?('processor') aProcessors = hProcStep['processor'] unless aProcessors.empty? aProcessors.each do |processor| intDataPStep[:stepProcessors] << Md_ResponsibleParty.unpack(processor) end end end return intDataPStep end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
adiwg-mdtranslator-0.10.2 | lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_processStep.rb |