Skip to content

Commit

Permalink
debug contained IIIF manifest serialization in Iiif::PresentationsCon…
Browse files Browse the repository at this point in the history
…troller

- fix DOI fetch params
- add defType to subquery for proxy document
- fix a method signature bug
- DLC-1008
  • Loading branch information
barmintor committed Aug 16, 2024
1 parent 4d4d499 commit 8264633
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/controllers/iiif/presentations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def show

def fetch_by_doi_opts(query_opts = {})
# these can be mutated during processing, so must be a new object and not a constant
default_opts = { q: "{!raw f=ezid_doi_ssim v=$id}", fq: ["object_state_ssi:A"] }
default_opts = { q: "{!raw f=ezid_doi_ssim v=$ids}", fq: ["object_state_ssi:A"] }
default_opts.merge(query_opts)
end

Expand Down Expand Up @@ -65,6 +65,7 @@ def manifest
collection_document = fetch_by_doi collection_doi_param
local_params = {}
local_params[:fl] = "*,proxy:[subquery]"
local_params[:"proxy.defType"] = 'lucene'
local_params[:"proxy.q"] = "{!terms f=proxyFor_ssi v=$row.dc_identifier_ssim}"
local_params[:"proxy.fq"] = "proxyIn_ssi:\"#{collection_document['fedora_pid_uri_ssi']}\""
@response, @document = fetch("doi:#{doi}", fetch_by_doi_opts(local_params))
Expand Down Expand Up @@ -94,7 +95,7 @@ def manifest_container(collection_document, proxy_doc)
collection_params = select_params(:collection_registrant, :collection_doi)
collection_params[:proxy_path] = CGI.unescape(proxy_path) if proxy_path.present?
collection_id = iiif_collection_url(collection_params)
Iiif::Collection.new(**presentation_params(collection_id, collection_document, child_service, self))
Iiif::Collection.new(**presentation_params(collection_id, collection_document, child_service))
end

def range
Expand Down

0 comments on commit 8264633

Please sign in to comment.