diff --git a/CHANGELOG.md b/CHANGELOG.md
index 912e08ad5fc..ce5d982fcbf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,6 +61,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- In case the library contains empty entries, they are not written to disk. [#8645](https://github.com/JabRef/jabref/issues/8645)
- The formatter `remove_unicode_ligatures` is now called `replace_unicode_ligatures`. [#9890](https://github.com/JabRef/jabref/pull/9890)
- We improved the error message when no terminal was found [#9607](https://github.com/JabRef/jabref/issues/9607)
+- We changed database to catalog in `org.jabref.gui.slr` and `org.jabref.logic.crawler` [#9951](https://github.com/JabRef/jabref/pull/9951)
### Fixed
diff --git a/src/main/java/org/jabref/gui/slr/ManageStudyDefinition.fxml b/src/main/java/org/jabref/gui/slr/ManageStudyDefinition.fxml
index 6aef2a901e6..8fb2452c141 100644
--- a/src/main/java/org/jabref/gui/slr/ManageStudyDefinition.fxml
+++ b/src/main/java/org/jabref/gui/slr/ManageStudyDefinition.fxml
@@ -217,12 +217,12 @@
diff --git a/src/main/java/org/jabref/gui/slr/ManageStudyDefinitionView.java b/src/main/java/org/jabref/gui/slr/ManageStudyDefinitionView.java
index 03eba518a39..912d42c6645 100644
--- a/src/main/java/org/jabref/gui/slr/ManageStudyDefinitionView.java
+++ b/src/main/java/org/jabref/gui/slr/ManageStudyDefinitionView.java
@@ -66,9 +66,9 @@ public class ManageStudyDefinitionView extends BaseDialog
@FXML private TableColumn queriesColumn;
@FXML private TableColumn queriesActionColumn;
- @FXML private TableView databaseTable;
- @FXML private TableColumn databaseEnabledColumn;
- @FXML private TableColumn databaseColumn;
+ @FXML private TableView catalogTable;
+ @FXML private TableColumn catalogEnabledColumn;
+ @FXML private TableColumn catalogColumn;
@Inject private DialogService dialogService;
@Inject private PreferencesService prefs;
@@ -132,7 +132,7 @@ private void setupSaveSurveyButton(boolean isEdit) {
saveSurveyButton.disableProperty().bind(Bindings.or(Bindings.or(Bindings.or(Bindings.or(
Bindings.isEmpty(viewModel.getQueries()),
- Bindings.isEmpty(viewModel.getDatabases())),
+ Bindings.isEmpty(viewModel.getCatalogs())),
Bindings.isEmpty(viewModel.getAuthors())),
viewModel.getTitle().isEmpty()),
viewModel.getDirectory().isEmpty()));
@@ -166,14 +166,14 @@ private void initialize() {
selectStudyDirectory.setDisable(true);
}
- // Listen whether any databases are removed from selection -> Add back to the database selector
+ // Listen whether any catalogs are removed from selection -> Add back to the catalog selector
studyTitle.textProperty().bindBidirectional(viewModel.titleProperty());
studyDirectory.textProperty().bindBidirectional(viewModel.getDirectory());
initAuthorTab();
initQuestionsTab();
initQueriesTab();
- initDatabasesTab();
+ initCatalogsTab();
}
private void initAuthorTab() {
@@ -202,27 +202,27 @@ private void initQueriesTab() {
.toString()));
}
- private void initDatabasesTab() {
- new ViewModelTableRowFactory()
+ private void initCatalogsTab() {
+ new ViewModelTableRowFactory()
.withOnMouseClickedEvent((entry, event) -> {
if (event.getButton() == MouseButton.PRIMARY) {
entry.setEnabled(!entry.isEnabled());
}
})
- .install(databaseTable);
+ .install(catalogTable);
- databaseColumn.setReorderable(false);
- databaseColumn.setCellFactory(TextFieldTableCell.forTableColumn());
+ catalogColumn.setReorderable(false);
+ catalogColumn.setCellFactory(TextFieldTableCell.forTableColumn());
- databaseEnabledColumn.setResizable(false);
- databaseEnabledColumn.setReorderable(false);
- databaseEnabledColumn.setCellFactory(CheckBoxTableCell.forTableColumn(databaseEnabledColumn));
- databaseEnabledColumn.setCellValueFactory(param -> param.getValue().enabledProperty());
+ catalogEnabledColumn.setResizable(false);
+ catalogEnabledColumn.setReorderable(false);
+ catalogEnabledColumn.setCellFactory(CheckBoxTableCell.forTableColumn(catalogEnabledColumn));
+ catalogEnabledColumn.setCellValueFactory(param -> param.getValue().enabledProperty());
- databaseColumn.setEditable(false);
- databaseColumn.setCellValueFactory(param -> param.getValue().nameProperty());
+ catalogColumn.setEditable(false);
+ catalogColumn.setCellValueFactory(param -> param.getValue().nameProperty());
- databaseTable.setItems(viewModel.getDatabases());
+ catalogTable.setItems(viewModel.getCatalogs());
}
private void setupCommonPropertiesForTables(Node addControl,
diff --git a/src/main/java/org/jabref/gui/slr/ManageStudyDefinitionViewModel.java b/src/main/java/org/jabref/gui/slr/ManageStudyDefinitionViewModel.java
index bc013c2e7f3..54267048793 100644
--- a/src/main/java/org/jabref/gui/slr/ManageStudyDefinitionViewModel.java
+++ b/src/main/java/org/jabref/gui/slr/ManageStudyDefinitionViewModel.java
@@ -53,7 +53,7 @@ public class ManageStudyDefinitionViewModel {
private final ObservableList authors = FXCollections.observableArrayList();
private final ObservableList researchQuestions = FXCollections.observableArrayList();
private final ObservableList queries = FXCollections.observableArrayList();
- private final ObservableList databases = FXCollections.observableArrayList();
+ private final ObservableList databases = FXCollections.observableArrayList();
// Hold the complement of databases for the selector
private final SimpleStringProperty directory = new SimpleStringProperty();
@@ -74,7 +74,7 @@ public ManageStudyDefinitionViewModel(ImportFormatPreferences importFormatPrefer
.filter(name -> !name.equals(CompositeSearchBasedFetcher.FETCHER_NAME))
.map(name -> {
boolean enabled = DEFAULT_SELECTION.contains(name);
- return new StudyDatabaseItem(name, enabled);
+ return new StudyCatalogItem(name, enabled);
})
.toList());
this.dialogService = Objects.requireNonNull(dialogService);
@@ -105,7 +105,7 @@ public ManageStudyDefinitionViewModel(Study study,
.filter(name -> !name.equals(CompositeSearchBasedFetcher.FETCHER_NAME))
.map(name -> {
boolean enabled = studyDatabases.contains(new StudyDatabase(name, true));
- return new StudyDatabaseItem(name, enabled);
+ return new StudyCatalogItem(name, enabled);
})
.toList());
@@ -133,7 +133,7 @@ public ObservableList getQueries() {
return queries;
}
- public ObservableList getDatabases() {
+ public ObservableList getCatalogs() {
return databases;
}
diff --git a/src/main/java/org/jabref/gui/slr/StudyDatabaseItem.java b/src/main/java/org/jabref/gui/slr/StudyCatalogItem.java
similarity index 89%
rename from src/main/java/org/jabref/gui/slr/StudyDatabaseItem.java
rename to src/main/java/org/jabref/gui/slr/StudyCatalogItem.java
index bc2cb7ac859..b379d373bf9 100644
--- a/src/main/java/org/jabref/gui/slr/StudyDatabaseItem.java
+++ b/src/main/java/org/jabref/gui/slr/StudyCatalogItem.java
@@ -12,11 +12,11 @@
/**
* View representation of {@link StudyDatabase}
*/
-public class StudyDatabaseItem {
+public class StudyCatalogItem {
private final StringProperty name;
private final BooleanProperty enabled;
- public StudyDatabaseItem(String name, boolean enabled) {
+ public StudyCatalogItem(String name, boolean enabled) {
this.name = new SimpleStringProperty(Objects.requireNonNull(name));
this.enabled = new SimpleBooleanProperty(enabled);
}
@@ -47,7 +47,7 @@ public BooleanProperty enabledProperty() {
@Override
public String toString() {
- return "StudyDatabaseItem{" +
+ return "StudyCatalogItem{" +
"name=" + name.get() +
", enabled=" + enabled.get() +
'}';
@@ -61,7 +61,7 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- StudyDatabaseItem that = (StudyDatabaseItem) o;
+ StudyCatalogItem that = (StudyCatalogItem) o;
return Objects.equals(getName(), that.getName()) && Objects.equals(isEnabled(), that.isEnabled());
}
diff --git a/src/main/java/org/jabref/logic/crawler/Crawler.java b/src/main/java/org/jabref/logic/crawler/Crawler.java
index 990c162e22a..16eaf006b57 100644
--- a/src/main/java/org/jabref/logic/crawler/Crawler.java
+++ b/src/main/java/org/jabref/logic/crawler/Crawler.java
@@ -43,12 +43,12 @@ public Crawler(Path studyRepositoryRoot,
preferencesService,
fileUpdateMonitor,
bibEntryTypesManager);
- StudyDatabaseToFetcherConverter studyDatabaseToFetcherConverter = new StudyDatabaseToFetcherConverter(
+ StudyCatalogToFetcherConverter studyCatalogToFetcherConverter = new StudyCatalogToFetcherConverter(
studyRepository.getActiveLibraryEntries(),
preferencesService.getImportFormatPreferences(),
preferencesService.getImporterPreferences());
this.studyFetcher = new StudyFetcher(
- studyDatabaseToFetcherConverter.getActiveFetchers(),
+ studyCatalogToFetcherConverter.getActiveFetchers(),
studyRepository.getSearchQueryStrings());
}
diff --git a/src/main/java/org/jabref/logic/crawler/StudyDatabaseToFetcherConverter.java b/src/main/java/org/jabref/logic/crawler/StudyCatalogToFetcherConverter.java
similarity index 90%
rename from src/main/java/org/jabref/logic/crawler/StudyDatabaseToFetcherConverter.java
rename to src/main/java/org/jabref/logic/crawler/StudyCatalogToFetcherConverter.java
index 70eef519aa3..b0f0c26be4d 100644
--- a/src/main/java/org/jabref/logic/crawler/StudyDatabaseToFetcherConverter.java
+++ b/src/main/java/org/jabref/logic/crawler/StudyCatalogToFetcherConverter.java
@@ -14,14 +14,14 @@
/**
* Converts library entries from the given study into their corresponding fetchers.
*/
-class StudyDatabaseToFetcherConverter {
+class StudyCatalogToFetcherConverter {
private final List libraryEntries;
private final ImportFormatPreferences importFormatPreferences;
private final ImporterPreferences importerPreferences;
- public StudyDatabaseToFetcherConverter(List libraryEntries,
- ImportFormatPreferences importFormatPreferences,
- ImporterPreferences importerPreferences) {
+ public StudyCatalogToFetcherConverter(List libraryEntries,
+ ImportFormatPreferences importFormatPreferences,
+ ImporterPreferences importerPreferences) {
this.libraryEntries = libraryEntries;
this.importFormatPreferences = importFormatPreferences;
this.importerPreferences = importerPreferences;
diff --git a/src/main/java/org/jabref/logic/crawler/StudyFetcher.java b/src/main/java/org/jabref/logic/crawler/StudyFetcher.java
index dde753b5381..9c684d8aeb9 100644
--- a/src/main/java/org/jabref/logic/crawler/StudyFetcher.java
+++ b/src/main/java/org/jabref/logic/crawler/StudyFetcher.java
@@ -48,7 +48,7 @@ private QueryResult getQueryResult(String searchQuery) {
}
/**
- * Queries all Databases on the given searchQuery.
+ * Queries all Catalogs on the given searchQuery.
*
* @param searchQuery The query the search is performed for.
* @return Mapping of each fetcher by name and all their retrieved publications as a BibDatabase
diff --git a/src/main/java/org/jabref/logic/crawler/StudyRepository.java b/src/main/java/org/jabref/logic/crawler/StudyRepository.java
index b584b57f15d..eac8c5d11c9 100644
--- a/src/main/java/org/jabref/logic/crawler/StudyRepository.java
+++ b/src/main/java/org/jabref/logic/crawler/StudyRepository.java
@@ -279,7 +279,7 @@ private void updateWorkAndSearchBranch() throws IOException, GitAPIException {
*/
private void setUpRepositoryStructureForQueriesAndFetchers() throws IOException {
// Cannot use stream here since IOException has to be thrown
- StudyDatabaseToFetcherConverter converter = new StudyDatabaseToFetcherConverter(
+ StudyCatalogToFetcherConverter converter = new StudyCatalogToFetcherConverter(
this.getActiveLibraryEntries(),
preferencesService.getImportFormatPreferences(),
preferencesService.getImporterPreferences());
diff --git a/src/main/java/org/jabref/model/study/StudyDatabase.java b/src/main/java/org/jabref/model/study/StudyDatabase.java
index 375b59fb57c..c35cafdc1b1 100644
--- a/src/main/java/org/jabref/model/study/StudyDatabase.java
+++ b/src/main/java/org/jabref/model/study/StudyDatabase.java
@@ -1,7 +1,9 @@
package org.jabref.model.study;
+import org.jabref.gui.slr.StudyCatalogItem;
+
/**
- * data model for the view {@link org.jabref.gui.slr.StudyDatabaseItem}
+ * data model for the view {@link StudyCatalogItem}
*/
public class StudyDatabase {
private String name;
diff --git a/src/main/resources/build.properties b/src/main/resources/build.properties
index efe52c53aad..dac72376767 100644
--- a/src/main/resources/build.properties
+++ b/src/main/resources/build.properties
@@ -6,3 +6,4 @@ springerNatureAPIKey=${springerNatureAPIKey}
astrophysicsDataSystemAPIKey=${astrophysicsDataSystemAPIKey}
ieeeAPIKey=${ieeeAPIKey}
biodiversityHeritageApiKey=${biodiversityHeritageApiKey}
+Catalogs=Create property
diff --git a/src/test/java/org/jabref/gui/slr/ManageStudyDefinitionViewModelTest.java b/src/test/java/org/jabref/gui/slr/ManageStudyDefinitionViewModelTest.java
index cb0438ce4c4..73e0c4509a4 100644
--- a/src/test/java/org/jabref/gui/slr/ManageStudyDefinitionViewModelTest.java
+++ b/src/test/java/org/jabref/gui/slr/ManageStudyDefinitionViewModelTest.java
@@ -34,26 +34,26 @@ void setUp() {
public void emptyStudyConstructorFillsDatabasesCorrectly() {
ManageStudyDefinitionViewModel manageStudyDefinitionViewModel = new ManageStudyDefinitionViewModel(importFormatPreferences, importerPreferences, dialogService);
assertEquals(List.of(
- new StudyDatabaseItem("ACM Portal", true),
- new StudyDatabaseItem("ArXiv", false),
- new StudyDatabaseItem("Bibliotheksverbund Bayern (Experimental)", false),
- new StudyDatabaseItem("Biodiversity Heritage", false),
- new StudyDatabaseItem("Collection of Computer Science Bibliographies", false),
- new StudyDatabaseItem("Crossref", false),
- new StudyDatabaseItem("DBLP", true),
- new StudyDatabaseItem("DOAB", false),
- new StudyDatabaseItem("DOAJ", false),
- new StudyDatabaseItem("GVK", false),
- new StudyDatabaseItem("IEEEXplore", true),
- new StudyDatabaseItem("INSPIRE", false),
- new StudyDatabaseItem("MathSciNet", false),
- new StudyDatabaseItem("Medline/PubMed", false),
- new StudyDatabaseItem("ResearchGate", false),
- new StudyDatabaseItem("SAO/NASA ADS", false),
- new StudyDatabaseItem("SemanticScholar", false),
- new StudyDatabaseItem("Springer", true),
- new StudyDatabaseItem("zbMATH", false)
- ), manageStudyDefinitionViewModel.getDatabases());
+ new StudyCatalogItem("ACM Portal", true),
+ new StudyCatalogItem("ArXiv", false),
+ new StudyCatalogItem("Bibliotheksverbund Bayern (Experimental)", false),
+ new StudyCatalogItem("Biodiversity Heritage", false),
+ new StudyCatalogItem("Collection of Computer Science Bibliographies", false),
+ new StudyCatalogItem("Crossref", false),
+ new StudyCatalogItem("DBLP", true),
+ new StudyCatalogItem("DOAB", false),
+ new StudyCatalogItem("DOAJ", false),
+ new StudyCatalogItem("GVK", false),
+ new StudyCatalogItem("IEEEXplore", true),
+ new StudyCatalogItem("INSPIRE", false),
+ new StudyCatalogItem("MathSciNet", false),
+ new StudyCatalogItem("Medline/PubMed", false),
+ new StudyCatalogItem("ResearchGate", false),
+ new StudyCatalogItem("SAO/NASA ADS", false),
+ new StudyCatalogItem("SemanticScholar", false),
+ new StudyCatalogItem("Springer", true),
+ new StudyCatalogItem("zbMATH", false)
+ ), manageStudyDefinitionViewModel.getCatalogs());
}
@Test
@@ -74,25 +74,25 @@ public void studyConstructorFillsDatabasesCorrectly(@TempDir Path tempDir) {
importerPreferences,
dialogService);
assertEquals(List.of(
- new StudyDatabaseItem("ACM Portal", true),
- new StudyDatabaseItem("ArXiv", false),
- new StudyDatabaseItem("Bibliotheksverbund Bayern (Experimental)", false),
- new StudyDatabaseItem("Biodiversity Heritage", false),
- new StudyDatabaseItem("Collection of Computer Science Bibliographies", false),
- new StudyDatabaseItem("Crossref", false),
- new StudyDatabaseItem("DBLP", false),
- new StudyDatabaseItem("DOAB", false),
- new StudyDatabaseItem("DOAJ", false),
- new StudyDatabaseItem("GVK", false),
- new StudyDatabaseItem("IEEEXplore", false),
- new StudyDatabaseItem("INSPIRE", false),
- new StudyDatabaseItem("MathSciNet", false),
- new StudyDatabaseItem("Medline/PubMed", false),
- new StudyDatabaseItem("ResearchGate", false),
- new StudyDatabaseItem("SAO/NASA ADS", false),
- new StudyDatabaseItem("SemanticScholar", false),
- new StudyDatabaseItem("Springer", false),
- new StudyDatabaseItem("zbMATH", false)
- ), manageStudyDefinitionViewModel.getDatabases());
+ new StudyCatalogItem("ACM Portal", true),
+ new StudyCatalogItem("ArXiv", false),
+ new StudyCatalogItem("Bibliotheksverbund Bayern (Experimental)", false),
+ new StudyCatalogItem("Biodiversity Heritage", false),
+ new StudyCatalogItem("Collection of Computer Science Bibliographies", false),
+ new StudyCatalogItem("Crossref", false),
+ new StudyCatalogItem("DBLP", false),
+ new StudyCatalogItem("DOAB", false),
+ new StudyCatalogItem("DOAJ", false),
+ new StudyCatalogItem("GVK", false),
+ new StudyCatalogItem("IEEEXplore", false),
+ new StudyCatalogItem("INSPIRE", false),
+ new StudyCatalogItem("MathSciNet", false),
+ new StudyCatalogItem("Medline/PubMed", false),
+ new StudyCatalogItem("ResearchGate", false),
+ new StudyCatalogItem("SAO/NASA ADS", false),
+ new StudyCatalogItem("SemanticScholar", false),
+ new StudyCatalogItem("Springer", false),
+ new StudyCatalogItem("zbMATH", false)
+ ), manageStudyDefinitionViewModel.getCatalogs());
}
}
diff --git a/src/test/java/org/jabref/logic/crawler/StudyDatabaseToFetcherConverterTest.java b/src/test/java/org/jabref/logic/crawler/StudyCatalogToFetcherConverterTest.java
similarity index 95%
rename from src/test/java/org/jabref/logic/crawler/StudyDatabaseToFetcherConverterTest.java
rename to src/test/java/org/jabref/logic/crawler/StudyCatalogToFetcherConverterTest.java
index af16dc69b03..9b73a8ad2d9 100644
--- a/src/test/java/org/jabref/logic/crawler/StudyDatabaseToFetcherConverterTest.java
+++ b/src/test/java/org/jabref/logic/crawler/StudyCatalogToFetcherConverterTest.java
@@ -27,7 +27,7 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-class StudyDatabaseToFetcherConverterTest {
+class StudyCatalogToFetcherConverterTest {
SaveConfiguration saveConfiguration;
PreferencesService preferencesService;
BibEntryTypesManager entryTypesManager;
@@ -59,7 +59,7 @@ public void getActiveFetcherInstances() throws Exception {
preferencesService,
new DummyFileUpdateMonitor(),
entryTypesManager);
- StudyDatabaseToFetcherConverter converter = new StudyDatabaseToFetcherConverter(
+ StudyCatalogToFetcherConverter converter = new StudyCatalogToFetcherConverter(
studyRepository.getActiveLibraryEntries(),
mock(ImportFormatPreferences.class, Answers.RETURNS_DEEP_STUBS),
mock(ImporterPreferences.class));