Sha256: d1dade9c9eb1e9c94d56f261739b9669652ddbb8c9c64fd836b322209955f2fe

Contents?: true

Size: 1003 Bytes

Versions: 10

Compression:

Stored size: 1003 Bytes

Contents

module Hyrax
  module FileSetBehavior
    extend ActiveSupport::Concern
    include Hyrax::WithEvents
    include Hyrax::BasicMetadata
    include Hydra::Works::FileSetBehavior
    include Hydra::Works::VirusCheck
    include Hyrax::FileSet::Characterization
    include Hydra::WithDepositor
    include Serializers
    include Hyrax::Noid
    include Hyrax::FileSet::Derivatives
    include Permissions
    include Hyrax::FileSet::Indexing
    include Hyrax::FileSet::BelongsToWorks
    include Hyrax::FileSet::Querying
    include HumanReadableType
    include RequiredMetadata
    include Naming
    include Hydra::AccessControls::Embargoable
    include GlobalID::Identification

    included do
      attr_accessor :file
      self.human_readable_type = 'File'
    end

    def representative_id
      to_param
    end

    def thumbnail_id
      to_param
    end

    # Cast to a SolrDocument by querying from Solr
    def to_presenter
      CatalogController.new.fetch(id).last
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-1.1.0 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-1.0.5 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-1.0.4 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-1.0.3 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-1.0.2 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-1.0.1 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-1.0.0.rc2 app/models/concerns/hyrax/file_set_behavior.rb
hyrax-1.0.0.rc1 app/models/concerns/hyrax/file_set_behavior.rb
test_hyrax-0.0.1.alpha app/models/concerns/hyrax/file_set_behavior.rb