Sha256: aaa4c218e5f21a122b5d999fa64867eb9c3b8cd22534379e056393d0bb3e3381

Contents?: true

Size: 1.31 KB

Versions: 15

Compression:

Stored size: 1.31 KB

Contents

require 'jbuilder'
require_relative 'mdJson_base'
require_relative 'mdJson_citation'
require_relative 'mdJson_resourceIdentifier'
require_relative 'mdJson_responsibleParty'
require_relative 'mdJson_locale'
require_relative 'mdJson_resourceMaintenance'

module ADIWG
  module Mdtranslator
    module Writers
      module MdJson
        module MetadataInfo
          extend MdJson::Base

          def self.build(_info)
            Jbuilder.new do |json|
              unless _info[:metadataId].nil?
                json.metadataIdentifier ResourceIdentifier.build(_info[:metadataId])
                json.parentMetadata Citation.build(_info[:parentMetadata])
                json.metadataContact json_map(_info[:metadataCustodians], ResponsibleParty)
                json.metadataCharacterSet _info[:metadataCharacterSet]
                json.metadataLocales json_map(_info[:metadataLocales], Locale)
                json.metadataCreationDate _info[:metadataCreateDate][:dateTime]
                json.metadataLastUpdate _info[:metadataUpdateDate][:dateTime]
                json.metadataUri _info[:metadataURI]
                json.metadataStatus _info[:metadataStatus]
                json.metadataMaintenance ResourceMaintenance.build( _info[:maintInfo])
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
adiwg-mdtranslator-1.4.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta14 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta13 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta12 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta11 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta10 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta9 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta8 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta7 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta6 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
adiwg-mdtranslator-1.4.0.beta1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb