Class: DorIndexing::Indexers::RightsMetadataIndexer
- Inherits:
-
Object
- Object
- DorIndexing::Indexers::RightsMetadataIndexer
- Defined in:
- lib/dor_indexing/indexers/rights_metadata_indexer.rb
Overview
Indexes the rights metadata
Instance Attribute Summary collapse
-
#cocina ⇒ Object
readonly
Returns the value of attribute cocina.
Instance Method Summary collapse
-
#initialize(cocina:) ⇒ RightsMetadataIndexer
constructor
A new instance of RightsMetadataIndexer.
-
#to_solr ⇒ Hash
The partial solr document for rightsMetadata.
Constructor Details
#initialize(cocina:) ⇒ RightsMetadataIndexer
Returns a new instance of RightsMetadataIndexer.
9 10 11 |
# File 'lib/dor_indexing/indexers/rights_metadata_indexer.rb', line 9 def initialize(cocina:, **) @cocina = cocina end |
Instance Attribute Details
#cocina ⇒ Object (readonly)
Returns the value of attribute cocina.
7 8 9 |
# File 'lib/dor_indexing/indexers/rights_metadata_indexer.rb', line 7 def cocina @cocina end |
Instance Method Details
#to_solr ⇒ Hash
Returns the partial solr document for rightsMetadata.
14 15 16 17 18 19 20 21 |
# File 'lib/dor_indexing/indexers/rights_metadata_indexer.rb', line 14 def to_solr { 'copyright_ssim' => cocina.access.copyright, 'use_statement_ssim' => cocina.access.useAndReproductionStatement, 'use_license_machine_ssi' => license, 'rights_descriptions_ssim' => rights_description }.compact end |