dor-services 5.8.2 → 5.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6780a7a945647fee66a03d09d0078f0380e5b843
4
- data.tar.gz: 2038417c3ca307187099e6d4a8b40e6f4b86d8cd
3
+ metadata.gz: 4e4fe1b937312d6f71a812a8ad3af0b93e00feb8
4
+ data.tar.gz: ffb4c41c9e24148d550d489ca1507cd622249049
5
5
  SHA512:
6
- metadata.gz: e09e6078eb545cbcfba2e232c4e96c693d5864d194141afcbf6e703d96d15c283e3c77e32d57c4089ab0bf8c4f611bf15bd85d9ce3d4fe9e7b3158aad35f0928
7
- data.tar.gz: b5824dfa9bd07fd22608ccb9434ed2f114e493de73c8e5a788f51a20133b1370dc14d4ee137f5bc42a35220325c4f818b7ef5910fe534fddadc6d9f8cc652d17
6
+ metadata.gz: 9837ee5cf8ed557e44f703b1c5384f3881088d5642c2a9ee8893fc37f43e9f58ede220bd0040f291a7b9bccb562ffef9367bc67dccd34d804475a25ae39d598f
7
+ data.tar.gz: 1dbb913bf39909c48b72986b41bf7bae31bc8a72a771e0fddd8d0d2178fe5405cc22265bf40db095e4513ab124b98ff3029fa38dc1cda63bdb7e2d915f7c4d68
@@ -101,6 +101,57 @@ module Dor
101
101
  solr_doc['rights_primary_ssi'] = dra.index_elements[:primary]
102
102
  solr_doc['rights_errors_ssim'] = dra.index_elements[:errors] if dra.index_elements[:errors].size > 0
103
103
  solr_doc['rights_characteristics_ssim'] = dra.index_elements[:terms] if dra.index_elements[:terms].size > 0
104
+
105
+ solr_doc['rights_descriptions_ssim'] = [
106
+ dra.index_elements[:primary],
107
+
108
+ (dra.index_elements[:obj_locations_qualified] || []).map do |rights_info|
109
+ rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
110
+ "location: #{rights_info[:location]}#{rule_suffix}"
111
+ end,
112
+ (dra.index_elements[:file_locations_qualified] || []).map do |rights_info|
113
+ rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
114
+ "location: #{rights_info[:location]} (file)#{rule_suffix}"
115
+ end,
116
+
117
+ (dra.index_elements[:obj_agents_qualified] || []).map do |rights_info|
118
+ rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
119
+ "agent: #{rights_info[:agent]}#{rule_suffix}"
120
+ end,
121
+ (dra.index_elements[:file_agents_qualified] || []).map do |rights_info|
122
+ rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
123
+ "agent: #{rights_info[:agent]} (file)#{rule_suffix}"
124
+ end,
125
+
126
+ (dra.index_elements[:obj_groups_qualified] || []).map do |rights_info|
127
+ rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
128
+ "#{rights_info[:group]}#{rule_suffix}"
129
+ end,
130
+ (dra.index_elements[:file_groups_qualified] || []).map do |rights_info|
131
+ rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
132
+ "#{rights_info[:group]} (file)#{rule_suffix}"
133
+ end,
134
+
135
+ (dra.index_elements[:obj_world_qualified] || []).map do |rights_info|
136
+ rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
137
+ "world#{rule_suffix}"
138
+ end,
139
+ (dra.index_elements[:file_world_qualified] || []).map do |rights_info|
140
+ rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
141
+ "world (file)#{rule_suffix}"
142
+ end
143
+ ].flatten.uniq
144
+
145
+ # these two values are returned by index_elements[:primary], but are just a less granular version of
146
+ # what the other more specific fields return, so discard them
147
+ solr_doc['rights_descriptions_ssim'].reject! { |rights_desc| ['access_restricted', 'access_restricted_qualified'].include? rights_desc }
148
+ solr_doc['rights_descriptions_ssim'] << 'dark (file)' if dra.index_elements[:terms].include? 'none_read_file'
149
+
150
+ solr_doc['obj_rights_locations_ssim'] = dra.index_elements[:obj_locations] if !dra.index_elements[:obj_locations].blank?
151
+ solr_doc['file_rights_locations_ssim'] = dra.index_elements[:file_locations] if !dra.index_elements[:file_locations].blank?
152
+ solr_doc['obj_rights_agents_ssim'] = dra.index_elements[:obj_agents] if !dra.index_elements[:obj_agents].blank?
153
+ solr_doc['file_rights_agents_ssim'] = dra.index_elements[:file_agents] if !dra.index_elements[:file_agents].blank?
154
+
104
155
  # suppress empties
105
156
  %w(use_statement_ssim copyright_ssim).each do |key|
106
157
  solr_doc[key] = solr_doc[key].reject { |val| val.nil? || val == '' }.flatten unless solr_doc[key].nil?
data/lib/dor/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '5.8.2'.freeze
2
+ VERSION = '5.9.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.8.2
4
+ version: 5.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klein
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2016-07-06 00:00:00.000000000 Z
17
+ date: 2016-07-08 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: active-fedora
@@ -323,7 +323,7 @@ dependencies:
323
323
  version: '1.0'
324
324
  - - ">="
325
325
  - !ruby/object:Gem::Version
326
- version: 1.0.2
326
+ version: 1.2.0
327
327
  type: :runtime
328
328
  prerelease: false
329
329
  version_requirements: !ruby/object:Gem::Requirement
@@ -333,7 +333,7 @@ dependencies:
333
333
  version: '1.0'
334
334
  - - ">="
335
335
  - !ruby/object:Gem::Version
336
- version: 1.0.2
336
+ version: 1.2.0
337
337
  - !ruby/object:Gem::Dependency
338
338
  name: lyber-utils
339
339
  requirement: !ruby/object:Gem::Requirement