app/models/bplmodels/collection.rb
#A collection can have another collection as a member, or an image
A collection can have another collection as a member, or an image
A collection can have another collection as a member or an image
def insert_member(fedora_object)
      if (fedora_object.instance_of?(Bplmodels::ObjectBase))
      elsif (fedora_object.instance_of?(Bplmodels::Institution))
        members.insert_member(:member_id=>fedora_object.pid, :member_title=>fedora_object.titleSet_display, :member_type=>fedora_object.fedora_name)
        fedora_object.collections << self
        self.institutions << fedora_object
      end
      fedora_object.save!
      self.save!
    end
def insert_member ( fedora_object ) if ( fedora_object . instance_of? ( Bplmodels :: ObjectBase ) ) elsif ( fedora_object . instance_of? ( Bplmodels :: Institution ) ) members . insert_member ( :member_id => fedora_object . pid , :member_title => fedora_object . titleSet_display , :member_type => fedora_object . fedora_name ) fedora_object . collections << self self . institutions << fedora_object end fedora_object . save! self . save! end
A collection can have another collection as a member, or an image
A collection can have another collection as a member or an image
#add to the members ds #members.insert_member(:member_id=>fedora_object.pid, :member_title=>fedora_object.titleSet_display, :member_type=>fedora_object.fedora_name #add to the rels-ext ds #fedora_object.collections << self #self.objects << fedora_object #self.add_relationship(:has_image, "info:fedora/#{fedora_object.pid}") #add to the members ds #add to the rels-ext ds
fedora_object