Sha256: 79747cdbccececa03f9e4ddbaeeef1d0595b41bd32c14716e0fe71c365926fef

Contents?: true

Size: 1.11 KB

Versions: 21

Compression:

Stored size: 1.11 KB

Contents

# GenericContent:  EXAMPLE Model that conforms to the Hydra genericContent and genericMetadata cModels 
require 'deprecation'
class GenericContent < ActiveFedora::Base
  extend Deprecation

  # Uses the Hydra Rights Metadata Schema for tracking access permissions & copyright
  #  FIXME:  should this have   "include Hydra::ModelMixins::CommonMetadata" instead?
  has_metadata :name => "rightsMetadata", :type => Hydra::Datastream::RightsMetadata 

  # Uses the GenericContent mixin to conform to the Hydra genericContent cModel
  #include Hydra::GenericContent
  
  #has_metadata :name => "descMetadata", :type => Hydra::Datastream::ModsGenericContent

  # A place to put extra metadata values, e.g. the user id of the object depositor (for permissions)
  has_metadata :name => "properties", :type => Hydra::Datastream::Properties
  
  # adds helpful methods for basic hydra objects.  
  # FIXME:  redundate with  GenericContent include above??
  include Hydra::ModelMethods
  
  def initialize( attrs={} )
    Deprecation.warn(GenericContent, "GenericContent is deprecated and will be removed in hydra-head 5.x")
    super
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
hydra-file-access-5.4.1 spec/support/app/models/generic_content.rb
hydra-file-access-5.4.0.pre1 spec/support/app/models/generic_content.rb
hydra-file-access-5.3.0 spec/support/app/models/generic_content.rb
hydra-file-access-5.1.0 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.1 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.rc1 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre15 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre14 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre13 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre12 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre11 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre10 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre9 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre8 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre7 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre6 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre4 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre3 spec/support/app/models/generic_content.rb
hydra-file-access-5.0.0.pre2 spec/support/app/models/generic_content.rb