Verified Owner
Top Description Fields Constructors Methods
org.jabref.gui.integrity

public Class BibLogSettingsViewModel

extends AbstractViewModel
Class Inheritance
Imports
java.io.IOException, java.nio.file.Files, .Path, java.util.List, .Optional, javafx.beans.property.SimpleStringProperty, .StringProperty, javafx.collections.FXCollections, .ObservableList, org.jabref.gui.AbstractViewModel, org.jabref.logic.JabRefException, org.jabref.logic.biblog.BibLogPathResolver, .BibWarningToIntegrityMessageConverter, .BibtexLogParser, org.jabref.logic.integrity.IntegrityMessage, org.jabref.logic.l10n.Localization, org.jabref.model.biblog.BibWarning, org.jabref.model.database.BibDatabaseContext, org.jabref.model.metadata.MetaData

  1. Connects MetaData with the view.
  2. Wraps .blg warnings as IntegrityMessages.
  3. Supports file browsing and reset actions.

Field Summary

Modifier and TypeField and Description
private final Optional<Path>
private final ObservableList<IntegrityMessage>
private Optional<Path>
private final MetaData
private final StringProperty
private final String
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Optional<List<IntegrityMessage>>

Returns:

An Optional containing the list of integrity messages if the file exists and can be parsed, or an empty Optional if the file does not exist.
getBlgWarnings
(BibDatabaseContext
the current database context used to resolve citation keys in warnings.
databaseContext
)

Parses the .blg file (if it exists) into the observable list.

public ObservableList<IntegrityMessage>
public Path
public Optional<Path>
public StringProperty
public void
public void
public boolean

Field Detail

bibPathback to summary
private final Optional<Path> bibPath
blgWarningsback to summary
private final ObservableList<IntegrityMessage> blgWarnings
lastResolvedBlgPathback to summary
private Optional<Path> lastResolvedBlgPath
metaDataback to summary
private final MetaData metaData
pathback to summary
private final StringProperty path
userback to summary
private final String user
userManuallySelectedBlgFileback to summary
private boolean userManuallySelectedBlgFile

Constructor Detail

BibLogSettingsViewModelback to summary
public BibLogSettingsViewModel(MetaData metaData, Optional<Path> bibPath)

Method Detail

getBlgWarningsback to summary
public Optional<List<IntegrityMessage>> getBlgWarnings(BibDatabaseContext databaseContext) throws org.jabref.logic.JabRefException

Parses the .blg file (if it exists) into the observable list.

Parameters
databaseContext:BibDatabaseContext

the current database context used to resolve citation keys in warnings.

Returns:Optional<List<IntegrityMessage>>

An Optional containing the list of integrity messages if the file exists and can be parsed, or an empty Optional if the file does not exist.

Exceptions
JabRefException:
if the .blg file cannot be parsed or read
getBlgWarningsObservableback to summary
public ObservableList<IntegrityMessage> getBlgWarningsObservable()
getInitialDirectoryback to summary
public Path getInitialDirectory()
getResolvedBlgPathback to summary
public Optional<Path> getResolvedBlgPath()
pathPropertyback to summary
public StringProperty pathProperty()
resetBlgFilePathback to summary
public void resetBlgFilePath()
setBlgFilePathback to summary
public void setBlgFilePath(Path path)
wasBlgFileManuallySelectedback to summary
public boolean wasBlgFileManuallySelected()