7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/skala/primo_adapter/search/result_transformation/doc_transformation/set_identifier.rb', line 7
def call
sanitizer = Rails::Html::FullSanitizer.new
identifier_strings = transformation.read_source_values(".//display/identifier", split: ";")
identifier_strings.map!{|s| sanitizer.sanitize(s)}
isbns = (identifier_strings)
issns = (identifier_strings)
dois = (identifier_strings)
target.record.isbn = isbns
target.record.issn = issns
target.record.identifier = dois.map{|i| {type: "doi", value: i}}
end
|