Verified Owner
Top Fields Constructors Methods
org.jabref.gui.importer.fetcher

public Class LookupIdentifierAction<T extends Identifier>

extends SimpleCommand
Class Inheritance
Imports
java.util.List, .Optional, org.jabref.gui.DialogService, .StateManager, org.jabref.gui.actions.Action, .SimpleCommand, org.jabref.gui.util.BindingsHelper, .UiTaskExecutor, org.jabref.logic.importer.FetcherException, .IdFetcher, org.jabref.logic.l10n.Localization, org.jabref.logic.undo.UndoManager, .UndoSuspension, org.jabref.logic.util.BackgroundTask, .TaskExecutor, org.jabref.model.FieldChange, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, org.jabref.model.entry.identifier.Identifier, org.jabref.model.undo.CompoundEdit, .UndoableFieldChange, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final DialogService
private final org.jabref.logic.importer.IdFetcher<T>
private static final Logger
private final StateManager
private final TaskExecutor
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public
LookupIdentifierAction(org.jabref.logic.importer.IdFetcher<T> fetcher, StateManager stateManager, DialogService dialogService, TaskExecutor taskExecutor)

Method Summary

Modifier and TypeMethod and Description
public void
public Action
private boolean

Returns:

whether the entry gained an identifier
lookUpAndRecord
(BibEntry bibEntry, CompoundEdit compoundEdit)

Looks the identifier up for one entry and writes it, unless the entry already has one.

private String
lookupIdentifiers(UndoManager undoManager, List<BibEntry> bibEntries)

private void
lookUpIn(BibDatabaseContext databaseContext)

The journal and the entries are taken here rather than when the lookup runs: the work belongs to the library the user started on, the state manager replaces its selection when they switch away from it, and asking for a journal after that library closed would create one nothing can reach.

private void
notifyProgress(int count, String totalCount, int foundCount)

Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

dialogServiceback to summary
private final DialogService dialogService
fetcherback to summary
private final org.jabref.logic.importer.IdFetcher<T> fetcher
LOGGERback to summary
private static final Logger LOGGER
stateManagerback to summary
private final StateManager stateManager
taskExecutorback to summary
private final TaskExecutor taskExecutor

Constructor Detail

LookupIdentifierActionback to summary
public LookupIdentifierAction(org.jabref.logic.importer.IdFetcher<T> fetcher, StateManager stateManager, DialogService dialogService, TaskExecutor taskExecutor)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
getActionback to summary
public Action getAction()
lookUpAndRecordback to summary
private boolean lookUpAndRecord(BibEntry bibEntry, CompoundEdit compoundEdit)

Looks the identifier up for one entry and writes it, unless the entry already has one.

Returns:boolean

whether the entry gained an identifier

lookupIdentifiersback to summary
private String lookupIdentifiers(UndoManager undoManager, List<BibEntry> bibEntries)
lookUpInback to summary
private void lookUpIn(BibDatabaseContext databaseContext)

The journal and the entries are taken here rather than when the lookup runs: the work belongs to the library the user started on, the state manager replaces its selection when they switch away from it, and asking for a journal after that library closed would create one nothing can reach.

notifyProgressback to summary
private void notifyProgress(int count, String totalCount, int foundCount)