Module: Samvera::NestingIndexer::Adapters::AbstractAdapter
- Included in:
- InMemoryAdapter
- Defined in:
- lib/samvera/nesting_indexer/adapters/abstract_adapter.rb
Overview
A module that defines the interface of methods required to interact with Samvera::NestingIndexer operations rubocop:disable Lint/UnusedMethodArgument
Class Method Summary collapse
- .each_child_document_of(document:) {|Samvera::NestingIndexer::Documents::IndexDocument| ... } ⇒ Object
- .each_perservation_document_id_and_parent_ids {|id, parent_ids| ... } ⇒ Object
- .find_index_document_by(id:) ⇒ Samvera::NestingIndexer::Documents::IndexDocument
- .find_preservation_document_by(id:) ⇒ Samvera::NestingIndexer::Document::PreservationDocument
-
.find_preservation_parent_ids_for(id:) ⇒ Array<String>
The parent ids of the given preservation document.
-
.write_document_attributes_to_index_layer(id:, parent_ids:, ancestors:, pathnames:, deepest_nested_depth:) ⇒ Object
deprecated
Deprecated.
Use .write_nesting_document_to_index_layer instead
-
.write_nesting_document_to_index_layer(nesting_document:) ⇒ Object
Void.
Class Method Details
.each_child_document_of(document:) {|Samvera::NestingIndexer::Documents::IndexDocument| ... } ⇒ Object
41 42 43 |
# File 'lib/samvera/nesting_indexer/adapters/abstract_adapter.rb', line 41 def self.each_child_document_of(document:, &block) raise NotImplementedError end |
.each_perservation_document_id_and_parent_ids {|id, parent_ids| ... } ⇒ Object
26 27 28 |
# File 'lib/samvera/nesting_indexer/adapters/abstract_adapter.rb', line 26 def self.each_perservation_document_id_and_parent_ids(&block) raise NotImplementedError end |
.find_index_document_by(id:) ⇒ Samvera::NestingIndexer::Documents::IndexDocument
18 19 20 |
# File 'lib/samvera/nesting_indexer/adapters/abstract_adapter.rb', line 18 def self.find_index_document_by(id:) raise NotImplementedError end |
.find_preservation_document_by(id:) ⇒ Samvera::NestingIndexer::Document::PreservationDocument
11 12 13 |
# File 'lib/samvera/nesting_indexer/adapters/abstract_adapter.rb', line 11 def self.find_preservation_document_by(id:) raise NotImplementedError end |
.find_preservation_parent_ids_for(id:) ⇒ Array<String>
Returns The parent ids of the given preservation document.
34 35 36 |
# File 'lib/samvera/nesting_indexer/adapters/abstract_adapter.rb', line 34 def self.find_preservation_parent_ids_for(id:) raise NotImplementedError end |
.write_document_attributes_to_index_layer(id:, parent_ids:, ancestors:, pathnames:, deepest_nested_depth:) ⇒ Object
Deprecated.
Use .write_nesting_document_to_index_layer instead
Returns Hash - the attributes written to the indexing layer.
54 55 56 |
# File 'lib/samvera/nesting_indexer/adapters/abstract_adapter.rb', line 54 def self.write_document_attributes_to_index_layer(id:, parent_ids:, ancestors:, pathnames:, deepest_nested_depth:) raise NotImplementedError end |
.write_nesting_document_to_index_layer(nesting_document:) ⇒ Object
Returns void.
63 64 65 |
# File 'lib/samvera/nesting_indexer/adapters/abstract_adapter.rb', line 63 def self.write_nesting_document_to_index_layer(nesting_document:) raise NotImplementedError end |