dor-services 9.2.1 → 9.6.1

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
  SHA256:
3
- metadata.gz: 39bd6a1c73843860a182c886b4075b6a6c7216c69cec108467d76e72bbba658d
4
- data.tar.gz: c49fbea2b7311b3bd80640b90c764ad54bbf959b27f4f8994c4d3a9c38ccb403
3
+ metadata.gz: '00984fb52f721f76280cdedaa3c4a4d7bf99416530eccccef6d8682f6bb35b18'
4
+ data.tar.gz: 42b67e4ad809eefd062cc6ac8eaf4103f95fb5f89d4057efbc3107c51260c9ab
5
5
  SHA512:
6
- metadata.gz: a9e04dcdc34a7d0df4265b77e08f5b20756325418ccfee501216c813bdbb5393f5295633e5f2b41e7898e1a87ca5a5cc3d42e63a6ca6d421de00b3fb281dd2fb
7
- data.tar.gz: 826b55305ff535e531a0531dd0673e82a5df710343121329fe2443bd642dd45771cea326ecf956da1973447a32f10946e9341806ea596a9e2d014ffa9129e6ba
6
+ metadata.gz: 1d8fdc37e4576ac1ddf40aaa13cb718b5198e3f0803246ba42811a886bfafed1a6df14587adf1cacf145c72a677232cdc1fc431b15b026ca0f31b90afb446f19
7
+ data.tar.gz: ee3dc7f2d342b557b543261ccdf3086403b32724f18246a653538d8d37fffae6e5dc203ba46d8e21e49096323377009dc79c6012c3aa905930cea7ace85412a7
@@ -0,0 +1,29 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIE3zCCAscCCQCcUJVDTu7rPzANBgkqhkiG9w0BAQUFADCBvzELMAkGA1UEBhMC
3
+ VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCFN0YW5mb3JkMRwwGgYD
4
+ VQQKExNTdGFuZm9yZCBVbml2ZXJzaXR5MRIwEAYDVQQLEwlMaWJyYXJpZXMxJTAj
5
+ BgNVBAMTHFNVTCBET1IgKGRldi90ZXN0KSBhY2Nlc3MgQ0ExLzAtBgkqhkiG9w0B
6
+ CQEWIHN1bC13ZWJ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R
17
+ MQ6V705h2y+FUmwufpFyqCVunC1zJu6mZG9TNEjXzyFBnb4jcEjsMm6DCrVA6zOx
18
+ 3iWd+rLNxIpN3fhskzclNnhn+WhGo7xktuIrVDHvAoGBAPLWVVLKTllQkWIFaRu2
19
+ GA08yMuP1DFX0JcOrqi+BuUeDkslEh8N8oMGld9hnSojzBg/Hkd/fmN6Q4RO5qQe
20
+ QqH90oUCk9Tzordx9EAxHEgt03dDYFwG0Eb+68lZc/23PNGZ2Vr8+F/lxCAVMtH3
21
+ Avnyw3Gx/pj54zcpiYin8DqNAoGBAKSqcdfSX9Id6ZvES0E83Zs4p486vkEaCB8H
22
+ j4y7veS1vDrdWmbfJYelw1/lSMiaMv8qVgj6DYwJGmdH4rrKPrFbY55PD1dmpdjC
23
+ YdYlkMk3XIopsc6pimkx3GTIYJSe5iU5O762ZYo58IGNOcr6W6eWV7D8UiTlESOy
24
+ 52yR5gGjAoGALfzgCSIAVlOli3a7m3aMWUtGhp+sVi7jGLE9NHTwFXnkYEoXmR+v
25
+ 5CIvK8IzwtATEomoAa2GKGek8MSE+H1/o+SrGL9PIATnzuEZeJOIMnGa5mO26a9/
26
+ eV2Qud4v/7qD2P2VnCVYaAMYqS6l0SxB11/UhuQiWdpITxy44CK1Jk8=
27
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ cert_dir = File.join(File.dirname(__FILE__), 'certs')
4
+
5
+ # rubocop:disable Metrics/BlockLength
6
+ Dor::Config.configure do
7
+ fedora do
8
+ url 'https://sul-dor-prod.stanford.edu/fedora'
9
+ end
10
+
11
+ ssl do
12
+ cert_file File.join(cert_dir, 'dlss-dev-petucket-dor-prod.crt')
13
+ key_file File.join(cert_dir, 'dlss-dev-petucket-dor-prod.key')
14
+ key_pass ''
15
+ end
16
+
17
+ sdr do
18
+ # url 'https://sdrAdmin:sdrPass@sdr-services-test.stanford.edu/sdr/'
19
+ local_workspace_root '/dor/workspace'
20
+ local_export_home '/dor/export'
21
+ datastreams do
22
+ administrativeMetadata 'optional'
23
+ contentMetadata 'optional'
24
+ descMetadata 'required'
25
+ defaultObjectRights 'optional'
26
+ events 'optional'
27
+ embargoMetadata 'optional'
28
+ identityMetadata 'required'
29
+ provenanceMetadata 'required'
30
+ relationshipMetadata 'required'
31
+ rightsMetadata 'optional'
32
+ roleMetadata 'optional'
33
+ sourceMetadata 'optional'
34
+ technicalMetadata 'optional'
35
+ versionMetadata 'required'
36
+ workflows 'optional'
37
+ geoMetadata 'optional'
38
+ end
39
+ end
40
+
41
+ suri do
42
+ mint_ids true
43
+ id_namespace 'druid'
44
+ url 'http://sul-lyberservices-test.stanford.edu'
45
+ user 'labware'
46
+ pass 'lyberteam'
47
+ end
48
+
49
+ solr.url 'https://sul-solr-tester.stanford.edu/argo_prod'
50
+ workflow.url 'https://sul-lyberservices-prod.stanford.edu/workflow/'
51
+ dor_services.url 'https://dorAdmin:dorAdmin@sul-lyberservices-test.stanford.edu/dor'
52
+
53
+ purl do
54
+ base_url 'https://purl-test.stanford.edu/'
55
+ end
56
+
57
+ remediation do
58
+ check_for_versioning_required false # this MUST be true in production; can be false in development and test if you want to ignore workflow checks
59
+ check_for_in_accessioning false # this MUST be true in production; can be false in development and test if you want to ignore workflow checks
60
+ end
61
+
62
+ dor do
63
+ service_root 'https://dorAdmin:dorAdmin@sul-lyberservices-test.stanford.edu/dor/v1'
64
+ num_attempts 3 # the number of attempts to contact the dor web service before throwing an exception
65
+ sleep_time 2 # sleep time in seconds between attempts to contact the dor service
66
+ default_label 'Untitled' # the default label for an object that is registered when no label is provided in the manifest
67
+ end
68
+
69
+ content do
70
+ content_user 'lyberadmin'
71
+ content_base_dir '/dor/workspace/'
72
+ content_server 'lyberservices-test'
73
+ end
74
+
75
+ status do
76
+ indexer_url 'http://sulstats-raw.stanford.edu//render/?format=json&from=-1minute&until=now&target=stats.gauges.dor-prod.argo.reindexqueue.queue-size.count'
77
+ end
78
+
79
+ stacks do
80
+ document_cache_storage_root '/home/lyberadmin/document_cache'
81
+ document_cache_host 'purl-test.stanford.edu'
82
+ document_cache_user 'lyberadmin'
83
+ local_workspace_root '/dor/workspace'
84
+ storage_root '/stacks'
85
+ host 'stacks-test.stanford.edu'
86
+ user 'lyberadmin'
87
+ end
88
+ end
89
+ # rubocop:enable Metrics/BlockLength
@@ -29,7 +29,7 @@ module Dor
29
29
  @logger ||= if defined?(::Rails) && ::Rails.respond_to?(:logger)
30
30
  Rails.logger
31
31
  else
32
- Logger.new(STDOUT)
32
+ Logger.new($stdout)
33
33
  end
34
34
  end
35
35
  end
@@ -92,7 +92,6 @@ module Dor
92
92
  autoload :OpenDataLicenseService
93
93
  autoload :SearchService
94
94
  autoload :SuriService
95
- autoload :TagService
96
95
  end
97
96
 
98
97
  eager_load!
@@ -6,7 +6,7 @@ module Dor
6
6
  class ContentMetadataDS < ActiveFedora::OmDatastream
7
7
  set_terminology do |t|
8
8
  t.root path: 'contentMetadata', index_as: [:not_searchable]
9
- t.contentType path: '/contentMetadata/@type', index_as: [:not_searchable]
9
+ t.contentType path: { attribute: 'type' }, index_as: [:not_searchable]
10
10
  t.stacks path: '/contentMetadata/@stacks', index_as: [:not_searchable]
11
11
  t.resource(index_as: [:not_searchable]) do
12
12
  t.id_ path: { attribute: 'id' }
@@ -35,6 +35,10 @@ module Dor
35
35
  t.shelved_file_id proxy: %i[resource shelved_file id], index_as: %i[displayable stored_searchable]
36
36
  end
37
37
 
38
+ def self.xml_template
39
+ Nokogiri::XML.parse('<contentMetadata/>')
40
+ end
41
+
38
42
  ### READ ONLY METHODS
39
43
 
40
44
  # Only use this when you want the behavior of raising an exception if anything besides exactly one matching node
@@ -8,6 +8,7 @@ module Dor
8
8
  # ids for previous and current catkeys
9
9
  CATKEY_TYPE_ID = 'catkey'
10
10
  PREVIOUS_CATKEY_TYPE_ID = 'previous_catkey'
11
+ BARCODE_TYPE_ID = 'barcode'
11
12
 
12
13
  set_terminology do |t|
13
14
  t.root(path: 'identityMetadata')
@@ -69,16 +70,6 @@ module Dor
69
70
  end
70
71
  alias source_id= sourceId=
71
72
 
72
- def tags
73
- tag
74
- end
75
-
76
- # helper method to get just the content type tag
77
- def content_type_tag
78
- content_tag = tags.select { |tag| tag.include?('Process : Content Type') }
79
- content_tag.size == 1 ? content_tag[0].split(':').last.strip : ''
80
- end
81
-
82
73
  def otherId(type = nil)
83
74
  result = find_by_terms(:otherId).to_a
84
75
  if type.nil?
@@ -154,6 +145,25 @@ module Dor
154
145
  otherId(PREVIOUS_CATKEY_TYPE_ID)
155
146
  end
156
147
 
148
+ def barcode
149
+ otherId(BARCODE_TYPE_ID).first
150
+ end
151
+
152
+ # Convenience method to set the barcode
153
+ # @param [String] val the new barcode
154
+ # @return [String] same value, as per Ruby assignment convention
155
+ def barcode=(val)
156
+ if val.blank? # if we are setting the barcode to blank, remove the node from XML
157
+ remove_other_Id(BARCODE_TYPE_ID)
158
+ elsif barcode.blank? # if there is no current barcode, then add it
159
+ add_other_Id(BARCODE_TYPE_ID, val)
160
+ else # if there is a current barcode, update the current barcode to the new value
161
+ update_other_Id(BARCODE_TYPE_ID, val)
162
+ end
163
+
164
+ val
165
+ end
166
+
157
167
  # Helper method to get the release tags as a nodeset
158
168
  # @return [Nokogiri::XML::NodeSet] all release tags and their attributes
159
169
  def release_tags
@@ -170,61 +180,6 @@ module Dor
170
180
  return_hash
171
181
  end
172
182
 
173
- def to_solr(solr_doc = {}, *args)
174
- solr_doc = super(solr_doc, *args)
175
-
176
- if digital_object.respond_to?(:profile)
177
- digital_object.profile.each_pair do |property, value|
178
- add_solr_value(solr_doc, property.underscore, value, (property =~ /Date/ ? :date : :symbol), [:stored_searchable])
179
- end
180
- end
181
-
182
- if sourceId.present?
183
- (name, id) = sourceId.split(/:/, 2)
184
- add_solr_value(solr_doc, 'dor_id', id, :symbol, [:stored_searchable])
185
- add_solr_value(solr_doc, 'identifier', sourceId, :symbol, [:stored_searchable])
186
- add_solr_value(solr_doc, 'source_id', sourceId, :symbol, [])
187
- end
188
- otherId.compact.each do |qid|
189
- # this section will solrize barcode and catkey, which live in otherId
190
- (name, id) = qid.split(/:/, 2)
191
- add_solr_value(solr_doc, 'dor_id', id, :symbol, [:stored_searchable])
192
- add_solr_value(solr_doc, 'identifier', qid, :symbol, [:stored_searchable])
193
- add_solr_value(solr_doc, "#{name}_id", id, :symbol, [])
194
- end
195
-
196
- # do some stuff to make tags in general and project tags specifically more easily searchable and facetable
197
- find_by_terms(:tag).each do |tag|
198
- (prefix, rest) = tag.text.split(/:/, 2)
199
- prefix = prefix.downcase.strip.gsub(/\s/, '_')
200
- unless rest.nil?
201
- # this part will index a value in a field specific to the tag, e.g. registered_by_tag_*,
202
- # book_tag_*, project_tag_*, remediated_by_tag_*, etc. project_tag_* and registered_by_tag_*
203
- # definitley get used, but most don't. we can limit the prefixes that get solrized if things
204
- # get out of hand.
205
- add_solr_value(solr_doc, "#{prefix}_tag", rest.strip, :symbol, [])
206
- end
207
-
208
- # solrize each possible prefix for the tag, inclusive of the full tag.
209
- # e.g., for a tag such as "A : B : C", this will solrize to an _ssim field
210
- # that contains ["A", "A : B", "A : B : C"].
211
- tag_parts = tag.text.split(/:/)
212
- progressive_tag_prefix = ''
213
- tag_parts.each_with_index do |part, index|
214
- progressive_tag_prefix += ' : ' if index > 0
215
- progressive_tag_prefix += part.strip
216
- add_solr_value(solr_doc, 'exploded_tag', progressive_tag_prefix, :symbol, [])
217
- end
218
- end
219
-
220
- solr_doc
221
- end
222
-
223
- # maintain AF < 8 indexing behavior
224
- def prefix
225
- ''
226
- end
227
-
228
183
  private
229
184
 
230
185
  # Convert one release element into a Hash
@@ -64,6 +64,7 @@ module Dor
64
64
  'world-nd' => 'World (no-download)',
65
65
  'stanford' => 'Stanford',
66
66
  'stanford-nd' => 'Stanford (no-download)',
67
+ 'cdl-stanford-nd' => 'Controlled Digital Lending (no-download)',
67
68
  'loc:spec' => 'Location: Special Collections',
68
69
  'loc:music' => 'Location: Music Library',
69
70
  'loc:ars' => 'Location: Archive of Recorded Sound',
@@ -98,12 +99,14 @@ module Dor
98
99
  # @param rights_xml [ng_xml] a nokogiri xml (ruby) object that represents the rights xml for a DOR object
99
100
  # @param rights_type [string] a recognized rights type code ('world', 'dark', 'loc:spec', etc)
100
101
  def self.upd_rights_xml_for_rights_type(rights_xml, rights_type)
102
+ # Note: The discover node is either 'none' for a dark object or 'world' for any other rights option
101
103
  label = rights_type == 'dark' ? 'none' : 'world'
102
104
  rights_xml.search('//rightsMetadata/access[@type=\'discover\']/machine').each do |node|
103
105
  node.children.remove
104
106
  node.add_child Nokogiri::XML::Node.new(label, rights_xml)
105
107
  end
106
108
 
109
+ # The read node varies by rights option
107
110
  rights_xml.search('//rightsMetadata/access[@type=\'read\']').each do |node|
108
111
  node.children.remove
109
112
  machine_node = Nokogiri::XML::Node.new('machine', rights_xml)
@@ -121,6 +124,13 @@ module Dor
121
124
  loc_node = Nokogiri::XML::Node.new('location', rights_xml)
122
125
  loc_node.content = rights_type.split(':').last
123
126
  machine_node.add_child(loc_node)
127
+ elsif rights_type.start_with?('cdl')
128
+ cdl_node = Nokogiri::XML::Node.new('cdl', rights_xml)
129
+ group_node = Nokogiri::XML::Node.new('group', cdl_node)
130
+ group_node.content = 'stanford'
131
+ group_node.set_attribute('rule', 'no-download')
132
+ cdl_node.add_child(group_node)
133
+ machine_node.add_child(cdl_node)
124
134
  else # we know it is none or dark by the argument filter (first line)
125
135
  machine_node.add_child Nokogiri::XML::Node.new('none', rights_xml)
126
136
  end
@@ -144,73 +154,6 @@ module Dor
144
154
  @dra_object = nil # until TODO complete, we'll expect to have to reparse after modification
145
155
  end
146
156
 
147
- def to_solr(solr_doc = {}, *args)
148
- solr_doc = super(solr_doc, *args)
149
- dra = dra_object
150
- solr_doc['rights_primary_ssi'] = dra.index_elements[:primary]
151
- solr_doc['rights_errors_ssim'] = dra.index_elements[:errors] if dra.index_elements[:errors].size > 0
152
- solr_doc['rights_characteristics_ssim'] = dra.index_elements[:terms] if dra.index_elements[:terms].size > 0
153
-
154
- solr_doc['rights_descriptions_ssim'] = [
155
- dra.index_elements[:primary],
156
-
157
- (dra.index_elements[:obj_locations_qualified] || []).map do |rights_info|
158
- rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
159
- "location: #{rights_info[:location]}#{rule_suffix}"
160
- end,
161
- (dra.index_elements[:file_locations_qualified] || []).map do |rights_info|
162
- rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
163
- "location: #{rights_info[:location]} (file)#{rule_suffix}"
164
- end,
165
-
166
- (dra.index_elements[:obj_agents_qualified] || []).map do |rights_info|
167
- rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
168
- "agent: #{rights_info[:agent]}#{rule_suffix}"
169
- end,
170
- (dra.index_elements[:file_agents_qualified] || []).map do |rights_info|
171
- rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
172
- "agent: #{rights_info[:agent]} (file)#{rule_suffix}"
173
- end,
174
-
175
- (dra.index_elements[:obj_groups_qualified] || []).map do |rights_info|
176
- rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
177
- "#{rights_info[:group]}#{rule_suffix}"
178
- end,
179
- (dra.index_elements[:file_groups_qualified] || []).map do |rights_info|
180
- rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
181
- "#{rights_info[:group]} (file)#{rule_suffix}"
182
- end,
183
-
184
- (dra.index_elements[:obj_world_qualified] || []).map do |rights_info|
185
- rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
186
- "world#{rule_suffix}"
187
- end,
188
- (dra.index_elements[:file_world_qualified] || []).map do |rights_info|
189
- rule_suffix = rights_info[:rule] ? " (#{rights_info[:rule]})" : ''
190
- "world (file)#{rule_suffix}"
191
- end
192
- ].flatten.uniq
193
-
194
- # these two values are returned by index_elements[:primary], but are just a less granular version of
195
- # what the other more specific fields return, so discard them
196
- solr_doc['rights_descriptions_ssim'] -= %w[access_restricted access_restricted_qualified world_qualified]
197
- solr_doc['rights_descriptions_ssim'] += ['dark (file)'] if dra.index_elements[:terms].include? 'none_read_file'
198
-
199
- solr_doc['obj_rights_locations_ssim'] = dra.index_elements[:obj_locations] unless dra.index_elements[:obj_locations].blank?
200
- solr_doc['file_rights_locations_ssim'] = dra.index_elements[:file_locations] unless dra.index_elements[:file_locations].blank?
201
- solr_doc['obj_rights_agents_ssim'] = dra.index_elements[:obj_agents] unless dra.index_elements[:obj_agents].blank?
202
- solr_doc['file_rights_agents_ssim'] = dra.index_elements[:file_agents] unless dra.index_elements[:file_agents].blank?
203
-
204
- # suppress empties
205
- %w(use_statement_ssim copyright_ssim).each do |key|
206
- solr_doc[key] = solr_doc[key].reject(&:blank?).flatten unless solr_doc[key].nil?
207
- end
208
- add_solr_value(solr_doc, 'use_license_machine', use_license.first, :string, [:stored_sortable])
209
- add_solr_value(solr_doc, 'use_licenses_machine', use_license, :symbol, [:stored_searchable])
210
-
211
- solr_doc
212
- end
213
-
214
157
  def use_license
215
158
  use_license = []
216
159
  use_license += Array(creative_commons)
@@ -219,11 +162,6 @@ module Dor
219
162
  use_license.reject(&:blank?)
220
163
  end
221
164
 
222
- # maintain AF < 8 indexing behavior
223
- def prefix
224
- ''
225
- end
226
-
227
165
  def rights
228
166
  xml = ng_xml
229
167
  if xml.search('//rightsMetadata/access[@type=\'read\']/machine/group').length == 1
@@ -112,7 +112,7 @@ module Dor
112
112
  def current_version_id
113
113
  current_version = current_version_node
114
114
  if current_version.nil?
115
- return '1'
115
+ '1'
116
116
  else
117
117
  current_version[:versionId].to_s
118
118
  end
@@ -157,9 +157,9 @@ module Dor
157
157
  def current_version_closeable?
158
158
  current = current_version_node
159
159
  if current[:tag] && current.at_xpath('description')
160
- return true
160
+ true
161
161
  else
162
- return false
162
+ false
163
163
  end
164
164
  end
165
165
 
@@ -76,11 +76,11 @@ module Dor
76
76
 
77
77
  delegate :full_title, :stanford_mods, to: :descMetadata
78
78
  delegate :rights, to: :rightsMetadata
79
- delegate :catkey, :catkey=, :source_id, :source_id=,
79
+ delegate :catkey, :catkey=, :source_id, :source_id=, :barcode, :barcode=,
80
80
  :objectId, :objectId=, :objectCreator, :objectCreator=,
81
81
  :objectLabel, :objectLabel=, :objectType, :objectType=,
82
- :other_ids=, :otherId, :tag=, :tags, :release_tags,
83
- :previous_catkeys, :content_type_tag, to: :identityMetadata
82
+ :other_ids=, :otherId, :release_tags, :previous_catkeys,
83
+ to: :identityMetadata
84
84
 
85
85
  def read_rights=(rights)
86
86
  rightsMetadata.set_read_rights(rights)
@@ -1,13 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'deprecation'
4
+
3
5
  module Dor
4
6
  class AdminPolicyObject < Dor::Abstract
7
+ extend Deprecation
5
8
  has_many :things, property: :is_governed_by, class_name: 'ActiveFedora::Base'
6
9
  has_object_type 'adminPolicy'
7
10
  has_metadata name: 'administrativeMetadata', type: Dor::AdministrativeMetadataDS, label: 'Administrative Metadata'
8
11
  has_metadata name: 'roleMetadata', type: Dor::RoleMetadataDS, label: 'Role Metadata'
9
12
  has_metadata name: 'defaultObjectRights', type: Dor::DefaultObjectRightsDS, label: 'Default Object Rights'
10
- belongs_to :agreement_object, property: :referencesAgreement, class_name: 'Dor::Item'
13
+ belongs_to :agreement_object, property: :referencesAgreement, class_name: 'Dor::Agreement'
11
14
 
12
15
  delegate :add_roleplayer, :purge_roles, :roles, to: :roleMetadata
13
16
  delegate :mods_title, :mods_title=, to: :descMetadata
@@ -29,11 +32,13 @@ module Dor
29
32
  def agreement
30
33
  agreement_object ? agreement_object.pid : ''
31
34
  end
35
+ deprecation_deprecate agreement: 'use #agreement_object_id instead'
32
36
 
33
37
  def agreement=(val)
34
38
  raise ArgumentError, 'agreement must have a valid druid' if val.blank?
35
39
 
36
40
  self.agreement_object = Dor.find val.to_s, cast: true
37
41
  end
42
+ deprecation_deprecate :agreement= => 'use #agreement_object_id= instead'
38
43
  end
39
44
  end
@@ -22,10 +22,11 @@ module Dor
22
22
  :regactiondttm, :documentaccess, :submit_date, :symphonyStatus,
23
23
  datastream: 'properties', multiple: false
24
24
 
25
- has_attributes :citation_verified, :abstract_provided, :dissertation_uploaded,
26
- :supplemental_files_uploaded, :permissions_provided,
27
- :permission_files_uploaded, :rights_selected,
28
- :cc_license_selected, :submitted_to_registrar,
25
+ has_attributes :citation_verified, :abstract_provided, :format_reviewed,
26
+ :dissertation_uploaded, :supplemental_files_uploaded,
27
+ :permissions_provided, :permission_files_uploaded,
28
+ :rights_selected, :cc_license_selected,
29
+ :submitted_to_registrar,
29
30
  datastream: 'workflow', multiple: false
30
31
 
31
32
  has_metadata name: 'properties', type: ActiveFedora::SimpleDatastream, versionable: false do |m|
@@ -77,6 +78,7 @@ module Dor
77
78
  has_metadata name: 'workflow', type: ActiveFedora::SimpleDatastream, versionable: false do |m|
78
79
  m.field 'citation_verified', :string
79
80
  m.field 'abstract_provided', :string
81
+ m.field 'format_reviewed', :string
80
82
  m.field 'dissertation_uploaded', :string
81
83
  m.field 'supplemental_files_uploaded', :string
82
84
  m.field 'permissions_provided', :string
@@ -27,9 +27,10 @@ module Dor
27
27
  end
28
28
 
29
29
  def query_by_id(id)
30
- if id.is_a?(Hash) # Single valued: { :google => 'STANFORD_0123456789' }
30
+ case id
31
+ when Hash # Single valued: { :google => 'STANFORD_0123456789' }
31
32
  id = id.collect { |*v| v.join(':') }.first
32
- elsif id.is_a?(Array) # Two values: [ 'google', 'STANFORD_0123456789' ]
33
+ when Array # Two values: [ 'google', 'STANFORD_0123456789' ]
33
34
  id = id.join(':')
34
35
  end
35
36
  q = "{!term f=#{Solrizer.solr_name 'identifier', :symbol}}#{id}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dor
4
- VERSION = '9.2.1'
4
+ VERSION = '9.6.1'
5
5
  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: 9.2.1
4
+ version: 9.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klein
@@ -20,7 +20,7 @@ authors:
20
20
  autorequire:
21
21
  bindir: bin
22
22
  cert_chain: []
23
- date: 2020-03-16 00:00:00.000000000 Z
23
+ date: 2020-08-27 00:00:00.000000000 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: active-fedora
@@ -338,14 +338,14 @@ dependencies:
338
338
  requirements:
339
339
  - - "~>"
340
340
  - !ruby/object:Gem::Version
341
- version: 0.74.0
341
+ version: '0.74'
342
342
  type: :development
343
343
  prerelease: false
344
344
  version_requirements: !ruby/object:Gem::Requirement
345
345
  requirements:
346
346
  - - "~>"
347
347
  - !ruby/object:Gem::Version
348
- version: 0.74.0
348
+ version: '0.74'
349
349
  - !ruby/object:Gem::Dependency
350
350
  name: rubocop-rspec
351
351
  requirement: !ruby/object:Gem::Requirement
@@ -410,7 +410,13 @@ extensions: []
410
410
  extra_rdoc_files: []
411
411
  files:
412
412
  - config/certs/README
413
+ - config/certs/dlss-dev-petucket-dor-dev.crt
414
+ - config/certs/dlss-dev-petucket-dor-dev.csr
415
+ - config/certs/dlss-dev-petucket-dor-dev.key
416
+ - config/certs/dlss-dev-petucket-dor-prod.crt
417
+ - config/certs/dlss-dev-petucket-dor-prod.key
413
418
  - config/config_defaults.yml
419
+ - config/dev_console_env.rb
414
420
  - config/dev_console_env.rb.example
415
421
  - config/predicate_mappings.yml
416
422
  - lib/dor-services.rb
@@ -450,7 +456,6 @@ files:
450
456
  - lib/dor/services/open_data_license_service.rb
451
457
  - lib/dor/services/search_service.rb
452
458
  - lib/dor/services/suri_service.rb
453
- - lib/dor/services/tag_service.rb
454
459
  - lib/dor/static_config.rb
455
460
  - lib/dor/static_config/fedora_config.rb
456
461
  - lib/dor/static_config/solr_config.rb
@@ -1,100 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dor
4
- # Manage tags on an object
5
- class TagService
6
- def self.add(item, tag)
7
- new(item).add(tag)
8
- end
9
-
10
- def self.remove(item, tag)
11
- new(item).remove(tag)
12
- end
13
-
14
- def self.update(item, old_tag, new_tag)
15
- new(item).update(old_tag, new_tag)
16
- end
17
-
18
- def initialize(item)
19
- @item = item
20
- end
21
-
22
- # Add an administrative tag to an item, you will need to seperately save the item to write it to fedora
23
- # @param tag [string] The tag you wish to add
24
- def add(tag)
25
- normalized_tag = validate_and_normalize_tag(tag, identity_metadata.tags)
26
- identity_metadata.add_value(:tag, normalized_tag)
27
- end
28
-
29
- def remove(tag)
30
- normtag = normalize_tag(tag)
31
- tag_nodes
32
- .select { |node| normalize_tag(node.content) == normtag }
33
- .each { identity_metadata.ng_xml_will_change! }
34
- .each(&:remove)
35
- .any?
36
- end
37
-
38
- def update(old_tag, new_tag)
39
- normtag = normalize_tag(old_tag)
40
- tag_nodes
41
- .select { |node| normalize_tag(node.content) == normtag }
42
- .each { identity_metadata.ng_xml_will_change! }
43
- .each { |node| node.content = normalize_tag(new_tag) }
44
- .any?
45
- end
46
-
47
- private
48
-
49
- attr_reader :item
50
- def identity_metadata
51
- item.identityMetadata
52
- end
53
-
54
- def tag_nodes
55
- identity_metadata.ng_xml.search('//tag')
56
- end
57
-
58
- # turns a tag string into an array with one element per tag part.
59
- # split on ":", disregard leading and trailing whitespace on tokens.
60
- def split_tag_to_arr(tag_str)
61
- tag_str.split(':').map(&:strip)
62
- end
63
-
64
- # turn a tag array back into a tag string with a standard format
65
- def normalize_tag_arr(tag_arr)
66
- tag_arr.join(' : ')
67
- end
68
-
69
- # take a tag string and return a normalized tag string
70
- def normalize_tag(tag_str)
71
- normalize_tag_arr(split_tag_to_arr(tag_str))
72
- end
73
-
74
- # take a proposed tag string and a list of the existing tags for the object being edited. if
75
- # the proposed tag is valid, return it in normalized form. if not, raise an exception with an
76
- # explanatory message.
77
- def validate_and_normalize_tag(tag_str, existing_tag_list)
78
- tag_arr = validate_tag_format(tag_str)
79
-
80
- # note that the comparison for duplicate tags is case-insensitive, but we don't change case as part of the normalized version
81
- # we return, because we want to preserve the user's intended case.
82
- normalized_tag = normalize_tag_arr(tag_arr)
83
- dupe_existing_tag = existing_tag_list.detect { |existing_tag| normalize_tag(existing_tag).casecmp(normalized_tag) == 0 }
84
- raise "An existing tag (#{dupe_existing_tag}) is the same, consider using update_tag?" if dupe_existing_tag
85
-
86
- normalized_tag
87
- end
88
-
89
- # Ensure that an administrative tag meets the proper mininum format
90
- # @param tag_str [String] the tag
91
- # @return [Array] the tag split into an array via ':'
92
- def validate_tag_format(tag_str)
93
- tag_arr = split_tag_to_arr(tag_str)
94
- raise ArgumentError, "Invalid tag structure: tag '#{tag_str}' must have at least 2 elements" if tag_arr.length < 2
95
- raise ArgumentError, "Invalid tag structure: tag '#{tag_str}' contains empty elements" if tag_arr.detect(&:empty?)
96
-
97
- tag_arr
98
- end
99
- end
100
- end