Sha256: b2e35fd70fb6e1eef362b87a207cb1b3b071895536d44ea0c5a59acd290b65d5

Contents?: true

Size: 1.46 KB

Versions: 38

Compression:

Stored size: 1.46 KB

Contents

# mdJson 2.0 writer - taxonomy

# History:
#   Stan Smith 2017-03-17 refactored for mdJson/mdTranslator 2.0
#   Josh Bradley original script

require 'jbuilder'
require_relative 'mdJson_taxonomicSystem'
require_relative 'mdJson_identifier'
require_relative 'mdJson_responsibleParty'
require_relative 'mdJson_voucher'
require_relative 'mdJson_taxonomicClassification'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module Taxonomy

               def self.build(hTaxonomy)

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

                  Jbuilder.new do |json|
                     json.taxonomicSystem @Namespace.json_map(hTaxonomy[:taxonSystem], TaxonomicSystem)
                     json.generalScope hTaxonomy[:generalScope]
                     json.identificationReference @Namespace.json_map(hTaxonomy[:idReferences], Identifier)
                     json.observer @Namespace.json_map(hTaxonomy[:observers], ResponsibleParty)
                     json.identificationProcedure hTaxonomy[:idProcedure]
                     json.identificationCompleteness hTaxonomy[:idCompleteness]
                     json.voucher @Namespace.json_map(hTaxonomy[:vouchers], Voucher)
                     json.taxonomicClassification TaxonomicClassification.build(hTaxonomy[:taxonClass]) unless hTaxonomy[:taxonClass].empty?
                  end

               end # build
            end # Taxonomy

         end
      end
   end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.13.3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.13.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.13.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.13.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.12.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.12.0.pre lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.10.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.9.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.9.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.9.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.8.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.7.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.6.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.6.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.5.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.4.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.3.5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.3.4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.3.3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb
adiwg-mdtranslator-2.3.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb