Class: Bulkrax::Configuration
- Inherits:
-
Object
- Object
- Bulkrax::Configuration
- Defined in:
- lib/bulkrax.rb
Instance Attribute Summary collapse
- #api_definition ⇒ Object
- #collection_model_class ⇒ Object
- #curation_concerns ⇒ Object
- #default_field_mapping ⇒ Object
- #default_work_type ⇒ Object
- #export_path ⇒ Object
-
#factory_class_name_coercer ⇒ #call, Bulkrax::FactoryClassFinder::DefaultCoercer
A function responsible for converting the name of a factory class to the corresponding constant.
- #field_mappings ⇒ Object
- #file_model_class ⇒ Object
-
#fill_in_blank_source_identifiers ⇒ #call
With arity 2.
- #generated_metadata_mapping ⇒ Object
- #import_path ⇒ Object
- #ingest_queue_name ⇒ String, Proc
- #multi_value_element_join_on ⇒ Object
- #multi_value_element_split_on ⇒ Object
- #object_factory ⇒ Object
- #parsers ⇒ Object
- #qa_controlled_properties ⇒ Object
- #related_children_field_mapping ⇒ Object
- #related_parents_field_mapping ⇒ Object
- #relationship_job_class ⇒ Object
- #removed_image_path ⇒ Object
- #required_elements ⇒ Object
- #reserved_properties ⇒ Object
- #server_name ⇒ Object
- #solr_key_for_member_file_ids ⇒ String
- #use_locking ⇒ Object (also: #use_locking?)
Instance Method Summary collapse
- #collection_model_internal_resource ⇒ Object
- #curation_concern_internal_resources ⇒ Object
- #file_model_internal_resource ⇒ Object
Instance Attribute Details
#api_definition ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def api_definition @api_definition end |
#collection_model_class ⇒ Object
94 95 96 |
# File 'lib/bulkrax.rb', line 94 def collection_model_class @collection_model_class ||= Collection end |
#curation_concerns ⇒ Object
114 115 116 |
# File 'lib/bulkrax.rb', line 114 def curation_concerns @curation_concerns ||= defined?(::Hyrax) ? ::Hyrax.config.curation_concerns : [] end |
#default_field_mapping ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def default_field_mapping @default_field_mapping end |
#default_work_type ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def default_work_type @default_work_type end |
#export_path ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def export_path @export_path end |
#factory_class_name_coercer ⇒ #call, Bulkrax::FactoryClassFinder::DefaultCoercer
A function responsible for converting the name of a factory class to the corresponding constant.
90 91 92 |
# File 'lib/bulkrax.rb', line 90 def factory_class_name_coercer @factory_class_name_coercer || Bulkrax::FactoryClassFinder::DefaultCoercer end |
#field_mappings ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def field_mappings @field_mappings end |
#file_model_class ⇒ Object
104 105 106 |
# File 'lib/bulkrax.rb', line 104 def file_model_class @file_model_class ||= defined?(::Hyrax) ? ::FileSet : File end |
#fill_in_blank_source_identifiers ⇒ #call
Returns with arity 2. The first parameter is a ApplicationParser and the second parameter is an Integer for the index of the record encountered in the import.
58 59 60 |
# File 'lib/bulkrax.rb', line 58 def fill_in_blank_source_identifiers @fill_in_blank_source_identifiers end |
#generated_metadata_mapping ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def @generated_metadata_mapping end |
#import_path ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def import_path @import_path end |
#ingest_queue_name ⇒ String, Proc
127 128 129 130 131 |
# File 'lib/bulkrax.rb', line 127 def ingest_queue_name return @ingest_queue_name if @ingest_queue_name.present? return Hyrax.config.ingest_queue_name if defined?(Hyrax) :import end |
#multi_value_element_join_on ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def multi_value_element_join_on @multi_value_element_join_on end |
#multi_value_element_split_on ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def multi_value_element_split_on @multi_value_element_split_on end |
#object_factory ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def object_factory @object_factory end |
#parsers ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def parsers @parsers end |
#qa_controlled_properties ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def qa_controlled_properties @qa_controlled_properties end |
#related_children_field_mapping ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def @related_children_field_mapping end |
#related_parents_field_mapping ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def @related_parents_field_mapping end |
#relationship_job_class ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def relationship_job_class @relationship_job_class end |
#removed_image_path ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def removed_image_path @removed_image_path end |
#required_elements ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def required_elements @required_elements end |
#reserved_properties ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def reserved_properties @reserved_properties end |
#server_name ⇒ Object
35 36 37 |
# File 'lib/bulkrax.rb', line 35 def server_name @server_name end |
#solr_key_for_member_file_ids ⇒ String
67 68 69 70 71 72 73 |
# File 'lib/bulkrax.rb', line 67 def solr_key_for_member_file_ids return @solr_key_for_member_file_ids if @solr_key_for_member_file_ids.present? return "member_ids_ssim" if defined?(Hyrax) "#{file_model_class.name.to_s.underscore}_ids_ssim" end |
#use_locking ⇒ Object Also known as: use_locking?
135 136 137 138 139 |
# File 'lib/bulkrax.rb', line 135 def use_locking return @use_locking if defined?(@use_locking) ENV.key?("REDIS_HOST") end |
Instance Method Details
#collection_model_internal_resource ⇒ Object
100 101 102 |
# File 'lib/bulkrax.rb', line 100 def collection_model_internal_resource collection_model_class.try(:internal_resource) || collection_model_class.to_s end |
#curation_concern_internal_resources ⇒ Object
120 121 122 |
# File 'lib/bulkrax.rb', line 120 def curation_concern_internal_resources curation_concerns.map { |cc| cc.try(:internal_resource) || cc.to_s }.uniq end |
#file_model_internal_resource ⇒ Object
110 111 112 |
# File 'lib/bulkrax.rb', line 110 def file_model_internal_resource file_model_class.try(:internal_resource) || file_model_class.to_s end |