Class: ActiveFedora::RDF::IndexingService

Inherits:
Object
  • Object
show all
Includes:
Solrizer::Common
Defined in:
lib/active_fedora/rdf/indexing_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ IndexingService


8
9
10
# File 'lib/active_fedora/rdf/indexing_service.rb', line 8

def initialize(obj)
  @object = obj
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object


4
5
6
# File 'lib/active_fedora/rdf/indexing_service.rb', line 4

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

Yields:

  • (Hash)

    yields the solr document


15
16
17
18
19
# File 'lib/active_fedora/rdf/indexing_service.rb', line 15

def generate_solr_document(prefix_method = nil)
  solr_doc = add_assertions(prefix_method)
  yield(solr_doc) if block_given?
  solr_doc
end