Sha256: ee36091059cd33b301f0db864498589c925018705dacdbafcde3038268d0a35d

Contents?: true

Size: 1.46 KB

Versions: 27

Compression:

Stored size: 1.46 KB

Contents

# mdJson 2.0 writer - process step

# History:
#  Stan Smith 2017-08-30 add support for process step sources and products
#  Stan Smith 2017-03-19 refactored for mdJson/mdTranslator 2.0
#  Josh Bradley original script

require 'jbuilder'
require_relative 'mdJson_timePeriod'
require_relative 'mdJson_responsibleParty'
require_relative 'mdJson_citation'
require_relative 'mdJson_scope'
require_relative 'mdJson_source'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module ProcessStep

               @Namespace = ADIWG::Mdtranslator::Writers::MdJson

               def self.build(hStep)

                  Jbuilder.new do |json|
                     json.stepId hStep[:stepId]
                     json.description hStep[:description]
                     json.rationale hStep[:rationale]
                     json.timePeriod TimePeriod.build(hStep[:timePeriod]) unless hStep[:timePeriod].empty?
                     json.processor @Namespace.json_map(hStep[:processors], ResponsibleParty)
                     json.reference @Namespace.json_map(hStep[:references], Citation)
                     json.stepSource @Namespace.json_map(hStep[:stepSources], Source)
                     json.stepProduct @Namespace.json_map(hStep[:stepProducts], Source)
                     json.scope Scope.build(hStep[:scope]) unless hStep[:scope].empty?
                  end

               end # build
            end # ProcessStep

         end
      end
   end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.15.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.14.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.14.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.14.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.13.3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.13.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.13.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.13.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.12.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.12.0.pre lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.10.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.9.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.9.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.9.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.8.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.7.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.6.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.6.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.5.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
adiwg-mdtranslator-2.4.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb