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

public Class ManageStudyDefinitionViewModel

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.file.InvalidPathException, .Path, java.util.LinkedHashMap, .List, .Map, .Optional, .Set, java.util.stream.Collectors, javafx.beans.binding.Bindings, javafx.beans.property.Property, .SimpleStringProperty, .StringProperty, javafx.collections.FXCollections, .ObservableList, org.jabref.gui.DialogService, .WorkspacePreferences, org.jabref.gui.util.DirectoryDialogConfiguration, org.jabref.logic.crawler.StudyRepository, .StudyYamlParser, org.jabref.logic.exporter.SearchRxivExporter, org.jabref.logic.git.GitHandler, org.jabref.logic.git.preferences.GitPreferences, org.jabref.logic.importer.ImportFormatPreferences, .ImporterPreferences, .SearchBasedFetcher, .WebFetchers, org.jabref.logic.importer.fetcher.ACMPortalFetcher, .CompositeSearchBasedFetcher, .DBLPFetcher, .IEEE, .SpringerNatureWebFetcher, org.jabref.logic.l10n.Localization, org.jabref.logic.util.strings.StringUtil, org.jabref.model.study.Study, .StudyCatalog, .StudyQuery, org.eclipse.jgit.api.errors.GitAPIException, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

This class provides a model for managing study definitions. To visualize the model one can bind the properties to UI elements.

Field Summary

Modifier and TypeField and Description
private final ObservableList<String>
private final StringProperty
private final ObservableList<StudyCatalogItem>
private final StringProperty
private static final Set<String>
private final DialogService
private final SimpleStringProperty
private final GitPreferences
private static final Logger
private final ObservableList<StudyQuery>
private final StringProperty
private final StringProperty
private final ObservableList<String>
private final StringProperty
private final StringProperty
private final StringProperty
private final WorkspacePreferences

Constructor Summary

AccessConstructor and Description
public
ManageStudyDefinitionViewModel(ImportFormatPreferences importFormatPreferences, ImporterPreferences importerPreferences, @NonNull WorkspacePreferences workspacePreferences, @NonNull GitPreferences gitPreferences, @NonNull DialogService dialogService)

Constructor for a new study

public
ManageStudyDefinitionViewModel(@NonNull Study
The study to initialize the UI from
study
,
@NonNull Path
The path where the study resides
studyDirectory
,
ImportFormatPreferences importFormatPreferences, ImporterPreferences importerPreferences, @NonNull WorkspacePreferences workspacePreferences, @NonNull GitPreferences gitPreferences, @NonNull DialogService dialogService)

Constructor for an existing study

Method Summary

Modifier and TypeMethod and Description
public void
addAuthor(String author)

public void
public void
addResearchQuestion(String researchQuestion)

private void
public StringProperty
public Study
buildStudy()

Builds a Study from the current UI state without persisting it.

public StringProperty
public void
public void
public void
private String
public ObservableList<String>
public ObservableList<StudyCatalogItem>
public StringProperty
public ObservableList<StudyQuery>
public ObservableList<String>
public StringProperty
public void
private void
public StringProperty
public StringProperty
public SlrStudyAndDirectory
public void
setStudyDirectory(Optional<Path> studyRepositoryRoot)

public void
shareOnSearchRxiv(Path initialDirectory)

public Property<String>
public StringProperty
public void
public StringProperty
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authorsback to summary
private final ObservableList<String> authors
authorsValidationMessageback to summary
private final StringProperty authorsValidationMessage
catalogsback to summary
private final ObservableList<StudyCatalogItem> catalogs
catalogsValidationMessageback to summary
private final StringProperty catalogsValidationMessage
DEFAULT_SELECTIONback to summary
private static final Set<String> DEFAULT_SELECTION
dialogServiceback to summary
private final DialogService dialogService
directoryback to summary
private final SimpleStringProperty directory
gitPreferencesback to summary
private final GitPreferences gitPreferences
LOGGERback to summary
private static final Logger LOGGER
queriesback to summary
private final ObservableList<StudyQuery> queries
queriesValidationMessageback to summary
private final StringProperty queriesValidationMessage
questionsValidationMessageback to summary
private final StringProperty questionsValidationMessage
researchQuestionsback to summary
private final ObservableList<String> researchQuestions
titleback to summary
private final StringProperty title
titleValidationMessageback to summary
private final StringProperty titleValidationMessage
validationHeaderMessageback to summary
private final StringProperty validationHeaderMessage
workspacePreferencesback to summary
private final WorkspacePreferences workspacePreferences

Constructor Detail

ManageStudyDefinitionViewModelback to summary
public ManageStudyDefinitionViewModel(ImportFormatPreferences importFormatPreferences, ImporterPreferences importerPreferences, @NonNull WorkspacePreferences workspacePreferences, @NonNull GitPreferences gitPreferences, @NonNull DialogService dialogService)

Constructor for a new study

ManageStudyDefinitionViewModelback to summary
public ManageStudyDefinitionViewModel(@NonNull Study study, @NonNull Path studyDirectory, ImportFormatPreferences importFormatPreferences, ImporterPreferences importerPreferences, @NonNull WorkspacePreferences workspacePreferences, @NonNull GitPreferences gitPreferences, @NonNull DialogService dialogService)

Constructor for an existing study

Parameters
study:@NonNull Study

The study to initialize the UI from

studyDirectory:@NonNull Path

The path where the study resides

Method Detail

addAuthorback to summary
public void addAuthor(String author)
addQueryback to summary
public void addQuery(String query)
addResearchQuestionback to summary
public void addResearchQuestion(String researchQuestion)
applyNativeQueryOverridesback to summary
private void applyNativeQueryOverrides()
authorsValidationMessagePropertyback to summary
public StringProperty authorsValidationMessageProperty()
buildStudyback to summary
public Study buildStudy()

Builds a Study from the current UI state without persisting it.

catalogsValidationMessagePropertyback to summary
public StringProperty catalogsValidationMessageProperty()
deleteAuthorback to summary
public void deleteAuthor(String item)
deleteQueryback to summary
public void deleteQuery(StudyQuery item)
deleteQuestionback to summary
public void deleteQuestion(String item)
findNativeQueryForCatalogback to summary
private String findNativeQueryForCatalog(String catalogName)
getAuthorsback to summary
public ObservableList<String> getAuthors()
getCatalogsback to summary
public ObservableList<StudyCatalogItem> getCatalogs()
getDirectoryback to summary
public StringProperty getDirectory()
getQueriesback to summary
public ObservableList<StudyQuery> getQueries()
getResearchQuestionsback to summary
public ObservableList<String> getResearchQuestions()
getTitleback to summary
public StringProperty getTitle()
initializeSelectedCatalogsback to summary
public void initializeSelectedCatalogs()
initializeValidationBindingsback to summary
private void initializeValidationBindings()
queriesValidationMessagePropertyback to summary
public StringProperty queriesValidationMessageProperty()
questionsValidationMessagePropertyback to summary
public StringProperty questionsValidationMessageProperty()
saveStudyback to summary
public SlrStudyAndDirectory saveStudy()
setStudyDirectoryback to summary
public void setStudyDirectory(Optional<Path> studyRepositoryRoot)
shareOnSearchRxivback to summary
public void shareOnSearchRxiv(Path initialDirectory)
titlePropertyback to summary
public Property<String> titleProperty()
titleValidationMessagePropertyback to summary
public StringProperty titleValidationMessageProperty()
updateSelectedCatalogsback to summary
public void updateSelectedCatalogs()
validationHeaderMessagePropertyback to summary
public StringProperty validationHeaderMessageProperty()