Sha256: 170bfcf6839437aebd73f6ea83b26d999b630b0dd3389522190156a22e68d00f

Contents?: true

Size: 836 Bytes

Versions: 15

Compression:

Stored size: 836 Bytes

Contents

# sbJson 1.0 writer

# History:
#  Stan Smith 2017-05-25 original script

module ADIWG
   module Mdtranslator
      module Writers
         module SbJson

            module ParentId

               def self.build(hCitation)

                  parentId = ''

                  hCitation[:identifiers].each_with_index do |hIdentifier, index|
                     if index == 0
                        parentId = hIdentifier[:identifier]
                     end
                     unless hIdentifier[:namespace].nil?
                        if hIdentifier[:namespace] == 'gov.sciencebase.catalog'
                           parentId = hIdentifier[:identifier]
                        end
                     end
                  end

                  parentId

               end

            end

         end
      end
   end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.3.5 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.3.4 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.3.3 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.3.2 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.3.1 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.3.0 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.2.0 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.1.2 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.1.1 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.1.0 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.0.0 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.0.0rc13 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.0.0rc11 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.0.0rc10 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb
adiwg-mdtranslator-2.0.0rc9 lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb