-
Notifications
You must be signed in to change notification settings - Fork 21
Bulkrax::ImporterJob Overview
Jeremy Friesen edited this page Oct 20, 2022
·
2 revisions
In Bulkrax we have a primary job: Bulkrax::ImporterJob
, it handles importing both collections and works via the Bulkrax::Importer#import_collections
and Bullkrax::Importer#import_works
. Below are the two sequence diagrams for performing the Bulkrax::ImportCollectionJob
and Bulkrax::ImportWorkJob
The Collections
Collection PlantUML
```plantuml @startuml !theme amiga "Bulkrax::ImporterJob\n\t#perform" -> "Bulkrax::Importer\n\t#import_collections" "Bulkrax::Importer\n\t#import_collections" -> "Bulkrax::Importer\n\t#parser_class\n\t#create_collections" "Bulkrax::Importer\n\t#parser_class\n\t#create_collections" -> "Bulkrax::ImportCollectionJob\n\t#perform" @enduml ```The Works
Work PlantUML
```plantuml @startuml !theme amiga "Bulkrax::ImporterJob\n\t#perform" -> "Bulkrax::Importer\n\t#import_works" "Bulkrax::Importer\n\t#import_works" -> "Bulkrax::Importer\n\t#parser_class\n\t#create_works" "Bulkrax::Importer\n\t#parser_class\n\t#create_works" -> "Bulkrax::ImportWorkJob\n\t#perform" @enduml ```Both Bulkrax::ImportWorkJob
and Bulkrax::ImportCollectionJob
then rely on the Bulkrax::Entry
to run.
For imports, we look to Bulkrax::ImportBehavior
.
Bulkrax::ImportBehavior PlantUML
```plantuml @startuml !theme amiga "Bulkrax::Entry\n\t#build_for_importer" -> "Bulkrax::Entry\n\t#factory" "Bulkrax::Entry\n\t#factory" <-> "Bulkrax::ObjectFactory\n\t.new" "Bulkrax::Entry\n\t#build_for_importer" <- "Bulkrax::Entry\n\t#factory" : "returns Bulkrax::ObjectFactory instance" "Bulkrax::Entry\n\t#build_for_importer" -> "Bulkrax::ObjectFactory\n\t.run!" "Bulkrax::ObjectFactory\n\t.run!" -> "Bulkrax::ObjectFactory #create or #update" "Bulkrax::Entry\n\t#build_for_importer" <- "Bulkrax::ObjectFactory\n\t#create or #update" "Bulkrax::Entry\n\t#build_for_importer" <-> "Bulkrax::PendingRelationship\n\t.create!" : "for parent(s)" "Bulkrax::Entry\n\t#build_for_importer" <-> "Bulkrax::PendingRelationship\n\t.create!" : "for children" @enduml ```Within the Bulkrax::ObjectFactory
is where Bulkrax connects into Hyrax’s actor stack to perform creates and updates to the Work and Collection objects.