Sha256: c4f3c629a40e0adb27ed6187179658aa8c2dd365fc7dc3e00967b38ff3b1253a

Contents?: true

Size: 1.31 KB

Versions: 140

Compression:

Stored size: 1.31 KB

Contents

require 'active-fedora'

class OralHistory < ActiveFedora::Base
    # Imitating DataMapper ...
    
    has_many :parts, :property=>:is_part_of
    
    # These are all the properties that don't quite fit into Qualified DC
    # Put them on the object itself (in the properties datastream) for now.
    has_metadata :name => "properties", :type => ActiveFedora::SimpleDatastream do |m|
      field "alt_title", :string
      field "narrator",  :string
      field "interviewer", :integer
      field "transcript_editor", :text
      field "bio", :string
      field "notes", :text
      field "hard_copy_availability", :text
      field "hard_copy_location", :text
      field "other_contributors", :string
      field "restrictions", :text
    end
        
    has_metadata :name => "dublin_core", :type => ActiveFedora::QualifiedDublinCoreDatastream do |m|
      # Default :multiple => true
      #
      # on retrieval, these will be pluralized and returned as arrays
      # ie. subject_entries = my_oral_history.dublin_core.subjects
      #
      # aimint to use method-missing to support calling methods like
      # my_oral_history.subjects  OR   my_oral_history.titles  OR EVEN my_oral_history.title whenever possible
      
      #field :name => "subject_heading", :string, {:xml_node => "subject", :encoding => "LCSH"}
    end

  
end

Version data entries

140 entries across 140 versions & 1 rubygems

Version Path
active-fedora-6.7.8 spec/samples/models/oral_history.rb
active-fedora-7.0.4 spec/samples/models/oral_history.rb
active-fedora-7.0.3 spec/samples/models/oral_history.rb
active-fedora-7.0.2 spec/samples/models/oral_history.rb
active-fedora-7.0.1 spec/samples/models/oral_history.rb
active-fedora-7.0.0 spec/samples/models/oral_history.rb
active-fedora-7.0.0.rc3 spec/samples/models/oral_history.rb
active-fedora-6.7.7 spec/samples/models/oral_history.rb
active-fedora-7.0.0.rc2 spec/samples/models/oral_history.rb
active-fedora-6.7.6 spec/samples/models/oral_history.rb
active-fedora-7.0.0.rc1 spec/samples/models/oral_history.rb
active-fedora-6.7.5 spec/samples/models/oral_history.rb
active-fedora-7.0.0.pre3 spec/samples/models/oral_history.rb
active-fedora-6.7.4 spec/samples/models/oral_history.rb
active-fedora-7.0.0.pre2 spec/samples/models/oral_history.rb
active-fedora-7.0.0.pre1 spec/samples/models/oral_history.rb
active-fedora-6.7.3 spec/samples/models/oral_history.rb
active-fedora-6.7.2 spec/samples/models/oral_history.rb
active-fedora-6.7.1 spec/samples/models/oral_history.rb
active-fedora-6.7.0 spec/samples/models/oral_history.rb