Sha256: 774fbbc80f29484d927c47019db966fc096cb2f7799cca1f06ddd597c0319f50

Contents?: true

Size: 1.58 KB

Versions: 105

Compression:

Stored size: 1.58 KB

Contents

require 'active-fedora'

include ActiveFedora
include SemanticNode

class OralHistory < ActiveFedora::Base
    include Model

  
    # Imitating DataMapper ...
    
    has_relationship "parts", :is_part_of, :inbound => true
    
    # 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 => MetadataDatastream 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 => 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
    
    has_metadata :name => "significant_passages" do |m|
      field "significant_passage", :text
    end
    
    has_metadata :name => "sensitive_passages" do |m|
      field "sensitive_passage", :text
    end

  
end

Version data entries

105 entries across 105 versions & 1 rubygems

Version Path
active-fedora-4.2.0 spec/samples/models/oral_history.rb
active-fedora-4.1.0 spec/samples/models/oral_history.rb
active-fedora-4.0.0 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc20 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc19 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc18 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc17 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc16 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc15 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc14 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc13 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc12 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc11 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc10 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc9 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc8 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc7 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc6 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc5 spec/samples/models/oral_history.rb
active-fedora-4.0.0.rc4 spec/samples/models/oral_history.rb