Sha256: 9bee8b2d09fbc7cf270c5e6baa67e2dd1e595eb98372f8943c8e4e11e63a929c

Contents?: true

Size: 767 Bytes

Versions: 1

Compression:

Stored size: 767 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 Md_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

1 entries across 1 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.10.2 lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_responsibleParty.rb