Sha256: aa5903c72ff61081380734678882b8cfd6ea9453505c932927ee6413f058ea4d
Contents?: true
Size: 728 Bytes
Versions: 4
Compression:
Stored size: 728 Bytes
Contents
class Batch < ActiveFedora::Base include Hydra::AccessControls::Permissions include Sufia::ModelMethods include Sufia::Noid has_metadata :name => "descMetadata", :type => BatchRdfDatastream belongs_to :user, :property => "creator" has_many :generic_files, :property => :is_part_of has_attributes :title, :creator, :part, :status, datastream: :descMetadata, multiple: true def self.find_or_create(pid) begin Batch.find(pid) rescue ActiveFedora::ObjectNotFoundError Batch.create({pid: pid}) end end def to_solr(solr_doc={}, opts={}) solr_doc = super(solr_doc, opts) solr_doc[Solrizer.solr_name('noid', Sufia::GenericFile.noid_indexer)] = noid return solr_doc end end
Version data entries
4 entries across 4 versions & 2 rubygems