ddr_client 2.0.0.d9f2bd2b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +168 -0
- data/Rakefile +8 -0
- data/ddr_client.gemspec +46 -0
- data/docs/BatchObjectsApi.md +125 -0
- data/docs/BatchesApi.md +305 -0
- data/docs/DdrAPIBatchEntity.md +24 -0
- data/docs/DdrAPIBatchEntityLogfile.md +11 -0
- data/docs/DdrAPIBatchObjectAttributeEntity.md +16 -0
- data/docs/DdrAPIBatchObjectDatastreamEntity.md +17 -0
- data/docs/DdrAPIBatchObjectEntity.md +26 -0
- data/docs/DdrAPIBatchObjectMessageEntity.md +13 -0
- data/docs/DdrAPIBatchObjectRelationshipEntity.md +15 -0
- data/docs/DdrAPIBatchObjectRoleEntity.md +15 -0
- data/docs/DdrAPIEventEntity.md +17 -0
- data/docs/DdrAPIFileEntity.md +11 -0
- data/docs/DdrAPIGroupEntity.md +10 -0
- data/docs/DdrAPIGroupMemberEntity.md +10 -0
- data/docs/DdrAPILinkEntity.md +9 -0
- data/docs/DdrAPIResourceEntity.md +17 -0
- data/docs/DdrAPIResourceEntityFiles.md +17 -0
- data/docs/DdrAPIResourceEntityMetadata.md +62 -0
- data/docs/DdrAPIResourceEntityRelated.md +11 -0
- data/docs/DdrAPIRoleEntity.md +10 -0
- data/docs/DdrAPITechnicalMetadataEntity.md +24 -0
- data/docs/DdrAPIUserEntity.md +19 -0
- data/docs/EventsApi.md +131 -0
- data/docs/GroupsApi.md +63 -0
- data/docs/IndexApi.md +161 -0
- data/docs/PatchResources.md +11 -0
- data/docs/PatchResourcesMetadata.md +62 -0
- data/docs/PatchResourcesRelated.md +11 -0
- data/docs/PatchResourcesRoles.md +10 -0
- data/docs/PostResources.md +12 -0
- data/docs/QueuesApi.md +102 -0
- data/docs/ReportsApi.md +177 -0
- data/docs/ResourcesApi.md +1003 -0
- data/docs/SchemaApi.md +128 -0
- data/docs/UsersApi.md +131 -0
- data/git_push.sh +55 -0
- data/lib/ddr_client/api/batch_objects_api.rb +138 -0
- data/lib/ddr_client/api/batches_api.rb +306 -0
- data/lib/ddr_client/api/events_api.rb +147 -0
- data/lib/ddr_client/api/groups_api.rb +70 -0
- data/lib/ddr_client/api/index_api.rb +164 -0
- data/lib/ddr_client/api/queues_api.rb +109 -0
- data/lib/ddr_client/api/reports_api.rb +179 -0
- data/lib/ddr_client/api/resources_api.rb +1098 -0
- data/lib/ddr_client/api/schema_api.rb +152 -0
- data/lib/ddr_client/api/users_api.rb +141 -0
- data/lib/ddr_client/api_client.rb +391 -0
- data/lib/ddr_client/api_error.rb +38 -0
- data/lib/ddr_client/configuration.rb +209 -0
- data/lib/ddr_client/models/ddr_api_batch_entity.rb +333 -0
- data/lib/ddr_client/models/ddr_api_batch_entity_logfile.rb +211 -0
- data/lib/ddr_client/models/ddr_api_batch_object_attribute_entity.rb +256 -0
- data/lib/ddr_client/models/ddr_api_batch_object_datastream_entity.rb +265 -0
- data/lib/ddr_client/models/ddr_api_batch_object_entity.rb +349 -0
- data/lib/ddr_client/models/ddr_api_batch_object_message_entity.rb +230 -0
- data/lib/ddr_client/models/ddr_api_batch_object_relationship_entity.rb +247 -0
- data/lib/ddr_client/models/ddr_api_batch_object_role_entity.rb +247 -0
- data/lib/ddr_client/models/ddr_api_event_entity.rb +325 -0
- data/lib/ddr_client/models/ddr_api_file_entity.rb +215 -0
- data/lib/ddr_client/models/ddr_api_group_entity.rb +203 -0
- data/lib/ddr_client/models/ddr_api_group_member_entity.rb +202 -0
- data/lib/ddr_client/models/ddr_api_link_entity.rb +193 -0
- data/lib/ddr_client/models/ddr_api_resource_entity.rb +310 -0
- data/lib/ddr_client/models/ddr_api_resource_entity_files.rb +276 -0
- data/lib/ddr_client/models/ddr_api_resource_entity_metadata.rb +874 -0
- data/lib/ddr_client/models/ddr_api_resource_entity_related.rb +216 -0
- data/lib/ddr_client/models/ddr_api_role_entity.rb +251 -0
- data/lib/ddr_client/models/ddr_api_technical_metadata_entity.rb +329 -0
- data/lib/ddr_client/models/ddr_api_user_entity.rb +296 -0
- data/lib/ddr_client/models/patch_resources.rb +221 -0
- data/lib/ddr_client/models/patch_resources_metadata.rb +726 -0
- data/lib/ddr_client/models/patch_resources_related.rb +216 -0
- data/lib/ddr_client/models/patch_resources_roles.rb +220 -0
- data/lib/ddr_client/models/post_resources.rb +265 -0
- data/lib/ddr_client/version.rb +15 -0
- data/lib/ddr_client.rb +74 -0
- data/spec/api/batch_objects_api_spec.rb +61 -0
- data/spec/api/batches_api_spec.rb +100 -0
- data/spec/api/events_api_spec.rb +64 -0
- data/spec/api/groups_api_spec.rb +46 -0
- data/spec/api/index_api_spec.rb +67 -0
- data/spec/api/queues_api_spec.rb +55 -0
- data/spec/api/reports_api_spec.rb +70 -0
- data/spec/api/resources_api_spec.rb +271 -0
- data/spec/api/schema_api_spec.rb +65 -0
- data/spec/api/users_api_spec.rb +64 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/ddr_api_batch_entity_logfile_spec.rb +59 -0
- data/spec/models/ddr_api_batch_entity_spec.rb +137 -0
- data/spec/models/ddr_api_batch_object_attribute_entity_spec.rb +89 -0
- data/spec/models/ddr_api_batch_object_datastream_entity_spec.rb +95 -0
- data/spec/models/ddr_api_batch_object_entity_spec.rb +149 -0
- data/spec/models/ddr_api_batch_object_message_entity_spec.rb +71 -0
- data/spec/models/ddr_api_batch_object_relationship_entity_spec.rb +83 -0
- data/spec/models/ddr_api_batch_object_role_entity_spec.rb +83 -0
- data/spec/models/ddr_api_event_entity_spec.rb +103 -0
- data/spec/models/ddr_api_file_entity_spec.rb +59 -0
- data/spec/models/ddr_api_group_entity_spec.rb +53 -0
- data/spec/models/ddr_api_group_member_entity_spec.rb +53 -0
- data/spec/models/ddr_api_link_entity_spec.rb +47 -0
- data/spec/models/ddr_api_resource_entity_files_spec.rb +95 -0
- data/spec/models/ddr_api_resource_entity_metadata_spec.rb +389 -0
- data/spec/models/ddr_api_resource_entity_related_spec.rb +59 -0
- data/spec/models/ddr_api_resource_entity_spec.rb +99 -0
- data/spec/models/ddr_api_role_entity_spec.rb +61 -0
- data/spec/models/ddr_api_technical_metadata_entity_spec.rb +137 -0
- data/spec/models/ddr_api_user_entity_spec.rb +107 -0
- data/spec/models/patch_resources_metadata_spec.rb +365 -0
- data/spec/models/patch_resources_related_spec.rb +59 -0
- data/spec/models/patch_resources_roles_spec.rb +53 -0
- data/spec/models/patch_resources_spec.rb +59 -0
- data/spec/models/post_resources_spec.rb +69 -0
- data/spec/spec_helper.rb +111 -0
- metadata +399 -0
@@ -0,0 +1,726 @@
|
|
1
|
+
=begin
|
2
|
+
#Duke Digital Repository API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.36
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module DdrClient
|
16
|
+
# Resource metadata
|
17
|
+
class PatchResourcesMetadata
|
18
|
+
# http://purl.org/dc/terms/abstract
|
19
|
+
attr_accessor :abstract
|
20
|
+
|
21
|
+
# http://purl.org/dc/terms/accessRights
|
22
|
+
attr_accessor :access_rights
|
23
|
+
|
24
|
+
# http://purl.org/dc/terms/alternative
|
25
|
+
attr_accessor :alternative
|
26
|
+
|
27
|
+
# http://purl.org/dc/terms/available
|
28
|
+
attr_accessor :available
|
29
|
+
|
30
|
+
# http://purl.org/dc/terms/contributor
|
31
|
+
attr_accessor :contributor
|
32
|
+
|
33
|
+
# http://purl.org/dc/terms/creator
|
34
|
+
attr_accessor :creator
|
35
|
+
|
36
|
+
# http://purl.org/dc/terms/date
|
37
|
+
attr_accessor :date
|
38
|
+
|
39
|
+
# http://purl.org/dc/terms/description
|
40
|
+
attr_accessor :description
|
41
|
+
|
42
|
+
# http://purl.org/dc/terms/extent
|
43
|
+
attr_accessor :extent
|
44
|
+
|
45
|
+
# http://purl.org/dc/terms/format
|
46
|
+
attr_accessor :format
|
47
|
+
|
48
|
+
# http://purl.org/dc/terms/hasPart
|
49
|
+
attr_accessor :has_part
|
50
|
+
|
51
|
+
# http://purl.org/dc/terms/identifier
|
52
|
+
attr_accessor :identifier
|
53
|
+
|
54
|
+
# http://purl.org/dc/terms/isFormatOf
|
55
|
+
attr_accessor :is_format_of
|
56
|
+
|
57
|
+
# http://purl.org/dc/terms/isPartOf
|
58
|
+
attr_accessor :is_part_of
|
59
|
+
|
60
|
+
# http://purl.org/dc/terms/language
|
61
|
+
attr_accessor :language
|
62
|
+
|
63
|
+
# http://purl.org/dc/terms/medium
|
64
|
+
attr_accessor :medium
|
65
|
+
|
66
|
+
# http://purl.org/dc/terms/provenance
|
67
|
+
attr_accessor :provenance
|
68
|
+
|
69
|
+
# http://purl.org/dc/terms/publisher
|
70
|
+
attr_accessor :publisher
|
71
|
+
|
72
|
+
# http://purl.org/dc/terms/relation
|
73
|
+
attr_accessor :relation
|
74
|
+
|
75
|
+
# http://purl.org/dc/terms/rights
|
76
|
+
attr_accessor :rights
|
77
|
+
|
78
|
+
# http://purl.org/dc/terms/spatial
|
79
|
+
attr_accessor :spatial
|
80
|
+
|
81
|
+
# http://purl.org/dc/terms/subject
|
82
|
+
attr_accessor :subject
|
83
|
+
|
84
|
+
# http://purl.org/dc/terms/title
|
85
|
+
attr_accessor :title
|
86
|
+
|
87
|
+
# http://purl.org/dc/terms/type
|
88
|
+
attr_accessor :type
|
89
|
+
|
90
|
+
# Administrative group to which the collection belongs
|
91
|
+
attr_accessor :admin_set
|
92
|
+
|
93
|
+
# Aleph identifier
|
94
|
+
attr_accessor :aleph_id
|
95
|
+
|
96
|
+
# ArchivesSpace identifier
|
97
|
+
attr_accessor :aspace_id
|
98
|
+
|
99
|
+
# CONTENTdm identifier (deprecated)
|
100
|
+
attr_accessor :contentdm_id
|
101
|
+
|
102
|
+
# Display Format
|
103
|
+
attr_accessor :display_format
|
104
|
+
|
105
|
+
# Digital Object Identifier (doi.org)
|
106
|
+
attr_accessor :doi
|
107
|
+
|
108
|
+
# Source collection identifier
|
109
|
+
attr_accessor :ead_id
|
110
|
+
|
111
|
+
# Resource ID from defunct Fedora 3 repository
|
112
|
+
attr_accessor :fcrepo3_pid
|
113
|
+
|
114
|
+
# Person or entity responsible for ingest
|
115
|
+
attr_accessor :ingested_by
|
116
|
+
|
117
|
+
# Date/time of original ingest (may differ from created_at)
|
118
|
+
attr_accessor :ingestion_date
|
119
|
+
|
120
|
+
# Digital Collections identifier
|
121
|
+
attr_accessor :local_id
|
122
|
+
|
123
|
+
# Path to original file from root ingest folder
|
124
|
+
attr_accessor :nested_path
|
125
|
+
|
126
|
+
# Permanent identifier (ARK) assigned to the resource
|
127
|
+
attr_accessor :permanent_id
|
128
|
+
|
129
|
+
# Permalink to the end-user representation of the resource.
|
130
|
+
attr_accessor :permanent_url
|
131
|
+
|
132
|
+
# Research Help Contact
|
133
|
+
attr_accessor :research_help_contact
|
134
|
+
|
135
|
+
# Rights Note
|
136
|
+
attr_accessor :rights_note
|
137
|
+
|
138
|
+
# Workflow State
|
139
|
+
attr_accessor :workflow_state
|
140
|
+
|
141
|
+
# Biblical Book
|
142
|
+
attr_accessor :biblical_book
|
143
|
+
|
144
|
+
# Category
|
145
|
+
attr_accessor :category
|
146
|
+
|
147
|
+
# Chapter And Verse
|
148
|
+
attr_accessor :chapter_and_verse
|
149
|
+
|
150
|
+
# Company
|
151
|
+
attr_accessor :company
|
152
|
+
|
153
|
+
# Headline
|
154
|
+
attr_accessor :headline
|
155
|
+
|
156
|
+
# Issue Number
|
157
|
+
attr_accessor :issue_number
|
158
|
+
|
159
|
+
# Placement Company
|
160
|
+
attr_accessor :placement_company
|
161
|
+
|
162
|
+
# Product
|
163
|
+
attr_accessor :product
|
164
|
+
|
165
|
+
# Publication
|
166
|
+
attr_accessor :publication
|
167
|
+
|
168
|
+
# Series
|
169
|
+
attr_accessor :series
|
170
|
+
|
171
|
+
# Setting
|
172
|
+
attr_accessor :setting
|
173
|
+
|
174
|
+
# Sponsor
|
175
|
+
attr_accessor :sponsor
|
176
|
+
|
177
|
+
# Tone
|
178
|
+
attr_accessor :tone
|
179
|
+
|
180
|
+
# Volume
|
181
|
+
attr_accessor :volume
|
182
|
+
|
183
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
184
|
+
def self.attribute_map
|
185
|
+
{
|
186
|
+
:'abstract' => :'abstract',
|
187
|
+
:'access_rights' => :'accessRights',
|
188
|
+
:'alternative' => :'alternative',
|
189
|
+
:'available' => :'available',
|
190
|
+
:'contributor' => :'contributor',
|
191
|
+
:'creator' => :'creator',
|
192
|
+
:'date' => :'date',
|
193
|
+
:'description' => :'description',
|
194
|
+
:'extent' => :'extent',
|
195
|
+
:'format' => :'format',
|
196
|
+
:'has_part' => :'hasPart',
|
197
|
+
:'identifier' => :'identifier',
|
198
|
+
:'is_format_of' => :'isFormatOf',
|
199
|
+
:'is_part_of' => :'isPartOf',
|
200
|
+
:'language' => :'language',
|
201
|
+
:'medium' => :'medium',
|
202
|
+
:'provenance' => :'provenance',
|
203
|
+
:'publisher' => :'publisher',
|
204
|
+
:'relation' => :'relation',
|
205
|
+
:'rights' => :'rights',
|
206
|
+
:'spatial' => :'spatial',
|
207
|
+
:'subject' => :'subject',
|
208
|
+
:'title' => :'title',
|
209
|
+
:'type' => :'type',
|
210
|
+
:'admin_set' => :'admin_set',
|
211
|
+
:'aleph_id' => :'aleph_id',
|
212
|
+
:'aspace_id' => :'aspace_id',
|
213
|
+
:'contentdm_id' => :'contentdm_id',
|
214
|
+
:'display_format' => :'display_format',
|
215
|
+
:'doi' => :'doi',
|
216
|
+
:'ead_id' => :'ead_id',
|
217
|
+
:'fcrepo3_pid' => :'fcrepo3_pid',
|
218
|
+
:'ingested_by' => :'ingested_by',
|
219
|
+
:'ingestion_date' => :'ingestion_date',
|
220
|
+
:'local_id' => :'local_id',
|
221
|
+
:'nested_path' => :'nested_path',
|
222
|
+
:'permanent_id' => :'permanent_id',
|
223
|
+
:'permanent_url' => :'permanent_url',
|
224
|
+
:'research_help_contact' => :'research_help_contact',
|
225
|
+
:'rights_note' => :'rights_note',
|
226
|
+
:'workflow_state' => :'workflow_state',
|
227
|
+
:'biblical_book' => :'biblical_book',
|
228
|
+
:'category' => :'category',
|
229
|
+
:'chapter_and_verse' => :'chapter_and_verse',
|
230
|
+
:'company' => :'company',
|
231
|
+
:'headline' => :'headline',
|
232
|
+
:'issue_number' => :'issue_number',
|
233
|
+
:'placement_company' => :'placement_company',
|
234
|
+
:'product' => :'product',
|
235
|
+
:'publication' => :'publication',
|
236
|
+
:'series' => :'series',
|
237
|
+
:'setting' => :'setting',
|
238
|
+
:'sponsor' => :'sponsor',
|
239
|
+
:'tone' => :'tone',
|
240
|
+
:'volume' => :'volume'
|
241
|
+
}
|
242
|
+
end
|
243
|
+
|
244
|
+
# Attribute type mapping.
|
245
|
+
def self.swagger_types
|
246
|
+
{
|
247
|
+
:'abstract' => :'String',
|
248
|
+
:'access_rights' => :'String',
|
249
|
+
:'alternative' => :'String',
|
250
|
+
:'available' => :'String',
|
251
|
+
:'contributor' => :'String',
|
252
|
+
:'creator' => :'String',
|
253
|
+
:'date' => :'String',
|
254
|
+
:'description' => :'String',
|
255
|
+
:'extent' => :'String',
|
256
|
+
:'format' => :'String',
|
257
|
+
:'has_part' => :'String',
|
258
|
+
:'identifier' => :'String',
|
259
|
+
:'is_format_of' => :'String',
|
260
|
+
:'is_part_of' => :'String',
|
261
|
+
:'language' => :'String',
|
262
|
+
:'medium' => :'String',
|
263
|
+
:'provenance' => :'String',
|
264
|
+
:'publisher' => :'String',
|
265
|
+
:'relation' => :'String',
|
266
|
+
:'rights' => :'String',
|
267
|
+
:'spatial' => :'String',
|
268
|
+
:'subject' => :'String',
|
269
|
+
:'title' => :'String',
|
270
|
+
:'type' => :'String',
|
271
|
+
:'admin_set' => :'String',
|
272
|
+
:'aleph_id' => :'String',
|
273
|
+
:'aspace_id' => :'String',
|
274
|
+
:'contentdm_id' => :'String',
|
275
|
+
:'display_format' => :'String',
|
276
|
+
:'doi' => :'String',
|
277
|
+
:'ead_id' => :'String',
|
278
|
+
:'fcrepo3_pid' => :'String',
|
279
|
+
:'ingested_by' => :'String',
|
280
|
+
:'ingestion_date' => :'String',
|
281
|
+
:'local_id' => :'String',
|
282
|
+
:'nested_path' => :'String',
|
283
|
+
:'permanent_id' => :'String',
|
284
|
+
:'permanent_url' => :'String',
|
285
|
+
:'research_help_contact' => :'String',
|
286
|
+
:'rights_note' => :'String',
|
287
|
+
:'workflow_state' => :'String',
|
288
|
+
:'biblical_book' => :'String',
|
289
|
+
:'category' => :'String',
|
290
|
+
:'chapter_and_verse' => :'String',
|
291
|
+
:'company' => :'String',
|
292
|
+
:'headline' => :'String',
|
293
|
+
:'issue_number' => :'String',
|
294
|
+
:'placement_company' => :'String',
|
295
|
+
:'product' => :'String',
|
296
|
+
:'publication' => :'String',
|
297
|
+
:'series' => :'String',
|
298
|
+
:'setting' => :'String',
|
299
|
+
:'sponsor' => :'String',
|
300
|
+
:'tone' => :'String',
|
301
|
+
:'volume' => :'String'
|
302
|
+
}
|
303
|
+
end
|
304
|
+
|
305
|
+
# Initializes the object
|
306
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
307
|
+
def initialize(attributes = {})
|
308
|
+
return unless attributes.is_a?(Hash)
|
309
|
+
|
310
|
+
# convert string to symbol for hash key
|
311
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
312
|
+
|
313
|
+
if attributes.has_key?(:'abstract')
|
314
|
+
self.abstract = attributes[:'abstract']
|
315
|
+
end
|
316
|
+
|
317
|
+
if attributes.has_key?(:'accessRights')
|
318
|
+
self.access_rights = attributes[:'accessRights']
|
319
|
+
end
|
320
|
+
|
321
|
+
if attributes.has_key?(:'alternative')
|
322
|
+
self.alternative = attributes[:'alternative']
|
323
|
+
end
|
324
|
+
|
325
|
+
if attributes.has_key?(:'available')
|
326
|
+
self.available = attributes[:'available']
|
327
|
+
end
|
328
|
+
|
329
|
+
if attributes.has_key?(:'contributor')
|
330
|
+
self.contributor = attributes[:'contributor']
|
331
|
+
end
|
332
|
+
|
333
|
+
if attributes.has_key?(:'creator')
|
334
|
+
self.creator = attributes[:'creator']
|
335
|
+
end
|
336
|
+
|
337
|
+
if attributes.has_key?(:'date')
|
338
|
+
self.date = attributes[:'date']
|
339
|
+
end
|
340
|
+
|
341
|
+
if attributes.has_key?(:'description')
|
342
|
+
self.description = attributes[:'description']
|
343
|
+
end
|
344
|
+
|
345
|
+
if attributes.has_key?(:'extent')
|
346
|
+
self.extent = attributes[:'extent']
|
347
|
+
end
|
348
|
+
|
349
|
+
if attributes.has_key?(:'format')
|
350
|
+
self.format = attributes[:'format']
|
351
|
+
end
|
352
|
+
|
353
|
+
if attributes.has_key?(:'hasPart')
|
354
|
+
self.has_part = attributes[:'hasPart']
|
355
|
+
end
|
356
|
+
|
357
|
+
if attributes.has_key?(:'identifier')
|
358
|
+
self.identifier = attributes[:'identifier']
|
359
|
+
end
|
360
|
+
|
361
|
+
if attributes.has_key?(:'isFormatOf')
|
362
|
+
self.is_format_of = attributes[:'isFormatOf']
|
363
|
+
end
|
364
|
+
|
365
|
+
if attributes.has_key?(:'isPartOf')
|
366
|
+
self.is_part_of = attributes[:'isPartOf']
|
367
|
+
end
|
368
|
+
|
369
|
+
if attributes.has_key?(:'language')
|
370
|
+
self.language = attributes[:'language']
|
371
|
+
end
|
372
|
+
|
373
|
+
if attributes.has_key?(:'medium')
|
374
|
+
self.medium = attributes[:'medium']
|
375
|
+
end
|
376
|
+
|
377
|
+
if attributes.has_key?(:'provenance')
|
378
|
+
self.provenance = attributes[:'provenance']
|
379
|
+
end
|
380
|
+
|
381
|
+
if attributes.has_key?(:'publisher')
|
382
|
+
self.publisher = attributes[:'publisher']
|
383
|
+
end
|
384
|
+
|
385
|
+
if attributes.has_key?(:'relation')
|
386
|
+
self.relation = attributes[:'relation']
|
387
|
+
end
|
388
|
+
|
389
|
+
if attributes.has_key?(:'rights')
|
390
|
+
self.rights = attributes[:'rights']
|
391
|
+
end
|
392
|
+
|
393
|
+
if attributes.has_key?(:'spatial')
|
394
|
+
self.spatial = attributes[:'spatial']
|
395
|
+
end
|
396
|
+
|
397
|
+
if attributes.has_key?(:'subject')
|
398
|
+
self.subject = attributes[:'subject']
|
399
|
+
end
|
400
|
+
|
401
|
+
if attributes.has_key?(:'title')
|
402
|
+
self.title = attributes[:'title']
|
403
|
+
end
|
404
|
+
|
405
|
+
if attributes.has_key?(:'type')
|
406
|
+
self.type = attributes[:'type']
|
407
|
+
end
|
408
|
+
|
409
|
+
if attributes.has_key?(:'admin_set')
|
410
|
+
self.admin_set = attributes[:'admin_set']
|
411
|
+
end
|
412
|
+
|
413
|
+
if attributes.has_key?(:'aleph_id')
|
414
|
+
self.aleph_id = attributes[:'aleph_id']
|
415
|
+
end
|
416
|
+
|
417
|
+
if attributes.has_key?(:'aspace_id')
|
418
|
+
self.aspace_id = attributes[:'aspace_id']
|
419
|
+
end
|
420
|
+
|
421
|
+
if attributes.has_key?(:'contentdm_id')
|
422
|
+
self.contentdm_id = attributes[:'contentdm_id']
|
423
|
+
end
|
424
|
+
|
425
|
+
if attributes.has_key?(:'display_format')
|
426
|
+
self.display_format = attributes[:'display_format']
|
427
|
+
end
|
428
|
+
|
429
|
+
if attributes.has_key?(:'doi')
|
430
|
+
self.doi = attributes[:'doi']
|
431
|
+
end
|
432
|
+
|
433
|
+
if attributes.has_key?(:'ead_id')
|
434
|
+
self.ead_id = attributes[:'ead_id']
|
435
|
+
end
|
436
|
+
|
437
|
+
if attributes.has_key?(:'fcrepo3_pid')
|
438
|
+
self.fcrepo3_pid = attributes[:'fcrepo3_pid']
|
439
|
+
end
|
440
|
+
|
441
|
+
if attributes.has_key?(:'ingested_by')
|
442
|
+
self.ingested_by = attributes[:'ingested_by']
|
443
|
+
end
|
444
|
+
|
445
|
+
if attributes.has_key?(:'ingestion_date')
|
446
|
+
self.ingestion_date = attributes[:'ingestion_date']
|
447
|
+
end
|
448
|
+
|
449
|
+
if attributes.has_key?(:'local_id')
|
450
|
+
self.local_id = attributes[:'local_id']
|
451
|
+
end
|
452
|
+
|
453
|
+
if attributes.has_key?(:'nested_path')
|
454
|
+
self.nested_path = attributes[:'nested_path']
|
455
|
+
end
|
456
|
+
|
457
|
+
if attributes.has_key?(:'permanent_id')
|
458
|
+
self.permanent_id = attributes[:'permanent_id']
|
459
|
+
end
|
460
|
+
|
461
|
+
if attributes.has_key?(:'permanent_url')
|
462
|
+
self.permanent_url = attributes[:'permanent_url']
|
463
|
+
end
|
464
|
+
|
465
|
+
if attributes.has_key?(:'research_help_contact')
|
466
|
+
self.research_help_contact = attributes[:'research_help_contact']
|
467
|
+
end
|
468
|
+
|
469
|
+
if attributes.has_key?(:'rights_note')
|
470
|
+
self.rights_note = attributes[:'rights_note']
|
471
|
+
end
|
472
|
+
|
473
|
+
if attributes.has_key?(:'workflow_state')
|
474
|
+
self.workflow_state = attributes[:'workflow_state']
|
475
|
+
end
|
476
|
+
|
477
|
+
if attributes.has_key?(:'biblical_book')
|
478
|
+
self.biblical_book = attributes[:'biblical_book']
|
479
|
+
end
|
480
|
+
|
481
|
+
if attributes.has_key?(:'category')
|
482
|
+
self.category = attributes[:'category']
|
483
|
+
end
|
484
|
+
|
485
|
+
if attributes.has_key?(:'chapter_and_verse')
|
486
|
+
self.chapter_and_verse = attributes[:'chapter_and_verse']
|
487
|
+
end
|
488
|
+
|
489
|
+
if attributes.has_key?(:'company')
|
490
|
+
self.company = attributes[:'company']
|
491
|
+
end
|
492
|
+
|
493
|
+
if attributes.has_key?(:'headline')
|
494
|
+
self.headline = attributes[:'headline']
|
495
|
+
end
|
496
|
+
|
497
|
+
if attributes.has_key?(:'issue_number')
|
498
|
+
self.issue_number = attributes[:'issue_number']
|
499
|
+
end
|
500
|
+
|
501
|
+
if attributes.has_key?(:'placement_company')
|
502
|
+
self.placement_company = attributes[:'placement_company']
|
503
|
+
end
|
504
|
+
|
505
|
+
if attributes.has_key?(:'product')
|
506
|
+
self.product = attributes[:'product']
|
507
|
+
end
|
508
|
+
|
509
|
+
if attributes.has_key?(:'publication')
|
510
|
+
self.publication = attributes[:'publication']
|
511
|
+
end
|
512
|
+
|
513
|
+
if attributes.has_key?(:'series')
|
514
|
+
self.series = attributes[:'series']
|
515
|
+
end
|
516
|
+
|
517
|
+
if attributes.has_key?(:'setting')
|
518
|
+
self.setting = attributes[:'setting']
|
519
|
+
end
|
520
|
+
|
521
|
+
if attributes.has_key?(:'sponsor')
|
522
|
+
self.sponsor = attributes[:'sponsor']
|
523
|
+
end
|
524
|
+
|
525
|
+
if attributes.has_key?(:'tone')
|
526
|
+
self.tone = attributes[:'tone']
|
527
|
+
end
|
528
|
+
|
529
|
+
if attributes.has_key?(:'volume')
|
530
|
+
self.volume = attributes[:'volume']
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
535
|
+
# @return Array for valid properties with the reasons
|
536
|
+
def list_invalid_properties
|
537
|
+
invalid_properties = Array.new
|
538
|
+
invalid_properties
|
539
|
+
end
|
540
|
+
|
541
|
+
# Check to see if the all the properties in the model are valid
|
542
|
+
# @return true if the model is valid
|
543
|
+
def valid?
|
544
|
+
true
|
545
|
+
end
|
546
|
+
|
547
|
+
# Checks equality by comparing each attribute.
|
548
|
+
# @param [Object] Object to be compared
|
549
|
+
def ==(o)
|
550
|
+
return true if self.equal?(o)
|
551
|
+
self.class == o.class &&
|
552
|
+
abstract == o.abstract &&
|
553
|
+
access_rights == o.access_rights &&
|
554
|
+
alternative == o.alternative &&
|
555
|
+
available == o.available &&
|
556
|
+
contributor == o.contributor &&
|
557
|
+
creator == o.creator &&
|
558
|
+
date == o.date &&
|
559
|
+
description == o.description &&
|
560
|
+
extent == o.extent &&
|
561
|
+
format == o.format &&
|
562
|
+
has_part == o.has_part &&
|
563
|
+
identifier == o.identifier &&
|
564
|
+
is_format_of == o.is_format_of &&
|
565
|
+
is_part_of == o.is_part_of &&
|
566
|
+
language == o.language &&
|
567
|
+
medium == o.medium &&
|
568
|
+
provenance == o.provenance &&
|
569
|
+
publisher == o.publisher &&
|
570
|
+
relation == o.relation &&
|
571
|
+
rights == o.rights &&
|
572
|
+
spatial == o.spatial &&
|
573
|
+
subject == o.subject &&
|
574
|
+
title == o.title &&
|
575
|
+
type == o.type &&
|
576
|
+
admin_set == o.admin_set &&
|
577
|
+
aleph_id == o.aleph_id &&
|
578
|
+
aspace_id == o.aspace_id &&
|
579
|
+
contentdm_id == o.contentdm_id &&
|
580
|
+
display_format == o.display_format &&
|
581
|
+
doi == o.doi &&
|
582
|
+
ead_id == o.ead_id &&
|
583
|
+
fcrepo3_pid == o.fcrepo3_pid &&
|
584
|
+
ingested_by == o.ingested_by &&
|
585
|
+
ingestion_date == o.ingestion_date &&
|
586
|
+
local_id == o.local_id &&
|
587
|
+
nested_path == o.nested_path &&
|
588
|
+
permanent_id == o.permanent_id &&
|
589
|
+
permanent_url == o.permanent_url &&
|
590
|
+
research_help_contact == o.research_help_contact &&
|
591
|
+
rights_note == o.rights_note &&
|
592
|
+
workflow_state == o.workflow_state &&
|
593
|
+
biblical_book == o.biblical_book &&
|
594
|
+
category == o.category &&
|
595
|
+
chapter_and_verse == o.chapter_and_verse &&
|
596
|
+
company == o.company &&
|
597
|
+
headline == o.headline &&
|
598
|
+
issue_number == o.issue_number &&
|
599
|
+
placement_company == o.placement_company &&
|
600
|
+
product == o.product &&
|
601
|
+
publication == o.publication &&
|
602
|
+
series == o.series &&
|
603
|
+
setting == o.setting &&
|
604
|
+
sponsor == o.sponsor &&
|
605
|
+
tone == o.tone &&
|
606
|
+
volume == o.volume
|
607
|
+
end
|
608
|
+
|
609
|
+
# @see the `==` method
|
610
|
+
# @param [Object] Object to be compared
|
611
|
+
def eql?(o)
|
612
|
+
self == o
|
613
|
+
end
|
614
|
+
|
615
|
+
# Calculates hash code according to all attributes.
|
616
|
+
# @return [Fixnum] Hash code
|
617
|
+
def hash
|
618
|
+
[abstract, access_rights, alternative, available, contributor, creator, date, description, extent, format, has_part, identifier, is_format_of, is_part_of, language, medium, provenance, publisher, relation, rights, spatial, subject, title, type, admin_set, aleph_id, aspace_id, contentdm_id, display_format, doi, ead_id, fcrepo3_pid, ingested_by, ingestion_date, local_id, nested_path, permanent_id, permanent_url, research_help_contact, rights_note, workflow_state, biblical_book, category, chapter_and_verse, company, headline, issue_number, placement_company, product, publication, series, setting, sponsor, tone, volume].hash
|
619
|
+
end
|
620
|
+
|
621
|
+
# Builds the object from hash
|
622
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
623
|
+
# @return [Object] Returns the model itself
|
624
|
+
def build_from_hash(attributes)
|
625
|
+
return nil unless attributes.is_a?(Hash)
|
626
|
+
self.class.swagger_types.each_pair do |key, type|
|
627
|
+
if type =~ /\AArray<(.*)>/i
|
628
|
+
# check to ensure the input is an array given that the attribute
|
629
|
+
# is documented as an array but the input is not
|
630
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
631
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
632
|
+
end
|
633
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
634
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
635
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
636
|
+
end
|
637
|
+
|
638
|
+
self
|
639
|
+
end
|
640
|
+
|
641
|
+
# Deserializes the data based on type
|
642
|
+
# @param string type Data type
|
643
|
+
# @param string value Value to be deserialized
|
644
|
+
# @return [Object] Deserialized data
|
645
|
+
def _deserialize(type, value)
|
646
|
+
case type.to_sym
|
647
|
+
when :DateTime
|
648
|
+
DateTime.parse(value)
|
649
|
+
when :Date
|
650
|
+
Date.parse(value)
|
651
|
+
when :String
|
652
|
+
value.to_s
|
653
|
+
when :Integer
|
654
|
+
value.to_i
|
655
|
+
when :Float
|
656
|
+
value.to_f
|
657
|
+
when :BOOLEAN
|
658
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
659
|
+
true
|
660
|
+
else
|
661
|
+
false
|
662
|
+
end
|
663
|
+
when :Object
|
664
|
+
# generic object (usually a Hash), return directly
|
665
|
+
value
|
666
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
667
|
+
inner_type = Regexp.last_match[:inner_type]
|
668
|
+
value.map { |v| _deserialize(inner_type, v) }
|
669
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
670
|
+
k_type = Regexp.last_match[:k_type]
|
671
|
+
v_type = Regexp.last_match[:v_type]
|
672
|
+
{}.tap do |hash|
|
673
|
+
value.each do |k, v|
|
674
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
675
|
+
end
|
676
|
+
end
|
677
|
+
else # model
|
678
|
+
temp_model = DdrClient.const_get(type).new
|
679
|
+
temp_model.build_from_hash(value)
|
680
|
+
end
|
681
|
+
end
|
682
|
+
|
683
|
+
# Returns the string representation of the object
|
684
|
+
# @return [String] String presentation of the object
|
685
|
+
def to_s
|
686
|
+
to_hash.to_s
|
687
|
+
end
|
688
|
+
|
689
|
+
# to_body is an alias to to_hash (backward compatibility)
|
690
|
+
# @return [Hash] Returns the object in the form of hash
|
691
|
+
def to_body
|
692
|
+
to_hash
|
693
|
+
end
|
694
|
+
|
695
|
+
# Returns the object in the form of hash
|
696
|
+
# @return [Hash] Returns the object in the form of hash
|
697
|
+
def to_hash
|
698
|
+
hash = {}
|
699
|
+
self.class.attribute_map.each_pair do |attr, param|
|
700
|
+
value = self.send(attr)
|
701
|
+
next if value.nil?
|
702
|
+
hash[param] = _to_hash(value)
|
703
|
+
end
|
704
|
+
hash
|
705
|
+
end
|
706
|
+
|
707
|
+
# Outputs non-array value in the form of hash
|
708
|
+
# For object, use to_hash. Otherwise, just return the value
|
709
|
+
# @param [Object] value Any valid value
|
710
|
+
# @return [Hash] Returns the value in the form of hash
|
711
|
+
def _to_hash(value)
|
712
|
+
if value.is_a?(Array)
|
713
|
+
value.compact.map { |v| _to_hash(v) }
|
714
|
+
elsif value.is_a?(Hash)
|
715
|
+
{}.tap do |hash|
|
716
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
717
|
+
end
|
718
|
+
elsif value.respond_to? :to_hash
|
719
|
+
value.to_hash
|
720
|
+
else
|
721
|
+
value
|
722
|
+
end
|
723
|
+
end
|
724
|
+
|
725
|
+
end
|
726
|
+
end
|