Verified Owner
Top Fields Constructors Methods
org.jabref.logic.importer.fetcher.citation.semanticscholar

public Class SemanticScholarCitationFetcher

extends Object
implements CitationFetcher, CustomizableKeyFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.fetcher.CustomizableKeyFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.fetcher.citation.CitationFetcher, org.jabref.logic.importer.fetcher.citation.CitationCountFetcher
Annotations
@NullMarked
Imports
java.net.MalformedURLException, .URI, .URISyntaxException, .URL, java.util.List, .Optional, org.jabref.logic.importer.FetcherException, .ImporterPreferences, org.jabref.logic.importer.fetcher.CustomizableKeyFetcher, org.jabref.logic.importer.fetcher.citation.CitationFetcher, org.jabref.logic.l10n.Localization, org.jabref.logic.net.URLDownload, org.jabref.model.entry.BibEntry, com.google.gson.Gson, kong.unirest.core.json.JSONObject, org.jspecify.annotations.NullMarked, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
public static final String
private static final Gson
private final ImporterPreferences
private static final Logger
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Optional<URI>
getApiUrl(String endpoint, BibEntry entry)

public Optional<Integer>
getCitationCount(BibEntry entry)

Implements org.jabref.logic.importer.fetcher.citation.CitationCountFetcher.getCitationCount.

Get the paper details that includes citation count field for a given BibEntry.

public Optional<URI>
public List<BibEntry>
public Optional<URI>
getCitationsApiUri(BibEntry entry)

Overrides default org.jabref.logic.importer.fetcher.citation.CitationFetcher.getCitationsApiUri.

Returns the API URL for fetching citations

public String
public List<BibEntry>
public Optional<URI>
getReferencesApiUri(BibEntry entry)

Overrides default org.jabref.logic.importer.fetcher.citation.CitationFetcher.getReferencesApiUri.

Returns the API URL for fetching references

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FETCHER_NAMEback to summary
public static final String FETCHER_NAME
GSONback to summary
private static final Gson GSON
importerPreferencesback to summary
private final ImporterPreferences importerPreferences
LOGGERback to summary
private static final Logger LOGGER
PAPER_FIELDSback to summary
private static final String PAPER_FIELDS
SEMANTIC_SCHOLAR_APIback to summary
private static final String SEMANTIC_SCHOLAR_API

Constructor Detail

SemanticScholarCitationFetcherback to summary
public SemanticScholarCitationFetcher(ImporterPreferences importerPreferences)

Method Detail

getApiUrlback to summary
private Optional<URI> getApiUrl(String endpoint, BibEntry entry)
getCitationCountback to summary
public Optional<Integer> getCitationCount(BibEntry entry) throws FetcherException

Implements org.jabref.logic.importer.fetcher.citation.CitationCountFetcher.getCitationCount.

Doc from org.jabref.logic.importer.fetcher.citation.CitationCountFetcher.getCitationCount.

Get the paper details that includes citation count field for a given BibEntry.

Annotations
@Override
getCitationCountApiUriback to summary
public Optional<URI> getCitationCountApiUri(BibEntry entry)
getCitationsback to summary
public List<BibEntry> getCitations(BibEntry entry) throws FetcherException

Implements org.jabref.logic.importer.fetcher.citation.CitationFetcher.getCitations.

Doc from org.jabref.logic.importer.fetcher.citation.CitationFetcher.getCitations.

Looks for hits which are citing the given BibEntry.

Annotations
@Override
getCitationsApiUriback to summary
public Optional<URI> getCitationsApiUri(BibEntry entry)

Overrides default org.jabref.logic.importer.fetcher.citation.CitationFetcher.getCitationsApiUri.

Doc from org.jabref.logic.importer.fetcher.citation.CitationFetcher.getCitationsApiUri.

Returns the API URL for fetching citations

Annotations
@Override
getNameback to summary
public String getName()

Implements org.jabref.logic.importer.fetcher.citation.CitationFetcher.getName, org.jabref.logic.importer.WebFetcher.getName.

Doc from org.jabref.logic.importer.fetcher.citation.CitationFetcher.getName.

Returns the localized name of this fetcher. The title can be used to display the fetcher in the menu and in the side pane.

Annotations
@Override
getReferencesback to summary
public List<BibEntry> getReferences(BibEntry entry) throws FetcherException

Implements org.jabref.logic.importer.fetcher.citation.CitationFetcher.getReferences.

Doc from org.jabref.logic.importer.fetcher.citation.CitationFetcher.getReferences.

Looks for hits which are cited by the given BibEntry. This typically is the "References" (or "Bibliography" or "Literature") section of a paper.

Annotations
@Override
getReferencesApiUriback to summary
public Optional<URI> getReferencesApiUri(BibEntry entry)

Overrides default org.jabref.logic.importer.fetcher.citation.CitationFetcher.getReferencesApiUri.

Doc from org.jabref.logic.importer.fetcher.citation.CitationFetcher.getReferencesApiUri.

Returns the API URL for fetching references

Annotations
@Override