Sha256: 28648b438e1fce02a3ceaabd7c211ed317a910c6b4e771c5a37bc924c43590ab

Contents?: true

Size: 1.44 KB

Versions: 13

Compression:

Stored size: 1.44 KB

Contents

# -*- encoding : utf-8 -*-
class SolrDocument 

  include Blacklight::Solr::Document

  use_extension FcrepoAdmin::SolrDocumentExtension

  # self.unique_key = 'id'
  
  # The following shows how to setup this blacklight document to display marc documents
  extension_parameters[:marc_source_field] = :marc_display
  extension_parameters[:marc_format_type] = :marcxml
  use_extension( Blacklight::Solr::Document::Marc) do |document|
    document.key?( :marc_display  )
  end
  
  # Email uses the semantic field mappings below to generate the body of an email.
  SolrDocument.use_extension( Blacklight::Solr::Document::Email )
  
  # SMS uses the semantic field mappings below to generate the body of an SMS email.
  SolrDocument.use_extension( Blacklight::Solr::Document::Sms )

  # DublinCore uses the semantic field mappings below to assemble an OAI-compliant Dublin Core document
  # Semantic mappings of solr stored fields. Fields may be multi or
  # single valued. See Blacklight::Solr::Document::ExtendableClassMethods#field_semantics
  # and Blacklight::Solr::Document#to_semantic_values
  # Recommendation: Use field names from Dublin Core
  use_extension( Blacklight::Solr::Document::DublinCore)    
  field_semantics.merge!(    
                         :title => "title_display",
                         :author => "author_display",
                         :language => "language_facet",
                         :format => "format"
                         )

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fcrepo_admin-0.4.1 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.4.0 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.3.5 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.3.4 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.3.3 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.3.2 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.3.1 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.3.0 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.2.4 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.2.3 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.2.0 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.1.1 spec/internal/app/models/solr_document.rb
fcrepo_admin-0.1.0 spec/internal/app/models/solr_document.rb