app/models/iiif_presentation_manifest.rb
# Setup annotationLists for files with role="annotations"
Setup annotationLists for files with role="annotations"
Setup annotationLists for files with role = " annotations "
def other_content_for_resource(purl_base_uri, resource)
    grouped_resource = grouped_resource_by_id(resource.id)
    return unless grouped_resource
    other_content = []
    if grouped_resource.files.select { |file| file.role == 'annotations' && file.mimetype == 'application/json' }&.any?
      anno_list = IIIF::Presentation::AnnotationList.new
      anno_list['@id'] = "#{purl_base_uri}/iiif/annotationList/#{resource.id}"
      other_content << anno_list
    end
    other_content
  end
def other_content_for_resource ( purl_base_uri , resource ) grouped_resource = grouped_resource_by_id ( resource . id ) return unless grouped_resource other_content = [ ] if grouped_resource . files . select { | file | file . role == 'annotations' && file . mimetype == 'application/json' } &. any? anno_list = IIIF :: Presentation :: AnnotationList . new anno_list [ '@id' ] = "#{purl_base_uri}/iiif/annotationList/#{resource.id}" other_content << anno_list end other_content end
Setup annotationLists for files with role="annotations"
Setup annotationLists for files with role = " annotations "
purl_base_uri
<not_specific>
resource
<not_specific>