lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb in adiwg-mdtranslator-2.13.2 vs lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb in adiwg-mdtranslator-2.13.3
- old
+ new
@@ -1,8 +1,9 @@
# sbJson 1.0 writer
# History:
+# Stan Smith 2018-09-05 skip responsibility objects in associatedResource
# Stan Smith 2017-05-25 refactored for mdJson/mdTranslator 2.0
# Josh Bradley original script
require 'jbuilder'
require_relative 'sbJson_codelists'
@@ -18,10 +19,11 @@
@Namespace = ADIWG::Mdtranslator::Writers::SbJson
def self.get_contact_list(intObj)
# gather all responsibility objects in intObj
- aResponsibility = @Namespace.nested_objs_by_element(intObj, 'roleName')
+ # skip those in associatedResources[]
+ aResponsibility = @Namespace.nested_objs_by_element(intObj, 'roleName', ['associatedResources'])
# set an additional 'Material Request Contact' for each distributor contact
aMRContacts = @Namespace.nested_objs_by_element(intObj[:metadata][:distributorInfo], 'roleName')
aMRContactsDup = Marshal::load(Marshal.dump(aMRContacts))
aMRContactsDup.each do |hResponsibility|