Sha256: fbd14d3a4360e61de3d891e0ce1634a24c691e9b369bb24511a8a0b6858f8cc2

Contents?: true

Size: 544 Bytes

Versions: 25

Compression:

Stored size: 544 Bytes

Contents

module ActiveFedora
  # Helps Rubydora create datastreams of the type defined by the ActiveFedora::Base#datastream_class_for_name
  class DigitalObject < Rubydora::DigitalObject
    attr_accessor :original_class
    
    def self.find(original_class, pid)
      conn = original_class.connection_for_pid(pid)
      obj = super(pid, conn)
      obj.original_class = original_class
      obj
    end

    def datastream_object_for dsid
      klass = original_class.datastream_class_for_name(dsid)
      klass.new self, dsid
    end
    
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
active-fedora-4.4.0 lib/active_fedora/digital_object.rb
active-fedora-4.3.0 lib/active_fedora/digital_object.rb
active-fedora-4.2.0 lib/active_fedora/digital_object.rb
active-fedora-4.1.0 lib/active_fedora/digital_object.rb
active-fedora-4.0.0 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc20 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc19 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc18 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc17 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc16 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc15 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc14 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc13 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc12 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc11 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc10 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc9 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc8 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc7 lib/active_fedora/digital_object.rb
active-fedora-4.0.0.rc6 lib/active_fedora/digital_object.rb