Skip to content

Commit cbca3f8

Browse files
authored
Fix class name for SciteAiFetcher (#14195)
1 parent c658054 commit cbca3f8

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationsRelationsTabViewModel.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import org.jabref.gui.preferences.GuiPreferences;
1919
import org.jabref.logic.citationkeypattern.CitationKeyGenerator;
2020
import org.jabref.logic.importer.fetcher.CrossRef;
21-
import org.jabref.logic.importer.fetcher.ScienceAiFetcher;
21+
import org.jabref.logic.importer.fetcher.SciteAiFetcher;
2222
import org.jabref.logic.importer.fetcher.citation.CitationFetcher;
2323
import org.jabref.logic.l10n.Localization;
2424
import org.jabref.logic.util.BackgroundTask;
@@ -47,7 +47,7 @@ public enum SciteStatus {
4747
private final FileUpdateMonitor fileUpdateMonitor;
4848
private final TaskExecutor taskExecutor;
4949

50-
private final ScienceAiFetcher scienceAiFetcher;
50+
private final SciteAiFetcher sciteAiFetcher;
5151

5252
private final ObjectProperty<SciteStatus> status;
5353
private final StringProperty searchError;
@@ -64,7 +64,7 @@ public CitationsRelationsTabViewModel(GuiPreferences preferences, UndoManager un
6464

6565
this.status = new SimpleObjectProperty<>(SciteStatus.IN_PROGRESS);
6666
this.searchError = new SimpleStringProperty("");
67-
this.scienceAiFetcher = new ScienceAiFetcher();
67+
this.sciteAiFetcher = new SciteAiFetcher();
6868
}
6969

7070
public void importEntries(List<CitationRelationItem> entriesToImport, CitationFetcher.SearchType searchType, BibEntry existingEntry) {
@@ -154,7 +154,7 @@ public void bindToEntry(BibEntry entry) {
154154
return;
155155
}
156156

157-
searchTask = BackgroundTask.wrap(() -> scienceAiFetcher.fetchTallies(entry.getDOI().get()))
157+
searchTask = BackgroundTask.wrap(() -> sciteAiFetcher.fetchTallies(entry.getDOI().get()))
158158
.onRunning(() -> status.set(SciteStatus.IN_PROGRESS))
159159
.onSuccess(result -> {
160160
currentResult = Optional.of(result);

jablib/src/main/java/org/jabref/logic/importer/fetcher/ScienceAiFetcher.java renamed to jablib/src/main/java/org/jabref/logic/importer/fetcher/SciteAiFetcher.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
import org.slf4j.Logger;
1515
import org.slf4j.LoggerFactory;
1616

17-
public class ScienceAiFetcher {
17+
/// Fetches citation information from <https://scite.ai/>
18+
public class SciteAiFetcher {
1819
private static final String BASE_URL = "https://api.scite.ai/";
19-
private static final Logger LOGGER = LoggerFactory.getLogger(ScienceAiFetcher.class);
20+
private static final Logger LOGGER = LoggerFactory.getLogger(SciteAiFetcher.class);
2021

21-
public ScienceAiFetcher() {
22+
public SciteAiFetcher() {
2223
}
2324

2425
public TalliesResponse fetchTallies(DOI doi) throws FetcherException {

jablib/src/test/java/org/jabref/logic/importer/fetcher/ScienceAiFetcherTest.java renamed to jablib/src/test/java/org/jabref/logic/importer/fetcher/SciteAiFetcherTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import static org.junit.jupiter.api.Assertions.assertEquals;
1313

14-
public class ScienceAiFetcherTest {
14+
public class SciteAiFetcherTest {
1515
@Test
1616
void sciteTallyDTO() {
1717
JSONObject jsonObject = new JSONObject();
@@ -36,7 +36,7 @@ void sciteTallyDTO() {
3636

3737
@Test
3838
void fetchTallies() throws FetcherException {
39-
ScienceAiFetcher viewModel = new ScienceAiFetcher();
39+
SciteAiFetcher viewModel = new SciteAiFetcher();
4040
DOI doi = new DOI("10.1109/ICECS.2010.5724443");
4141
Optional<DOI> actual = DOI.parse(viewModel.fetchTallies(doi).doi());
4242
assertEquals(Optional.of(doi), actual);

0 commit comments

Comments
 (0)