Class: DorIndexing::Indexers::DefaultObjectRightsIndexer
- Inherits:
-
Object
- Object
- DorIndexing::Indexers::DefaultObjectRightsIndexer
- Defined in:
- lib/dor_indexing/indexers/default_object_rights_indexer.rb
Overview
Indexes the default object rights
Instance Attribute Summary collapse
-
#cocina ⇒ Object
readonly
Returns the value of attribute cocina.
Instance Method Summary collapse
-
#initialize(cocina:) ⇒ DefaultObjectRightsIndexer
constructor
A new instance of DefaultObjectRightsIndexer.
-
#to_solr ⇒ Hash
The partial solr document for defaultObjectRights.
Constructor Details
#initialize(cocina:) ⇒ DefaultObjectRightsIndexer
Returns a new instance of DefaultObjectRightsIndexer.
9 10 11 |
# File 'lib/dor_indexing/indexers/default_object_rights_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/default_object_rights_indexer.rb', line 7 def cocina @cocina end |
Instance Method Details
#to_solr ⇒ Hash
Returns the partial solr document for defaultObjectRights.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/dor_indexing/indexers/default_object_rights_indexer.rb', line 14 def to_solr return {} unless cocina.administrative.accessTemplate { 'use_statement_ssim' => use_statement, 'copyright_ssim' => copyright, 'rights_descriptions_ssim' => 'dark', 'default_rights_descriptions_ssim' => Cocina::Models::Builders::RightsDescriptionBuilder.build(cocina) } end |