dor-services-client 7.9.0 → 7.10.0
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 +4 -4
- data/README.md +1 -1
- data/lib/dor/services/client/metadata.rb +14 -0
- data/lib/dor/services/client/mutate.rb +2 -2
- data/lib/dor/services/client/object.rb +7 -1
- data/lib/dor/services/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 247737e90861ec22f94636b9936d5ba4fb6c9d9a590230a9960a5fc516ae1032
|
4
|
+
data.tar.gz: d9f21704c7da9cc694b2030efc6e5790ab30150ac3a6303cff3fb45bcd49eb0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52b93852476f4a7893e3d4e56e471dd262d674a62cf0172745546e0b08a7aea65b861bd28b1e48f86c9f3e1da261c9527e4b5aa3206b919e83c6e2451af44d84
|
7
|
+
data.tar.gz: 27c897c3f1bc2fef7bb7f7494292df2320f9768df5c8822b10eff38b28b818a9087e438b693f74a7fb307731dd02be688c827557ff631e93b997330f8a306086
|
data/README.md
CHANGED
@@ -112,7 +112,7 @@ object_client.preserve(lane_id: 'low')
|
|
112
112
|
object_client.update_marc_record
|
113
113
|
|
114
114
|
# Copy metadata from Symphony into descMetadata
|
115
|
-
object_client.
|
115
|
+
object_client.refresh_descriptive_metadata_from_ils
|
116
116
|
|
117
117
|
# Apply defaults from the item's AdminPolicy to the item itself
|
118
118
|
object_client.apply_admin_policy_defaults
|
@@ -87,6 +87,20 @@ module Dor
|
|
87
87
|
raise_exception_based_on_response!(resp, object_identifier)
|
88
88
|
end
|
89
89
|
|
90
|
+
# Update the MODS XML metadata
|
91
|
+
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
92
|
+
# @return [boolean] true on success
|
93
|
+
def update_mods(mods_xml)
|
94
|
+
resp = connection.put do |req|
|
95
|
+
req.url "#{base_path}/mods"
|
96
|
+
req.headers['Content-Type'] = 'application/xml'
|
97
|
+
req.body = mods_xml
|
98
|
+
end
|
99
|
+
return if resp.success?
|
100
|
+
|
101
|
+
raise_exception_based_on_response!(resp, object_identifier)
|
102
|
+
end
|
103
|
+
|
90
104
|
# rubocop:disable Lint/StructNewOverride
|
91
105
|
Datastream = Struct.new(:label, :dsid, :pid, :size, :mimeType, :versionId, keyword_init: true)
|
92
106
|
# rubocop:enable Lint/StructNewOverride
|
@@ -26,7 +26,7 @@ module Dor
|
|
26
26
|
end
|
27
27
|
|
28
28
|
# Updates the object
|
29
|
-
# @param [Cocina::Models::
|
29
|
+
# @param [Cocina::Models::DRO,Cocina::Models::Collection,Cocina::Models::AdminPolicy] params model object
|
30
30
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
31
31
|
# @raise [UnexpectedResponse] when the response is not successful.
|
32
32
|
# @return [Cocina::Models::DRO,Cocina::Models::Collection,Cocina::Models::AdminPolicy] the returned model
|
@@ -48,7 +48,7 @@ module Dor
|
|
48
48
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
49
49
|
# @raise [UnexpectedResponse] when the response is not successful.
|
50
50
|
# @return [boolean] true on success
|
51
|
-
def
|
51
|
+
def refresh_descriptive_metadata_from_ils
|
52
52
|
resp = connection.post do |req|
|
53
53
|
req.url "#{object_path}/refresh_metadata"
|
54
54
|
end
|
@@ -1,10 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'deprecation'
|
4
|
+
|
3
5
|
module Dor
|
4
6
|
module Services
|
5
7
|
class Client
|
6
8
|
# API calls that are about a repository object
|
7
9
|
class Object < VersionedService
|
10
|
+
extend Deprecation
|
8
11
|
attr_reader :object_identifier
|
9
12
|
|
10
13
|
# @param object_identifier [String] the pid for the object
|
@@ -89,7 +92,10 @@ module Dor
|
|
89
92
|
Mutate.new(**parent_params)
|
90
93
|
end
|
91
94
|
|
92
|
-
delegate :
|
95
|
+
delegate :refresh_descriptive_metadata_from_ils, :update, :destroy, :apply_admin_policy_defaults, to: :mutate
|
96
|
+
|
97
|
+
alias refresh_metadata refresh_descriptive_metadata_from_ils
|
98
|
+
deprecation_deprecate refresh_metadata: 'Use refresh_descriptive_metadata_from_ils instead'
|
93
99
|
|
94
100
|
# Update the marc record for the given object
|
95
101
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|