Class: CDMBL::TransformWorker
- Inherits:
-
Object
- Object
- CDMBL::TransformWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/cdmbl/transform_worker.rb
Instance Attribute Summary collapse
- #cache_klass ⇒ Object
- #cdm_api_klass ⇒ Object
-
#cdm_endpoint ⇒ Object
readonly
Returns the value of attribute cdm_endpoint.
- #cdm_notification_klass ⇒ Object
-
#extract_compounds ⇒ Object
readonly
Returns the value of attribute extract_compounds.
-
#field_mappings ⇒ Object
readonly
Returns the value of attribute field_mappings.
-
#identifiers ⇒ Object
readonly
Returns the value of attribute identifiers.
- #load_worker_klass ⇒ Object
-
#oai_endpoint ⇒ Object
readonly
Returns the value of attribute oai_endpoint.
- #oai_request_klass ⇒ Object
- #oai_set_lookup_klass ⇒ Object
-
#solr_config ⇒ Object
readonly
Returns the value of attribute solr_config.
- #transformer_klass ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#cache_klass ⇒ Object
60 61 62 |
# File 'lib/cdmbl/transform_worker.rb', line 60 def cache_klass @cache_klass ||= Rails end |
#cdm_api_klass ⇒ Object
44 45 46 |
# File 'lib/cdmbl/transform_worker.rb', line 44 def cdm_api_klass @cdm_api_klass ||= CONTENTdmAPI::Item end |
#cdm_endpoint ⇒ Object (readonly)
Returns the value of attribute cdm_endpoint.
5 6 7 |
# File 'lib/cdmbl/transform_worker.rb', line 5 def cdm_endpoint @cdm_endpoint end |
#cdm_notification_klass ⇒ Object
48 49 50 |
# File 'lib/cdmbl/transform_worker.rb', line 48 def cdm_notification_klass @cdm_notification_klass ||= CdmNotification end |
#extract_compounds ⇒ Object (readonly)
Returns the value of attribute extract_compounds.
5 6 7 |
# File 'lib/cdmbl/transform_worker.rb', line 5 def extract_compounds @extract_compounds end |
#field_mappings ⇒ Object (readonly)
Returns the value of attribute field_mappings.
5 6 7 |
# File 'lib/cdmbl/transform_worker.rb', line 5 def field_mappings @field_mappings end |
#identifiers ⇒ Object (readonly)
Returns the value of attribute identifiers.
5 6 7 |
# File 'lib/cdmbl/transform_worker.rb', line 5 def identifiers @identifiers end |
#load_worker_klass ⇒ Object
56 57 58 |
# File 'lib/cdmbl/transform_worker.rb', line 56 def load_worker_klass @load_worker_klass ||= LoadWorker end |
#oai_endpoint ⇒ Object (readonly)
Returns the value of attribute oai_endpoint.
5 6 7 |
# File 'lib/cdmbl/transform_worker.rb', line 5 def oai_endpoint @oai_endpoint end |
#oai_request_klass ⇒ Object
40 41 42 |
# File 'lib/cdmbl/transform_worker.rb', line 40 def oai_request_klass @oai_request_klass ||= OaiRequest end |
#oai_set_lookup_klass ⇒ Object
36 37 38 |
# File 'lib/cdmbl/transform_worker.rb', line 36 def oai_set_lookup_klass @oai_set_lookup_klass ||= OAISetLookup end |
#solr_config ⇒ Object (readonly)
Returns the value of attribute solr_config.
5 6 7 |
# File 'lib/cdmbl/transform_worker.rb', line 5 def solr_config @solr_config end |
#transformer_klass ⇒ Object
52 53 54 |
# File 'lib/cdmbl/transform_worker.rb', line 52 def transformer_klass @transformer_klass ||= Transformer end |
Instance Method Details
#perform(identifiers, solr_config, cdm_endpoint, oai_endpoint, field_mappings, extract_compounds) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cdmbl/transform_worker.rb', line 20 def perform(identifiers, solr_config, cdm_endpoint, oai_endpoint, field_mappings, extract_compounds) @identifiers = identifiers @solr_config = solr_config @cdm_endpoint = cdm_endpoint @oai_endpoint = oai_endpoint @field_mappings = field_mappings @extract_compounds = extract_compounds transform_and_load! end |