Sha256: 76a39c885ccb522fd9c0bf7c36ee1c2dc1edd0e80a862c13b1fb9194c6c26c5b
Contents?: true
Size: 699 Bytes
Versions: 13
Compression:
Stored size: 699 Bytes
Contents
# # A Component is a part of an Item; the principal content-bearing repository resource. # # Examples: Page of a book, track of a recording, etc. # class Component < Ddr::Models::Base include Ddr::Models::HasContent include Ddr::Models::HasMultiresImage include Ddr::Models::HasStructMetadata belongs_to :parent, predicate: ActiveFedora::RDF::Fcrepo::RelsExt.isPartOf, class_name: "Item" belongs_to :target, predicate: ::RDF::URI("http://www.loc.gov/mix/v20/externalTarget#hasExternalTarget"), class_name: "Target" def collection self.parent.parent rescue nil end def collection_id collection.id rescue nil end end
Version data entries
13 entries across 13 versions & 1 rubygems