Class: IiifPrint::PersistenceLayer::AbstractAdapter Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/iiif_print/persistence_layer.rb

Overview

This class is abstract.

Direct Known Subclasses

ActiveFedoraAdapter, ValkyrieAdapter

Class Method Summary collapse

Class Method Details

.clean_for_tests!Object

This method is abstract.


68
69
70
71
# File 'lib/iiif_print/persistence_layer.rb', line 68

def self.clean_for_tests!
  return false unless Rails.env.test?
  yield
end

.copy_derivatives_from_data_store(stream:, directives:) ⇒ Object

Raises:

  • (NotImplementedError)


109
110
111
# File 'lib/iiif_print/persistence_layer.rb', line 109

def self.copy_derivatives_from_data_store(stream:, directives:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.create_relationship_between(child_record:, parent_record:) ⇒ Object

Raises:

  • (NotImplementedError)


89
90
91
# File 'lib/iiif_print/persistence_layer.rb', line 89

def self.create_relationship_between(child_record:, parent_record:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.decorate_form_with_adapter_logic(work_type:) ⇒ Object

Returns the corresponding indexer for the work_type.

Parameters:

  • work_type (Class)

Returns:

  • the corresponding indexer for the work_type

Raises:

  • (NotImplementedError)


36
37
38
# File 'lib/iiif_print/persistence_layer.rb', line 36

def self.decorate_form_with_adapter_logic(work_type:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.decorate_with_adapter_logic(work_type:) ⇒ Object

Returns the corresponding indexer for the work_type.

Parameters:

  • work_type (Class)

Returns:

  • the corresponding indexer for the work_type

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/iiif_print/persistence_layer.rb', line 29

def self.decorate_with_adapter_logic(work_type:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.destroy_children_split_from(file_set:, work:, model:) ⇒ Object

Parameters:

  • file_set (Object)
  • work (Object)
  • model (Class)

    The class name for which we’ll split children.

Raises:

  • (NotImplementedError)


44
45
46
# File 'lib/iiif_print/persistence_layer.rb', line 44

def self.destroy_children_split_from(file_set:, work:, model:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.extract_text_for(file_set:) ⇒ Object

Raises:

  • (NotImplementedError)


113
114
115
# File 'lib/iiif_print/persistence_layer.rb', line 113

def self.extract_text_for(file_set:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.find_by(id:) ⇒ Object

Raises:

  • (NotImplementedError)


97
98
99
# File 'lib/iiif_print/persistence_layer.rb', line 97

def self.find_by(id:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.find_by_title_for(title:, model:) ⇒ Object

Raises:

  • (NotImplementedError)


93
94
95
# File 'lib/iiif_print/persistence_layer.rb', line 93

def self.find_by_title_for(title:, model:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.grandparent_forObject

This method is abstract.

Raises:

  • (NotImplementedError)


56
57
58
# File 'lib/iiif_print/persistence_layer.rb', line 56

def self.grandparent_for(*)
  raise NotImplementedError, "#{self}.{__method__}"
end

.index_works(objects:) ⇒ Object

Raises:

  • (NotImplementedError)


105
106
107
# File 'lib/iiif_print/persistence_layer.rb', line 105

def self.index_works(objects:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.object_in_works(object) ⇒ Array<Object>

Parameters:

  • object (Object)

Returns:

  • (Array<Object>)

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/iiif_print/persistence_layer.rb', line 15

def self.object_in_works(object)
  raise NotImplementedError, "#{self}.{__method__}"
end

.object_ordered_works(object) ⇒ Array<Object>

Parameters:

  • object (Object)

Returns:

  • (Array<Object>)

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/iiif_print/persistence_layer.rb', line 22

def self.object_ordered_works(object)
  raise NotImplementedError, "#{self}.{__method__}"
end

.parent_forObject

This method is abstract.

Raises:

  • (NotImplementedError)


50
51
52
# File 'lib/iiif_print/persistence_layer.rb', line 50

def self.parent_for(*)
  raise NotImplementedError, "#{self}.{__method__}"
end

.pdf?(_file_set) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


85
86
87
# File 'lib/iiif_print/persistence_layer.rb', line 85

def self.pdf?(_file_set)
  raise NotImplementedError, "#{self}.{__method__}"
end

.pdf_path_for(file_set:) ⇒ Object

Raises:

  • (NotImplementedError)


117
118
119
# File 'lib/iiif_print/persistence_layer.rb', line 117

def self.pdf_path_for(file_set:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.save(object:) ⇒ Object

Raises:

  • (NotImplementedError)


101
102
103
# File 'lib/iiif_print/persistence_layer.rb', line 101

def self.save(object:)
  raise NotImplementedError, "#{self}.{__method__}"
end

.solr_field_queryObject

This method is abstract.

Raises:

  • (NotImplementedError)


62
63
64
# File 'lib/iiif_print/persistence_layer.rb', line 62

def self.solr_field_query(*)
  raise NotImplementedError, "#{self}.{__method__}"
end

.solr_name(*args) ⇒ Object

This method is abstract.

Raises:

  • (NotImplementedError)


81
82
83
# File 'lib/iiif_print/persistence_layer.rb', line 81

def self.solr_name(*args)
  raise NotImplementedError, "#{self}.{__method__}"
end

.solr_query(*args) ⇒ Object

This method is abstract.

Raises:

  • (NotImplementedError)


75
76
77
# File 'lib/iiif_print/persistence_layer.rb', line 75

def self.solr_query(*args)
  raise NotImplementedError, "#{self}.{__method__}"
end