Class: SolrDocument

Inherits:
Object
  • Object
show all
Includes:
Blacklight::Solr::Document
Defined in:
vendor/plugins/blacklight/app/models/solr_document.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods included from Blacklight::Solr::Document

#apply_extensions, #export_as, #export_formats, included, #to_semantic_values, #will_export_as

Class Method Details

+ (Object) marc_format_type=(type)



17
18
19
20
21
22
23
24
25
26
27
# File 'vendor/plugins/blacklight/app/models/solr_document.rb', line 17

def self.marc_format_type=(type)
  
  warn "[DEPRECATION] SolrDocument.marc_format_type and .marc_source_field are deprecated. Please instead use SolrDocument.extension_parameters[:marc_format_type] = type, and use_extension to register the Marc extension instead"
  extension_parameters[:marc_format_type] = type

  # Auto-register the Marc extension if both source_field and format_type are
  # set, to mimic old deprecated legacy behavior. 
  if (extension_parameters[:marc_source_field] && extension_parameters[:marc_format_type])     
    use_extension( Blacklight::Solr::Document::Marc)  { |document| document.key?( extension_parameters[:marc_source_field] ) }
  end
end

+ (Object) marc_source_field=(source_field)



29
30
31
32
33
34
35
36
37
38
39
40
# File 'vendor/plugins/blacklight/app/models/solr_document.rb', line 29

def self.marc_source_field=( source_field)
  
  warn "[DEPRECATION] SolrDocument.marc_format_type and .marc_source_field are deprecated. Please instead use SolrDocument.extension_parameters[:marc_source_field] = field, and use_extension to register the Marc extension instead"
  
  extension_parameters[:marc_source_field] = source_field

  # Auto-register the Marc extension if both source_field and format_type are
  # set, to mimic old deprecated legacy behavior. 
  if (extension_parameters[:marc_source_field] && extension_parameters[:marc_format_type])     
    use_extension( Blacklight::Solr::Document::Marc)  { |document| document.key?( extension_parameters[:marc_source_field] ) }
  end
end

Instance Method Details

- (Object) marc

DEPRECATED



11
12
13
14
15
# File 'vendor/plugins/blacklight/app/models/solr_document.rb', line 11

def marc
  warn "[DEPRECATION] aDocument.marc is deprecated.  Please use aDocument.respond_to?(:to_marc) / aDocument.respond_to?(:marc),  or aDocument.export_formats.keys.include?(:some_format) / aDocument.export_as(:some_format) instead."

  nil
end