Sha256: 724fdc0faf15565b4b863d9deef0d9d3e29c625994267c52e0349e098482f603
Contents?: true
Size: 884 Bytes
Versions: 65
Compression:
Stored size: 884 Bytes
Contents
require "active-fedora" require "active_fedora_finders" class StaticImageAggregator < ResourceAggregator CUL_WIDTH = "http://purl.oclc.org/NET/CUL/RESOURCE/STILLIMAGE/BASIC/imageWidth" CUL_LENGTH = "http://purl.oclc.org/NET/CUL/RESOURCE/STILLIMAGE/BASIC/imageLength" def route_as "image" end def index_type_label 'PART' end def thumbnail_info candidate = nil max_dim = 251 resources.each do |pid| resource = Resource.find(pid) if max_dim > resouce.long candidate = resource max_dim = resource.long end end if candidate.nil? return {:url=>image_url("cul_scv_hydra/crystal/file_broken.png"),:mime=>'image/png'} else return {:url=>"#{ActiveFedora.fedora_config[:url]}/objects/#{candidate.pid}/datastreams/CONTENT/content",:mime=>candidate.datastreams['CONENT'].mimeType} end end end
Version data entries
65 entries across 65 versions & 1 rubygems