Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f572b32
Refine explanation of references
koppor Feb 1, 2026
4e5f01e
Begin of OpenCitationsFetcher
koppor Feb 1, 2026
b31873f
Initialize task: New task
koppor Feb 1, 2026
4d7d56c
Create Response Model Classes
koppor Feb 1, 2026
0c62740
Technical Specification
koppor Feb 1, 2026
312562b
Technical Specification
koppor Feb 1, 2026
d6545b1
Create Response Model Classes
koppor Feb 1, 2026
6004e27
Create Response Model Classes
koppor Feb 1, 2026
d3e6beb
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
345bac0
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
4e64795
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
5406e4f
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
b13ffec
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
f3867e1
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
057abaf
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
5f77b88
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
84fd50f
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
3538b3d
Implement OpenCitationsFetcher Core Class
koppor Feb 1, 2026
8a488ec
Register OpenCitations in CitationFetcherType Enum
koppor Feb 1, 2026
51bbae3
Merge branch 'new-task-ed21' into add-open-citations
koppor Feb 1, 2026
51dd141
Remove zenflow things
koppor Feb 1, 2026
b6a7cc9
Merge remote-tracking branch 'origin/main' into add-open-citations
koppor Feb 1, 2026
3979fdc
JabKit: Use OpenCitations instead of CrossRef
koppor Feb 1, 2026
2f811ee
Add selection of citation providers also for GetCitingWorks
koppor Feb 1, 2026
3454654
Begin to wire OPEN_CITATIONS into GUI
koppor Feb 1, 2026
343b6f5
Refine code
koppor Feb 1, 2026
15a1537
Wire OpenCitations into GUI
koppor Feb 1, 2026
6bff9a9
Add CHANGELOG.md entry
koppor Feb 1, 2026
8869a0b
Fix CrossRef fetching issue
koppor Feb 1, 2026
dd3dabc
Add link to CHANGELOG.md
koppor Feb 1, 2026
64e5d27
Add links to API - and group methods more together
koppor Feb 1, 2026
75e377e
Fix references.md
koppor Feb 1, 2026
dcd6c31
Fix format
koppor Feb 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create Response Model Classes
  • Loading branch information
koppor committed Feb 1, 2026
commit d6545b1cf0bbb2ddb77f2e793fe4acd48b32c391
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,22 @@
import java.util.Optional;

import com.google.gson.annotations.SerializedName;
import org.jspecify.annotations.Nullable;

public class CitationItem {
private String oci;
private String citing;
private String cited;
private String creation;
private String timespan;
class CitationItem {
@Nullable String oci;
@Nullable String citing;
@Nullable String cited;
@Nullable String creation;
@Nullable String timespan;

@SerializedName("journal_sc")
private String journalSelfCitation;
@Nullable String journalSelfCitation;

@SerializedName("author_sc")
private String authorSelfCitation;
@Nullable String authorSelfCitation;

public String getOci() {
return oci;
}

public void setOci(String oci) {
this.oci = oci;
}

public String getCiting() {
return citing;
}

public void setCiting(String citing) {
this.citing = citing;
}

public String getCited() {
return cited;
}

public void setCited(String cited) {
this.cited = cited;
}

public String getCreation() {
return creation;
}

public void setCreation(String creation) {
this.creation = creation;
}

public String getTimespan() {
return timespan;
}

public void setTimespan(String timespan) {
this.timespan = timespan;
}

public String getJournalSelfCitation() {
return journalSelfCitation;
}

public void setJournalSelfCitation(String journalSelfCitation) {
this.journalSelfCitation = journalSelfCitation;
}

public String getAuthorSelfCitation() {
return authorSelfCitation;
}

public void setAuthorSelfCitation(String authorSelfCitation) {
this.authorSelfCitation = authorSelfCitation;
}

public Optional<String> extractDoi(String pidString) {
Optional<String> extractDoi(@Nullable String pidString) {
if (pidString == null || pidString.isEmpty()) {
return Optional.empty();
}
Expand All @@ -87,11 +32,11 @@ public Optional<String> extractDoi(String pidString) {
return Optional.empty();
}

public Optional<String> getCitingDoi() {
Optional<String> citingDoi() {
return extractDoi(citing);
}

public Optional<String> getCitedDoi() {
Optional<String> citedDoi() {
return extractDoi(cited);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package org.jabref.logic.importer.fetcher.citation.opencitations;

public class CountResponse {
private String count;
import org.jspecify.annotations.Nullable;

public String getCount() {
return count;
}

public void setCount(String count) {
this.count = count;
}
class CountResponse {
@Nullable String count;

public int getCountAsInt() {
int countAsInt() {
if (count == null) {
return 0;
}
try {
return Integer.parseInt(count);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this class here really necessary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DTO pattern. Better consistency in always using a DTO in this class than case-by-case

--> CitatonItem is the other DTO.

} catch (NumberFormatException e) {
Expand Down