Top Fields Constructors Methods
org.jabref.gui.fieldeditors.identifier

public abstract Class BaseIdentifierEditorViewModel<T extends Identifier>

extends AbstractEditorViewModel
Class Inheritance
Known Direct Subclasses
org.jabref.gui.fieldeditors.identifier.DoiIdentifierEditorViewModel, org.jabref.gui.fieldeditors.identifier.EprintIdentifierEditorViewModel, org.jabref.gui.fieldeditors.identifier.ISBNIdentifierEditorViewModel
Imports
java.io.IOException, java.util.Optional, javax.swing.undo.UndoManager, javafx.beans.property.BooleanProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleObjectProperty, org.jabref.gui.DialogService, org.jabref.gui.autocompleter.SuggestionProvider, org.jabref.gui.desktop.JabRefDesktop, org.jabref.gui.fieldeditors.AbstractEditorViewModel, org.jabref.gui.util.TaskExecutor, org.jabref.logic.importer.FetcherClientException, .FetcherServerException, .IdFetcher, org.jabref.logic.importer.util.IdentifierParser, org.jabref.logic.integrity.FieldCheckers, org.jabref.logic.l10n.Localization, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.Field, org.jabref.model.entry.identifier.Identifier, org.jabref.preferences.PreferencesService, com.tobiasdiez.easybind.EasyBind, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
protected final BooleanProperty
protected final BooleanProperty
protected DialogService
protected final ObjectProperty<Optional<T>>
protected final BooleanProperty
protected IdentifierParser
protected BooleanProperty
private static final Logger
protected PreferencesService
protected TaskExecutor
Inherited from org.jabref.gui.fieldeditors.AbstractEditorViewModel:
entryfieldtext

Constructor Summary

AccessConstructor and Description
public
BaseIdentifierEditorViewModel(Field field, SuggestionProvider<?> suggestionProvider, FieldCheckers fieldCheckers, DialogService dialogService, TaskExecutor taskExecutor, PreferencesService preferences, UndoManager undoManager)

Method Summary

Modifier and TypeMethod and Description
public void
public BooleanProperty
public BooleanProperty
protected final void
configure(boolean canFetchBibliographyInformationById, boolean canLookupIdentifier)

Since it's not possible to perform the same actions on all identifiers, specific implementations can call the configure method to tell the actions they can perform and the actions they can't.

public void
public boolean
public boolean
public boolean
public boolean
protected void
public BooleanProperty
public BooleanProperty
public void
protected Optional<T>
Inherited from org.jabref.gui.fieldeditors.AbstractEditorViewModel:
completegetFieldValidatortextProperty

Field Detail

canFetchBibliographyInformationByIdback to summary
protected final BooleanProperty canFetchBibliographyInformationById
canLookupIdentifierback to summary
protected final BooleanProperty canLookupIdentifier
dialogServiceback to summary
protected DialogService dialogService
identifierback to summary
protected final ObjectProperty<Optional<T>> identifier
identifierLookupInProgressback to summary
protected final BooleanProperty identifierLookupInProgress
identifierParserback to summary
protected IdentifierParser identifierParser
isInvalidIdentifierback to summary
protected BooleanProperty isInvalidIdentifier
LOGGERback to summary
private static final Logger LOGGER
preferencesback to summary
protected PreferencesService preferences
taskExecutorback to summary
protected TaskExecutor taskExecutor

Constructor Detail

BaseIdentifierEditorViewModelback to summary
public BaseIdentifierEditorViewModel(Field field, SuggestionProvider<?> suggestionProvider, FieldCheckers fieldCheckers, DialogService dialogService, TaskExecutor taskExecutor, PreferencesService preferences, UndoManager undoManager)

Method Detail

bindToEntryback to summary
public void bindToEntry(BibEntry entry)

Overrides org.jabref.gui.fieldeditors.AbstractEditorViewModel.bindToEntry.

Annotations
@Override
canFetchBibliographyInformationByIdPropertyback to summary
public BooleanProperty canFetchBibliographyInformationByIdProperty()
canLookupIdentifierPropertyback to summary
public BooleanProperty canLookupIdentifierProperty()
configureback to summary
protected final void configure(boolean canFetchBibliographyInformationById, boolean canLookupIdentifier)

Since it's not possible to perform the same actions on all identifiers, specific implementations can call the configure method to tell the actions they can perform and the actions they can't. Based on this configuration, the view will enable/disable or show/hide certain UI elements for certain identifier editors.

Note

This method MUST be called by all the implementation view models in their principal constructor

fetchBibliographyInformationback to summary
public void fetchBibliographyInformation(BibEntry bibEntry)
getCanFetchBibliographyInformationByIdback to summary
public boolean getCanFetchBibliographyInformationById()
getCanLookupIdentifierback to summary
public boolean getCanLookupIdentifier()
getIdentifierLookupInProgressback to summary
public boolean getIdentifierLookupInProgress()
getIsInvalidIdentifierback to summary
public boolean getIsInvalidIdentifier()
handleIdentifierFetchingErrorback to summary
protected void handleIdentifierFetchingError(Exception exception, IdFetcher<T> fetcher)
identifierLookupInProgressPropertyback to summary
public BooleanProperty identifierLookupInProgressProperty()
isInvalidIdentifierPropertyback to summary
public BooleanProperty isInvalidIdentifierProperty()
lookupIdentifierback to summary
public void lookupIdentifier(BibEntry bibEntry)
updateIdentifierback to summary
protected Optional<T> updateIdentifier()