Verified Owner
Top Methods
org.jabref.logic.cleanup

public Interface CleanupJob

Known Direct Implementers
org.jabref.logic.cleanup.ConvertToBiblatexCleanup, org.jabref.logic.cleanup.ConvertToBibtexCleanup, org.jabref.logic.cleanup.DoiCleanup, org.jabref.logic.cleanup.EprintCleanup, org.jabref.logic.cleanup.FieldFormatterCleanup, org.jabref.logic.cleanup.FileLinksCleanup, org.jabref.logic.cleanup.MoveFieldCleanup, org.jabref.logic.cleanup.MoveFilesCleanup, org.jabref.logic.cleanup.NormalizeWhitespacesCleanup, org.jabref.logic.cleanup.RelativePathsCleanup, org.jabref.logic.cleanup.RemoveLinksToNotExistentFiles, org.jabref.logic.cleanup.RenamePdfCleanup, org.jabref.logic.cleanup.TimestampToDateField, org.jabref.logic.cleanup.UnabbreviateJournalCleanup, org.jabref.logic.cleanup.UpgradePdfPsToFileCleanup, org.jabref.logic.cleanup.URLCleanup, org.jabref.logic.cleanup.XmpMetadataCleanup, org.jabref.logic.cleanup.AbbreviateJournalCleanup, org.jabref.logic.cleanup.ArXivDoiCleanup
Annotations
@FunctionalInterface
Imports
java.util.List, java.util.concurrent.atomic.AtomicReference, java.util.function.Consumer, org.jabref.model.FieldChange, org.jabref.model.entry.BibEntry

Method Summary

Modifier and TypeMethod and Description
public List<FieldChange>
cleanup(BibEntry entry)

Cleans up the given entry and returns the list of changes made.

public default List<FieldChange>
cleanup(BibEntry entry, Consumer<Runnable> mutationScheduler)

Cleans up the given entry, routing all BibEntry field mutations through the provided scheduler.

Method Detail

cleanupback to summary
public List<FieldChange> cleanup(BibEntry entry)

Cleans up the given entry and returns the list of changes made.

cleanupback to summary
public default List<FieldChange> cleanup(BibEntry entry, Consumer<Runnable> mutationScheduler)

Cleans up the given entry, routing all BibEntry field mutations through the provided scheduler.

The scheduler must execute mutations synchronously (blocking the caller until complete), e.g. UiTaskExecutor::runAndWaitInJavaFXThread when called from a background thread, or Runnable::run when already on the correct thread.

The default implementation wraps the entire cleanup(BibEntry) call in the scheduler, which is safe but puts all computation on the scheduler's thread. Override this method to keep expensive computation on the calling (background) thread and only schedule the actual field mutations.