use of org.jabref.logic.cleanup.UpgradePdfPsToFileCleanup in project jabref by JabRef.
the class FileLinksUpgradeWarning method upgradePdfPsToFile.
/**
* Collect file links from the given set of fields, and add them to the list contained in the field
* GUIGlobals.FILE_FIELD.
*
* @param database The database to modify.
* @param fields The fields to find links in.
* @return A CompoundEdit specifying the undo operation for the whole operation.
*/
private static NamedCompound upgradePdfPsToFile(BibDatabase database) {
NamedCompound ce = new NamedCompound(Localization.lang("Move external links to 'file' field"));
UpgradePdfPsToFileCleanup cleanupJob = new UpgradePdfPsToFileCleanup();
for (BibEntry entry : database.getEntries()) {
List<FieldChange> changes = cleanupJob.cleanup(entry);
for (FieldChange change : changes) {
ce.addEdit(new UndoableFieldChange(change));
}
}
ce.end();
return ce;
}
Aggregations