Sha256: ed67ac20997a7c538fa97506c3285bd4c18a72b6e2b556b70ea3eaa9b3c94a71

Contents?: true

Size: 741 Bytes

Versions: 12

Compression:

Stored size: 741 Bytes

Contents

require 'jbuilder'

module ADIWG
  module Mdtranslator
    module Writers
      module SbJson
        module Identifier
          def self.build(intObj)
            Jbuilder.new do |json|
              json.type intObj[:identifierType]
              json.scheme intObj[:identifierNamespace] ||
                          unless intObj[:identifierCitation].empty?
                            intObj[:identifierCitation][:citOlResources][0][:olResURI] unless intObj[:identifierCitation][:citOlResources].empty?
                          end ||
                          'https://www.sciencebase.gov/vocab/category/item/identifier'
              json.key intObj[:identifier]
            end
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.0.0rc2 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta14 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta13 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta12 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta11 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta10 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta9 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta8 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta7 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta6 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
adiwg-mdtranslator-1.4.0.beta5 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb