Sha256: 50f56f03803811400eeba2da37a5ebadadfac44117200fa9917e6ed352d1f8b0

Contents?: true

Size: 713 Bytes

Versions: 18

Compression:

Stored size: 713 Bytes

Contents

# 
# An Item is a  member of a Collection -- i.e., a "work" -- the principal describable resource.
#
# Examples: photograph, book, article, sound recording, video, etc.
#
class Item < Ddr::Models::Base
  
  include Ddr::Models::HasContentMetadata
  include Ddr::Models::HasChildren

  has_many :children, property: :is_part_of, class_name: 'Component'
  belongs_to :parent, property: :is_member_of_collection, class_name: 'Collection'

  alias_method :components, :children
  alias_method :component_ids, :child_ids

  alias_method :parts, :children
  alias_method :part_ids, :child_ids

  alias_method :collection, :parent
  alias_method :collection_id, :parent_id
  alias_method :collection=, :parent=
    
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ddr-models-1.11.8 app/models/item.rb
ddr-models-1.11.7 app/models/item.rb
ddr-models-1.11.6 app/models/item.rb
ddr-models-1.11.5 app/models/item.rb
ddr-models-1.11.4 app/models/item.rb
ddr-models-1.11.3 app/models/item.rb
ddr-models-1.11.2 app/models/item.rb
ddr-models-1.11.1 app/models/item.rb
ddr-models-1.11.0 app/models/item.rb
ddr-models-1.10.0 app/models/item.rb
ddr-models-1.9.0 app/models/item.rb
ddr-models-1.8.1 app/models/item.rb
ddr-models-1.8.0 app/models/item.rb
ddr-models-1.7.0 app/models/item.rb
ddr-models-1.6.0 app/models/item.rb
ddr-models-1.5.0 app/models/item.rb
ddr-models-1.4.0 app/models/item.rb
ddr-models-1.3.0 app/models/item.rb