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, .Collections, .Iterator, .List, .Objects, .Optional, java.util.regex.Pattern, org.jabref.logic.help.HelpFile, org.jabref.logic.importer.EntryBasedFetcher, .FetcherException, .IdBasedFetcher, .ImportFormatPreferences, org.jabref.logic.importer.fetcher.AbstractIsbnFetcher, .GvkFetcher, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.StandardField, org.jabref.model.entry.identifier.ISBN, org.jabref.model.util.OptionalUtil, 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(BibEntry
entry to search bibliographic information for
entry
)

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

Looks for hits which are matched by the given BibEntry.

public Optional<BibEntry>
performSearchById(String
a string which uniquely identifies the item
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(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.

Returns:Optional<HelpFile>

the HelpFile enum constant for the help page

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.

Returns:String

the localized name

Annotations
@Override
performSearchback to summary
public List<BibEntry> performSearch(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.

Parameters
entry:BibEntry

entry to search bibliographic information for

Returns:List<BibEntry>

a list of BibEntry, which are matched by the query (may be empty)

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.

Parameters
identifier:String

a string which uniquely identifies the item

Returns:Optional<BibEntry>

a BibEntry containing the bibliographic information (or an empty optional if no data was found)

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