cul_scv_hydra 0.18.3 → 0.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7785c32e3d0f17f24a888874d662e5f52f54847b
4
- data.tar.gz: b9a2948fdef204e83a6f8bf457f4f308341fcb81
3
+ metadata.gz: 6cf2a83344f82c3ea1feda2793081760cc08e181
4
+ data.tar.gz: 6ab5ecd724cef6f372a36049253a2f97b81daf8d
5
5
  SHA512:
6
- metadata.gz: 4c80cbb874268224cb7cf302372a039415b4ac9ec9d8cb2af87a6866f9ef39a39c42ca1de54a22ee9b0c3982c546dc6f47bb149444ced127b6aee97103170808
7
- data.tar.gz: 25bdf9e8fcd9abdfd8fec104ce8e167eeafe98a558ef0f992fa5d634f0967d577239090ca7257541d917aef67b6f94efd3fce9bb171157d58dda458b7e75cb0b
6
+ metadata.gz: 7a5f64fa56d7d49e295218f61e2863ae4e2f31b3f0552c3fa3cf46d9cdeb9d7d14174eafc03fad5d83803b07f1f3c600cce43e11f25898bdb1263fab80f3f467
7
+ data.tar.gz: 3c5180a0e9c2e491d8df704047b9db2dd625bf84c1e686b6797737211bcaffb611c71acb0a79045af1064c0d80f444c7faee8d40f6e5d0455e7d79a089614c04
@@ -263,12 +263,17 @@ module Cul::Scv::Hydra::Solrizer
263
263
  return places
264
264
  end
265
265
 
266
- def origin_info_place_without_value_uri(node=mods)
267
- places = []
266
+ def origin_info_place_for_display(node=mods)
267
+ # If there are multiple origin_info place elements, choose only the ones without valueUri attributes. Otherwise show the others.
268
+ places_with_uri = []
269
+ places_without_uri = []
270
+ node.xpath("./mods:originInfo/mods:place/mods:placeTerm[@valueUri]", MODS_NS).collect do |n|
271
+ places_with_uri << ScvModsFieldable.normalize(n.text, true)
272
+ end
268
273
  node.xpath("./mods:originInfo/mods:place/mods:placeTerm[not(@valueUri)]", MODS_NS).collect do |n|
269
- places << ScvModsFieldable.normalize(n.text, true)
274
+ places_without_uri << ScvModsFieldable.normalize(n.text, true)
270
275
  end
271
- return places
276
+ return (places_without_uri.length > 0 ? places_without_uri : places_with_uri)
272
277
  end
273
278
 
274
279
  def to_solr(solr_doc={})
@@ -298,7 +303,7 @@ module Cul::Scv::Hydra::Solrizer
298
303
  solr_doc["lib_item_in_context_url_ssm"] = item_in_context_url
299
304
  solr_doc["lib_project_url_ssm"] = project_url
300
305
  solr_doc["origin_info_place_ssm"] = origin_info_place
301
- solr_doc["origin_info_place_without_value_uri_ssm"] = origin_info_place_without_value_uri
306
+ solr_doc["origin_info_place_for_display_ssm"] = origin_info_place_for_display
302
307
 
303
308
  repo_marc_code = repository_code
304
309
  unless repo_marc_code.nil?
@@ -2,7 +2,7 @@
2
2
  module Cul
3
3
  module Scv
4
4
  module Hydra
5
- VERSION = '0.18.3'
5
+ VERSION = '0.18.4'
6
6
  def self.version
7
7
  VERSION
8
8
  end
@@ -2,7 +2,7 @@
2
2
  module Cul
3
3
  module Scv
4
4
  module Hydra
5
- VERSION = '0.18.2'
5
+ VERSION = '0.18.3'
6
6
  def self.version
7
7
  VERSION
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_scv_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.3
4
+ version: 0.18.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Armintor