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-8.7.0 spec/samples/models/oral_history.rb
active-fedora-8.6.0 spec/samples/models/oral_history.rb
active-fedora-8.5.0 spec/samples/models/oral_history.rb
active-fedora-8.4.2 spec/samples/models/oral_history.rb
active-fedora-8.4.1 spec/samples/models/oral_history.rb
active-fedora-7.3.1 spec/samples/models/oral_history.rb
active-fedora-7.3.0 spec/samples/models/oral_history.rb
active-fedora-8.4.0 spec/samples/models/oral_history.rb
active-fedora-8.3.0 spec/samples/models/oral_history.rb
active-fedora-8.2.2 spec/samples/models/oral_history.rb
active-fedora-8.2.1 spec/samples/models/oral_history.rb
active-fedora-8.2.0 spec/samples/models/oral_history.rb
active-fedora-7.2.0 spec/samples/models/oral_history.rb
active-fedora-8.1.0 spec/samples/models/oral_history.rb
active-fedora-8.0.1 spec/samples/models/oral_history.rb
active-fedora-9.0.6 spec/samples/models/oral_history.rb
active-fedora-9.0.5 spec/samples/models/oral_history.rb
active-fedora-9.0.4 spec/samples/models/oral_history.rb
active-fedora-9.0.3 spec/samples/models/oral_history.rb
active-fedora-9.0.2 spec/samples/models/oral_history.rb