Class: ActiveFedora::RDF::IndexingService
- Inherits:
 - 
      Object
      
        
- Object
 - ActiveFedora::RDF::IndexingService
 
 
- Defined in:
 - lib/active_fedora/rdf/indexing_service.rb
 
Overview
Responsible for generating the solr document (via #generate_solr_document) of the given object.
Instance Attribute Summary collapse
- 
  
    
      #index_config  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute index_config.
 - 
  
    
      #object  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute object.
 
Instance Method Summary collapse
- 
  
    
      #generate_solr_document(prefix_method = nil) {|Hash| ... } ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Creates a solr document hash for the rdf assertions of the #object.
 - 
  
    
      #initialize(obj, index_config = nil)  ⇒ IndexingService 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of IndexingService.
 
Constructor Details
#initialize(obj, index_config = nil) ⇒ IndexingService
Returns a new instance of IndexingService.
      12 13 14 15 16 17 18 19  | 
    
      # File 'lib/active_fedora/rdf/indexing_service.rb', line 12 def initialize(obj, index_config = nil) unless index_config Deprecation.warn(self, "initializing ActiveFedora::RDF::IndexingService without an index_config is deprecated and will be removed in ActiveFedora 13.0") index_config = obj.class.index_config end @object = obj @index_config = index_config end  | 
  
Instance Attribute Details
#index_config ⇒ Object (readonly)
Returns the value of attribute index_config.
      8 9 10  | 
    
      # File 'lib/active_fedora/rdf/indexing_service.rb', line 8 def index_config @index_config end  | 
  
#object ⇒ Object (readonly)
Returns the value of attribute object.
      8 9 10  | 
    
      # File 'lib/active_fedora/rdf/indexing_service.rb', line 8 def object @object end  | 
  
Instance Method Details
#generate_solr_document(prefix_method = nil) {|Hash| ... } ⇒ Hash
Creates a solr document hash for the rdf assertions of the #object
      24 25 26 27 28  | 
    
      # File 'lib/active_fedora/rdf/indexing_service.rb', line 24 def generate_solr_document(prefix_method = nil) solr_doc = add_assertions(prefix_method) yield(solr_doc) if block_given? solr_doc end  |