150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
# File 'lib/search_solr_tools/translators/nsidc_json.rb', line 150
def translate_personnel_and_creators_to_authors(personnel_json, creator_json)
author_set = (personnel_json.to_a | creator_json.to_a)
authors = author_set.map do |author|
first = author['firstName'].to_s
middle = author['middleName'].to_s
last = author['lastName'].to_s
full = [first, middle, last].reject(&:empty?)
full.join(' ').strip
end
authors.reject! do |author|
author.empty? || author == 'NSIDC User Services'
end
authors.uniq
end
|