Class WikibaseAPIUpdateScheduler
- java.lang.Object
-
- org.openrefine.wikibase.updates.scheduler.WikibaseAPIUpdateScheduler
-
- All Implemented Interfaces:
UpdateScheduler
public class WikibaseAPIUpdateScheduler extends Object implements 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 Constructor Description WikibaseAPIUpdateScheduler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<EntityEdit>
schedule(List<EntityEdit> updates)
Performs the scheduling.protected void
splitUpdate(EntityEdit edit)
Splits an update into two parts
-
-
-
Method Detail
-
schedule
public List<EntityEdit> schedule(List<EntityEdit> updates) throws ImpossibleSchedulingException
Description copied from interface:UpdateScheduler
Performs 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:
schedule
in interfaceUpdateScheduler
- Parameters:
updates
- the updates to schedule- Returns:
- the reorganized updates
- Throws:
ImpossibleSchedulingException
- when the scheduler cannot cope with a particular edit plan.
-
splitUpdate
protected void splitUpdate(EntityEdit edit)
Splits an update into two parts- Parameters:
edit
-
-
-