Class: SdrClient::Deposit::MetadataBuilder
- Inherits:
-
Object
- Object
- SdrClient::Deposit::MetadataBuilder
- Defined in:
- lib/sdr_client/deposit/metadata_builder.rb
Overview
Constructs the deposit metadata for the DRO
Instance Method Summary collapse
-
#initialize(metadata:, grouping_strategy:, logger:) ⇒ MetadataBuilder
constructor
Additional metadata includes access, preserve, shelve, publish, md5, sha1.
-
#with_uploads(upload_responses) ⇒ Request
The metadata with fileset information added in.
Constructor Details
#initialize(metadata:, grouping_strategy:, logger:) ⇒ MetadataBuilder
Additional metadata includes access, preserve, shelve, publish, md5, sha1
13 14 15 16 17 |
# File 'lib/sdr_client/deposit/metadata_builder.rb', line 13 def initialize(metadata:, grouping_strategy:, logger:) @metadata = @logger = logger @grouping_strategy = grouping_strategy end |
Instance Method Details
#with_uploads(upload_responses) ⇒ Request
Returns the metadata with fileset information added in.
21 22 23 24 |
# File 'lib/sdr_client/deposit/metadata_builder.rb', line 21 def with_uploads(upload_responses) file_sets = build_filesets(uploads: upload_responses) .with_file_sets(file_sets) end |