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 +4 -4
- data/lib/dor/datastreams/rights_metadata_ds.rb +51 -0
- data/lib/dor/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e4fe1b937312d6f71a812a8ad3af0b93e00feb8
|
4
|
+
data.tar.gz: ffb4c41c9e24148d550d489ca1507cd622249049
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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-
|
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
|
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
|
336
|
+
version: 1.2.0
|
337
337
|
- !ruby/object:Gem::Dependency
|
338
338
|
name: lyber-utils
|
339
339
|
requirement: !ruby/object:Gem::Requirement
|