This is pre-release information related to Avalon R3
Avalon provides hooks that allow institutions to define permalinks (e.g., using a Handle server, DOI, or other durable link generating system) to resources. These links show up on the item/preview page in the Share this resource tab.
Permalinks are generated only for published Media Objects. When a Media Object is published, or a published Media Object is modified, Avalon makes sure that a permalink exists for the Media Object and for each of its Master Files (tracks, sections, etc.).
To define how permalinks are generated, create a file in config/initializers
(e.g., config/initializers/generate_permalink.rb
) following this template:
Permalink.on_generate do |obj| # Create a permanent link resource that will resolve/redirect to obj # and that resource as a URL string. e.g., return "http://permalinkresolver.example.edu/media/#{obj.pid}" end
To create permalinks for Media Objects only, and not direct links to sections:
Permalink.on_generate do |obj| if obj.is_a? MediaObject return "http://permalinkresolver.example.edu/media/#{obj.pid}" else return nil end end