Sha256: e31cf3d4ba24358a5e7c5fc5d902b24f4fdbc82657fa66ae3e1ed188c8454763

Contents?: true

Size: 770 Bytes

Versions: 6

Compression:

Stored size: 770 Bytes

Contents

# unpack responsible party
# Reader - ADIwg JSON V1 to internal data structure

# History:
# 	Stan Smith 2013-08-26 original script
#   Stan Smith 2014-05-28 modified to support JSON schema 0.5.0
#   ... removed resource IDs associated with contact

module Adiwg_ResponsibleParty

	def self.unpack(hRParty)

		# instance classes needed in script
		intMetadataClass = InternalMetadata.new
		intResById = intMetadataClass.newRespParty

		# responsible party - contact
		if hRParty.has_key?('contactId')
			s = hRParty['contactId']
			if s != ''
				intResById[:contactID] = s
			end
		end

		# responsible party - role - required
		if hRParty.has_key?('role')
			s = hRParty['role']
			if s != ''
				intResById[:roleName] = s
			end
		end

		return intResById

	end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.9.0 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_responsibleParty.rb
adiwg-mdtranslator-0.8.6 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_responsibleParty.rb
adiwg-mdtranslator-0.8.5 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_responsibleParty.rb
adiwg-mdtranslator-0.8.2 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_responsibleParty.rb
adiwg-mdtranslator-0.8.1 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_responsibleParty.rb
adiwg-mdtranslator-0.8.0 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_responsibleParty.rb