Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.importer.fetcher.isbntobibtex

public Class IsbnFetcher

extends Object
implements EntryBasedFetcher, IdBasedFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.IdBasedFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.EntryBasedFetcher
Imports
java.util.ArrayList, .Iterator, .List, .Optional, java.util.regex.Pattern, org.jabref.logic.help.HelpFile, org.jabref.logic.importer.EntryBasedFetcher, .FetcherException, .IdBasedFetcher, .ImportFormatPreferences, org.jabref.logic.importer.fetcher.AbstractIsbnFetcher, .DnbFetcher, .GvkFetcher, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.StandardField, org.jabref.model.entry.identifier.ISBN, org.jabref.model.util.OptionalUtil, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Fetcher to generate the Bibtex entry from an ISBN. The default fetcher is the OpenLibraryIsbnFetcher. If the entry is not found in the OpenLibraryIsbnFetcher. Alternative fetcher can be specified with the IsbnFetcher#addRetryFetcher(AbstractIsbnFetcher) method.

Field Summary

Modifier and TypeField and Description
private final GvkFetcher
protected final ImportFormatPreferences
private static final Logger
private static final Pattern
private final List<AbstractIsbnFetcher>

Constructor Summary

AccessConstructor and Description
public
IsbnFetcher(ImportFormatPreferences importFormatPreferences)

Method Summary

Modifier and TypeMethod and Description
public IsbnFetcher
public Optional<HelpFile>
getHelpPage()

Overrides default org.jabref.logic.importer.WebFetcher.getHelpPage.

Returns the help page for this fetcher.

public String
getName()

Implements org.jabref.logic.importer.WebFetcher.getName.

Returns the localized name of this fetcher.

public List<BibEntry>
performSearch(@NonNull BibEntry entry)

Implements org.jabref.logic.importer.EntryBasedFetcher.performSearch.

Looks for hits which are matched by the given BibEntry.

public Optional<BibEntry>
performSearchById(String identifier)

Implements org.jabref.logic.importer.IdBasedFetcher.performSearchById.

Looks for bibliographic information associated to the given identifier.

private String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

gvkIsbnFetcherback to summary
private final GvkFetcher gvkIsbnFetcher
importFormatPreferencesback to summary
protected final ImportFormatPreferences importFormatPreferences
LOGGERback to summary
private static final Logger LOGGER
NEWLINE_SPACE_PATTERNback to summary
private static final Pattern NEWLINE_SPACE_PATTERN
retryIsbnFetcherback to summary
private final List<AbstractIsbnFetcher> retryIsbnFetcher

Constructor Detail

IsbnFetcherback to summary
public IsbnFetcher(ImportFormatPreferences importFormatPreferences)

Method Detail

addRetryFetcherback to summary
public IsbnFetcher addRetryFetcher(@NonNull AbstractIsbnFetcher retryFetcher)
getHelpPageback to summary
public Optional<HelpFile> getHelpPage()

Overrides default org.jabref.logic.importer.WebFetcher.getHelpPage.

Doc from org.jabref.logic.importer.WebFetcher.getHelpPage.

Returns the help page for this fetcher.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.jabref.logic.importer.WebFetcher.getName.

Doc from org.jabref.logic.importer.WebFetcher.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.

Todo

This name is also used for identifying the fetcher in preferences for API keys. Thus, any switch of the language will "remove" API keys.

Annotations
@Override
performSearchback to summary
public List<BibEntry> performSearch(@NonNull BibEntry entry) throws FetcherException

Implements org.jabref.logic.importer.EntryBasedFetcher.performSearch.

Doc from org.jabref.logic.importer.EntryBasedFetcher.performSearch.

Looks for hits which are matched by the given BibEntry.

Annotations
@Override
performSearchByIdback to summary
public Optional<BibEntry> performSearchById(String identifier) throws FetcherException

Implements org.jabref.logic.importer.IdBasedFetcher.performSearchById.

Doc from org.jabref.logic.importer.IdBasedFetcher.performSearchById.

Looks for bibliographic information associated to the given identifier.

Annotations
@Override
removeNewlinesAndSpacesFromIdentifierback to summary
private String removeNewlinesAndSpacesFromIdentifier(String identifier)