Class: OAI::Provider::Response::RecordResponse

Inherits:
Base
  • Object
show all
Defined in:
backend/app/lib/oai/oai_gem_patches/load_custom_resumption_token.rb

Direct Known Subclasses

ListIdentifiers, ListMetadataFormats

Instance Method Summary collapse

Methods inherited from Base

#parse_date

Instance Method Details

#requested_formatObject

Raises:

  • (OAI::FormatException)


5
6
7
8
9
10
11
12
13
14
15
16
# File 'backend/app/lib/oai/oai_gem_patches/load_custom_resumption_token.rb', line 5

def requested_format
  format =
    if options[:metadata_prefix]
      options[:metadata_prefix]
    elsif options[:resumption_token]
      ArchivesSpaceResumptionToken.extract_format(options[:resumption_token])
    end

  raise OAI::FormatException.new unless provider.format_supported?(format)

  format
end