Class: ActiveFedora::RDF::IndexingService
- Inherits:
-
Object
- Object
- ActiveFedora::RDF::IndexingService
- Includes:
- Solrizer::Common
- 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
-
#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) ⇒ IndexingService
constructor
A new instance of IndexingService.
Constructor Details
#initialize(obj) ⇒ IndexingService
Returns a new instance of IndexingService.
12 13 14 |
# File 'lib/active_fedora/rdf/indexing_service.rb', line 12 def initialize(obj) @object = obj end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
9 10 11 |
# File 'lib/active_fedora/rdf/indexing_service.rb', line 9 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
19 20 21 22 23 |
# File 'lib/active_fedora/rdf/indexing_service.rb', line 19 def generate_solr_document(prefix_method = nil) solr_doc = add_assertions(prefix_method) yield(solr_doc) if block_given? solr_doc end |