Class: CDMBL::TransformWorker
- Inherits:
-
Object
- Object
- CDMBL::TransformWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/cdmbl/transform_worker.rb
Instance Attribute Summary collapse
- #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
#cdm_api_klass ⇒ Object
43 44 45 |
# File 'lib/cdmbl/transform_worker.rb', line 43 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
47 48 49 |
# File 'lib/cdmbl/transform_worker.rb', line 47 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
55 56 57 |
# File 'lib/cdmbl/transform_worker.rb', line 55 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
39 40 41 |
# File 'lib/cdmbl/transform_worker.rb', line 39 def oai_request_klass @oai_request_klass ||= OaiRequest end |
#oai_set_lookup_klass ⇒ Object
35 36 37 |
# File 'lib/cdmbl/transform_worker.rb', line 35 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
51 52 53 |
# File 'lib/cdmbl/transform_worker.rb', line 51 def transformer_klass @transformer_klass ||= Transformer end |
Instance Method Details
#perform(identifiers, solr_config, cdm_endpoint, oai_endpoint, field_mappings, extract_compounds) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cdmbl/transform_worker.rb', line 19 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 |