Verified Owner
Top Description Methods
org.jabref.logic.importer

public Interface FulltextFetcher

Known Direct Implementers
org.jabref.logic.importer.fetcher.ACS, org.jabref.logic.importer.fetcher.ApsFetcher, org.jabref.logic.importer.fetcher.ArXivFetcher, org.jabref.logic.importer.fetcher.ArXivFetcher.ArXiv, org.jabref.logic.importer.fetcher.DoiResolution, org.jabref.logic.importer.fetcher.GoogleScholar, org.jabref.logic.importer.fetcher.IacrEprintFetcher, org.jabref.logic.importer.fetcher.IEEE, org.jabref.logic.importer.fetcher.JstorFetcher, org.jabref.logic.importer.fetcher.OpenAccessDoi, org.jabref.logic.importer.fetcher.OpenAlex, org.jabref.logic.importer.fetcher.ResearchGate, org.jabref.logic.importer.fetcher.ScholarFetcher, org.jabref.logic.importer.fetcher.ScienceDirect, org.jabref.logic.importer.fetcher.SemanticScholar, org.jabref.logic.importer.fetcher.SpringerNatureFullTextFetcher, org.jabref.logic.importer.fetcher.UnpaywallFetcher, org.jabref.logic.importer.fetcher.WileyFetcher
Imports
java.io.IOException, java.net.URL, java.util.Map, .Optional, org.jabref.logic.importer.fetcher.TrustLevel, org.jabref.model.entry.BibEntry, org.jspecify.annotations.NonNull

This interface is used for classes that try to resolve a full-text PDF url for a BibTex entry. Implementing classes should specialize on specific article sites. See e.g. @link{http://libguides.mit.edu/apis}.

Method Summary

Modifier and TypeMethod and Description
public Optional<URL>

Returns:

The fulltext PDF URL Optional, if found, or an empty Optional if not found.
findFullText
(@NonNull BibEntry
The Bibtex entry
entry
)

Tries to find a fulltext URL for a given BibTex entry.

public default Map<String, String>

Returns:

A map of header name to header value, empty by default
getDownloadHeaders
()

Returns HTTP headers required for downloading the PDF returned by findFullText.

public TrustLevel

Returns:

The trust level of the fetcher, the higher the better
getTrustLevel
()

Returns the level of trust for this fetcher.

Method Detail

findFullTextback to summary
public Optional<URL> findFullText(@NonNull BibEntry entry) throws IOException, FetcherException

Tries to find a fulltext URL for a given BibTex entry.

Parameters
entry:@NonNull BibEntry

The Bibtex entry

Returns:Optional<URL>

The fulltext PDF URL Optional, if found, or an empty Optional if not found.

Exceptions
IOException:
if an IO operation has failed
FetcherException:
if a fetcher-specific error occurred
NullPointerException:
if no BibTex entry is given
getDownloadHeadersback to summary
public default Map<String, String> getDownloadHeaders()

Returns HTTP headers required for downloading the PDF returned by findFullText. Fetchers that require authentication (for ex: API tokens) should override this method.

Returns:Map<String, String>

A map of header name to header value, empty by default

getTrustLevelback to summary
public TrustLevel getTrustLevel()

Returns the level of trust for this fetcher. We distinguish between publishers and meta search engines for example.

Returns:TrustLevel

The trust level of the fetcher, the higher the better