Sha256: 09422624be86fd158d74756c4a9635e2cbd2f86095ef9e9d01d9c18eeca90968

Contents?: true

Size: 574 Bytes

Versions: 13

Compression:

Stored size: 574 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::HasChildren
  include Ddr::Models::HasStructMetadata

  has_many :children,
           predicate: ActiveFedora::RDF::Fcrepo::RelsExt.isPartOf,
           class_name: "Component",
           as: :parent

  belongs_to :parent,
             predicate: ActiveFedora::RDF::Fcrepo::RelsExt.isMemberOfCollection,
             class_name: "Collection"

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ddr-models-3.0.0.beta.10 app/models/item.rb
ddr-models-3.0.0.beta.9 app/models/item.rb
ddr-models-3.0.0.beta.8 app/models/item.rb
ddr-models-3.0.0.beta.7 app/models/item.rb
ddr-models-3.0.0.beta.6 app/models/item.rb
ddr-models-3.0.0.beta.4 app/models/item.rb
ddr-models-3.0.0.beta.3 app/models/item.rb
ddr-models-3.0.0.beta.2 app/models/item.rb
ddr-models-3.0.0.beta.1 app/models/item.rb
ddr-models-3.0.0.alpha.4 app/models/item.rb
ddr-models-3.0.0.alpha.3 app/models/item.rb
ddr-models-3.0.0.alpha.2 app/models/item.rb
ddr-models-3.0.0.alpha.1 app/models/item.rb