Top Description Fields Constructors Methods
org.jabref.gui.entryeditor.citationrelationtab

public Class CitationRelationsTab

extends EntryEditorTab
Class Inheritance
Imports
java.io.IOException, java.net.URI, java.util.Arrays, .List, javax.swing.undo.UndoManager, javafx.beans.binding.Bindings, .BooleanBinding, javafx.collections.FXCollections, .ObservableList, javafx.css.PseudoClass, javafx.geometry.Pos, javafx.scene.Node, javafx.scene.control.Button, .Label, .ProgressIndicator, .SplitPane, .ToggleButton, .Tooltip, javafx.scene.layout.AnchorPane, .HBox, .Priority, .VBox, org.jabref.gui.DialogService, .LibraryTab, .StateManager, org.jabref.gui.desktop.JabRefDesktop, org.jabref.gui.entryeditor.EntryEditorTab, org.jabref.gui.entryeditor.citationrelationtab.semanticscholar.CitationFetcher, .SemanticScholarFetcher, org.jabref.gui.icon.IconTheme, org.jabref.gui.util.BackgroundTask, .NoSelectionModel, .TaskExecutor, .ViewModelListCellFactory, org.jabref.logic.database.DuplicateCheck, org.jabref.logic.l10n.Localization, org.jabref.model.database.BibDatabaseContext, .BibDatabaseModeDetection, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.jabref.model.entry.field.StandardField, org.jabref.model.entry.identifier.DOI, org.jabref.model.strings.StringUtil, org.jabref.model.util.FileUpdateMonitor, org.jabref.preferences.PreferencesService, com.tobiasdiez.easybind.EasyBind, org.controlsfx.control.CheckListView, org.slf4j.Logger, .LoggerFactory

GUI for tab displaying an articles citation relations in two lists based on the currently selected BibEntry

Field Summary

Modifier and TypeField and Description
private final BibEntryRelationsRepository
private final CitationsRelationsTabViewModel
private static BackgroundTask<List<BibEntry>>
private static BackgroundTask<List<BibEntry>>
private final BibDatabaseContext
private final DialogService
private final DuplicateCheck
private final LibraryTab
private static final Logger
public static final String
private final PreferencesService
private final TaskExecutor
Inherited from org.jabref.gui.entryeditor.EntryEditorTab:
currentEntry

Constructor Summary

AccessConstructor and Description
public
CitationRelationsTab(DialogService dialogService, BibDatabaseContext databaseContext, UndoManager undoManager, StateManager stateManager, FileUpdateMonitor fileUpdateMonitor, PreferencesService preferencesService, LibraryTab libraryTab, TaskExecutor taskExecutor)

Method Summary

Modifier and TypeMethod and Description
protected void
bindToEntry(BibEntry entry)

Implements abstract org.jabref.gui.entryeditor.EntryEditorTab.bindToEntry.

Updates the view with the contents of the given entry.

private SplitPane

Returns:

SplitPane to display
getPaneAndStartSearch
(BibEntry
BibEntry which is currently selected in JabRef Database
entry
)

Method to create main SplitPane holding all lists, buttons and labels for tab and starts search

private void
hideNodes(Node... nodes)

private void
importEntries(List<CitationRelationItem>
entries to import
entriesToImport
,
CitationFetcher.SearchType searchType, BibEntry existingEntry)

Function to import selected entries to the database.

private void
onSearchForRelationsSucceed(BibEntry entry, org.controlsfx.control.CheckListView<CitationRelationItem> listView, Button abortButton, Button refreshButton, CitationFetcher.SearchType searchType, Button importButton, ProgressIndicator progress, List<BibEntry> fetchedList, ObservableList<CitationRelationItem> observableList)

private void
prepareToSearchForRelations(Button abortButton, Button refreshButton, Button importButton, ProgressIndicator progress, BackgroundTask<List<BibEntry>> task)

private void
searchForRelations(BibEntry
BibEntry currently selected in Jabref Database
entry
,
org.controlsfx.control.CheckListView<CitationRelationItem>
ListView to use
listView
,
Button
Button to stop the search
abortButton
,
Button
refresh Button to use
refreshButton
,
CitationFetcher.SearchType
type of search (CITING / CITEDBY)
searchType
,
Button importButton, ProgressIndicator progress, boolean shouldRefresh)

Method to start search for relations and display them in the associated ListView

public boolean

Returns:

whether tab should be shown
shouldShow
(BibEntry
Currently selected BibEntry
entry
)

Implements abstract org.jabref.gui.entryeditor.EntryEditorTab.shouldShow.

Determines if tab should be shown according to preferences

private void
showNodes(Node... nodes)

private void
styleFetchedListView(org.controlsfx.control.CheckListView<CitationRelationItem>
CheckListView to style
listView
)

Styles a given CheckListView to display BibEntries either with a hyperlink or an add button

private void
styleLabel(Label
label to style
label
)

Method to style heading labels

private void
styleTopBarNode(Node
node to style
node
,
double offset)

Method to style refresh buttons

Inherited from org.jabref.gui.entryeditor.EntryEditorTab:
handleFocusnotifyAboutFocus

Field Detail

bibEntryRelationsRepositoryback to summary
private final BibEntryRelationsRepository bibEntryRelationsRepository
citationsRelationsTabViewModelback to summary
private final CitationsRelationsTabViewModel citationsRelationsTabViewModel
citedByTaskback to summary
private static BackgroundTask<List<BibEntry>> citedByTask
citingTaskback to summary
private static BackgroundTask<List<BibEntry>> citingTask
databaseContextback to summary
private final BibDatabaseContext databaseContext
dialogServiceback to summary
private final DialogService dialogService
duplicateCheckback to summary
private final DuplicateCheck duplicateCheck
libraryTabback to summary
private final LibraryTab libraryTab
LOGGERback to summary
private static final Logger LOGGER
NAMEback to summary
public static final String NAME
preferencesServiceback to summary
private final PreferencesService preferencesService
taskExecutorback to summary
private final TaskExecutor taskExecutor

Constructor Detail

CitationRelationsTabback to summary
public CitationRelationsTab(DialogService dialogService, BibDatabaseContext databaseContext, UndoManager undoManager, StateManager stateManager, FileUpdateMonitor fileUpdateMonitor, PreferencesService preferencesService, LibraryTab libraryTab, TaskExecutor taskExecutor)

Method Detail

bindToEntryback to summary
protected void bindToEntry(BibEntry entry)

Implements abstract org.jabref.gui.entryeditor.EntryEditorTab.bindToEntry.

Doc from org.jabref.gui.entryeditor.EntryEditorTab.bindToEntry.

Updates the view with the contents of the given entry.

Annotations
@Override
getPaneAndStartSearchback to summary
private SplitPane getPaneAndStartSearch(BibEntry entry)

Method to create main SplitPane holding all lists, buttons and labels for tab and starts search

Parameters
entry:BibEntry

BibEntry which is currently selected in JabRef Database

Returns:SplitPane

SplitPane to display

hideNodesback to summary
private void hideNodes(Node... nodes)
importEntriesback to summary
private void importEntries(List<CitationRelationItem> entriesToImport, CitationFetcher.SearchType searchType, BibEntry existingEntry)

Function to import selected entries to the database. Also writes the entries to import to the CITING/CITED field

Parameters
entriesToImport:List<CitationRelationItem>

entries to import

onSearchForRelationsSucceedback to summary
private void onSearchForRelationsSucceed(BibEntry entry, org.controlsfx.control.CheckListView<CitationRelationItem> listView, Button abortButton, Button refreshButton, CitationFetcher.SearchType searchType, Button importButton, ProgressIndicator progress, List<BibEntry> fetchedList, ObservableList<CitationRelationItem> observableList)
prepareToSearchForRelationsback to summary
private void prepareToSearchForRelations(Button abortButton, Button refreshButton, Button importButton, ProgressIndicator progress, BackgroundTask<List<BibEntry>> task)
searchForRelationsback to summary
private void searchForRelations(BibEntry entry, org.controlsfx.control.CheckListView<CitationRelationItem> listView, Button abortButton, Button refreshButton, CitationFetcher.SearchType searchType, Button importButton, ProgressIndicator progress, boolean shouldRefresh)

Method to start search for relations and display them in the associated ListView

Parameters
entry:BibEntry

BibEntry currently selected in Jabref Database

listView:org.controlsfx.control.CheckListView<CitationRelationItem>

ListView to use

abortButton:Button

Button to stop the search

refreshButton:Button

refresh Button to use

searchType:CitationFetcher.SearchType

type of search (CITING / CITEDBY)

shouldShowback to summary
public boolean shouldShow(BibEntry entry)

Implements abstract org.jabref.gui.entryeditor.EntryEditorTab.shouldShow.

Determines if tab should be shown according to preferences

Parameters
entry:BibEntry

Currently selected BibEntry

Returns:boolean

whether tab should be shown

Annotations
@Override
showNodesback to summary
private void showNodes(Node... nodes)
styleFetchedListViewback to summary
private void styleFetchedListView(org.controlsfx.control.CheckListView<CitationRelationItem> listView)

Styles a given CheckListView to display BibEntries either with a hyperlink or an add button

Parameters
listView:org.controlsfx.control.CheckListView<CitationRelationItem>

CheckListView to style

styleLabelback to summary
private void styleLabel(Label label)

Method to style heading labels

Parameters
label:Label

label to style

styleTopBarNodeback to summary
private void styleTopBarNode(Node node, double offset)

Method to style refresh buttons

Parameters
node:Node

node to style