Class WikibaseAPIUpdateScheduler
java.lang.Object
org.openrefine.wikidata.updates.scheduler.WikibaseAPIUpdateScheduler
- All Implemented Interfaces:
UpdateScheduler
A simple scheduler for batches committed via the Wikibase API.
The strategy is quite simple and makes at most two edits per touched entity
(which is not minimal though). Each update is split between statements making
references to new entities, and statements not making these references. All
updates with no references to new entities are done first (which creates all new
entities), then all other updates are done.
- Author:
- Antonin Delpeuch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionschedule(List<EntityEdit> updates) Performs the scheduling.protected voidsplitUpdate(EntityEdit edit) Splits an update into two parts
-
Constructor Details
-
WikibaseAPIUpdateScheduler
public WikibaseAPIUpdateScheduler()
-
-
Method Details
-
schedule
Description copied from interface:UpdateSchedulerPerforms the scheduling. The initial updates are provided as a list so that the scheduler can attempt to respect the initial order (but no guarantee is made for that in general).- Specified by:
schedulein interfaceUpdateScheduler- Parameters:
updates- the updates to schedule- Returns:
- the reorganized updates
- Throws:
ImpossibleSchedulingException- when the scheduler cannot cope with a particular edit plan.
-
splitUpdate
Splits an update into two parts- Parameters:
update-
-