Sha256: 9a9cc12f00437916bb3901a8fe25ebdf21135bc78c30c733ba980e45be5ec040

Contents?: true

Size: 1.62 KB

Versions: 10

Compression:

Stored size: 1.62 KB

Contents

# mdJson 2.0 writer - metadata

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

require 'jbuilder'
require_relative 'mdJson_metadataInfo'
require_relative 'mdJson_resourceInfo'
require_relative 'mdJson_lineageInfo'
require_relative 'mdJson_distribution'
require_relative 'mdJson_associatedResource'
require_relative 'mdJson_additionalDocumentation'
require_relative 'mdJson_funding'
require_relative 'mdJson_dataQuality'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module Metadata

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

               def self.build(hMetadata)

                  Jbuilder.new do |json|
                     json.metadataInfo MetadataInfo.build(hMetadata[:metadataInfo])
                     json.resourceInfo ResourceInfo.build(hMetadata[:resourceInfo])
                     json.resourceLineage @Namespace.json_map(hMetadata[:lineageInfo], LineageInfo)
                     json.resourceDistribution @Namespace.json_map(hMetadata[:distributorInfo], Distribution)
                     json.associatedResource @Namespace.json_map(hMetadata[:associatedResources], AssociatedResource)
                     json.additionalDocumentation @Namespace.json_map(hMetadata[:additionalDocuments], AdditionalDocument)
                     json.funding @Namespace.json_map(hMetadata[:funding], Funding)
                     json.dataQuality @Namespace.json_map(hMetadata[:dataQuality], DataQuality)
                  end

               end # build
            end # Metadata

         end
      end
   end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.0rc6 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.0rc5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
adiwg-mdtranslator-2.18.0rc4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb