Sha256: 9f28e519fe6952f2abff248a8f0b6543586fa0b259a60789ed4fae6e205d43c7
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
# unpack identifier # Reader - ScienceBase JSON to internal data structure # History: # Stan Smith 2016-06-19 original script require 'adiwg/mdtranslator/internal/internal_metadata_obj' module ADIWG module Mdtranslator module Readers module SbJson module Identifier # instance classes needed in script @intMetadataClass = InternalMetadata.new def self.unpack(hSbJson, hCitation, hResponseObj) hSbJson['identifiers'].each_with_index do |hSbIdentifier, i| hIdentifier = @intMetadataClass.newIdentifier unless hSbIdentifier['type'].nil? || hSbIdentifier['type'] == '' hIdentifier[:description] = hSbIdentifier['type'] end unless hSbIdentifier['scheme'].nil? || hSbIdentifier['scheme'] == '' hIdentifier[:namespace] = hSbIdentifier['scheme'] end unless hSbIdentifier['key'].nil? || hSbIdentifier['key'] == '' hIdentifier[:identifier] = hSbIdentifier['key'] end hCitation[:identifiers] << hIdentifier end return hCitation end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
adiwg-mdtranslator-2.0.0rc13 | lib/adiwg/mdtranslator/readers/sbJson/modules/module_identifier.rb |