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

public Class DnbFetcher

extends AbstractIsbnFetcher
implements PagedSearchBasedParserFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.PagedSearchBasedParserFetcher, org.jabref.logic.importer.ParserFetcher, org.jabref.logic.importer.PagedSearchBasedFetcher, org.jabref.logic.importer.SearchBasedFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.SearchBasedParserFetcher
Annotations
@NullMarked
Imports
java.net.MalformedURLException, .URISyntaxException, .URL, org.jabref.logic.importer.ImportFormatPreferences, .PagedSearchBasedParserFetcher, .Parser, org.jabref.logic.importer.fetcher.transformers.DnbQueryTransformer, org.jabref.logic.importer.fileformat.MarcXmlParser, org.jabref.model.search.query.BaseQueryNode, org.apache.hc.core5.net.URIBuilder, org.jspecify.annotations.NullMarked, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private static final Logger
private static final String
Inherited from org.jabref.logic.importer.fetcher.AbstractIsbnFetcher:
importFormatPreferences

Constructor Summary

AccessConstructor and Description
public
DnbFetcher(ImportFormatPreferences importFormatPreferences)

Method Summary

Modifier and TypeMethod and Description
private URL
buildSearchUrl(String query, int pageNumber)

public String
getName()

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

Returns the localized name of this fetcher.

public Parser
public URL
getUrlForIdentifier(String identifier)

Implements org.jabref.logic.importer.IdBasedParserFetcher.getUrlForIdentifier.

Constructs a URL based on the query.

public URL
getURLForQuery(BaseQueryNode queryNode, int pageNumber)

Implements org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForQuery.

Constructs a URL based on the query, size and page number.

public URL
getURLForRawQuery(String rawQuery, int pageNumber)

Overrides default org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForRawQuery.

Constructs a URL that sends the raw, catalog-native query verbatim to the catalog (bypassing the query transformer).

Inherited from org.jabref.logic.importer.fetcher.AbstractIsbnFetcher:
ensureThatIsbnIsValidgetHelpPage

Field Detail

LOGGERback to summary
private static final Logger LOGGER

Hides org.jabref.logic.importer.IdBasedParserFetcher.LOGGER.

URL_PATTERNback to summary
private static final String URL_PATTERN

Constructor Detail

DnbFetcherback to summary
public DnbFetcher(ImportFormatPreferences importFormatPreferences)

Method Detail

buildSearchUrlback to summary
private URL buildSearchUrl(String query, int pageNumber) throws URISyntaxException, MalformedURLException
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
getParserback to summary
public Parser getParser()

Overrides org.jabref.logic.importer.fetcher.AbstractIsbnFetcher.getParser.

Implements org.jabref.logic.importer.SearchBasedParserFetcher.getParser, org.jabref.logic.importer.IdBasedParserFetcher.getParser.

Doc from org.jabref.logic.importer.SearchBasedParserFetcher.getParser.

Returns the parser used to convert the response to a list of BibEntry.

Annotations
@Override
getUrlForIdentifierback to summary
public URL getUrlForIdentifier(String identifier) throws URISyntaxException, MalformedURLException

Implements org.jabref.logic.importer.IdBasedParserFetcher.getUrlForIdentifier.

Doc from org.jabref.logic.importer.IdBasedParserFetcher.getUrlForIdentifier.

Constructs a URL based on the query.

Annotations
@Override
getURLForQueryback to summary
public URL getURLForQuery(BaseQueryNode queryNode, int pageNumber) throws URISyntaxException, MalformedURLException

Implements org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForQuery.

Doc from org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForQuery.

Constructs a URL based on the query, size and page number.

Annotations
@Override
getURLForRawQueryback to summary
public URL getURLForRawQuery(String rawQuery, int pageNumber) throws URISyntaxException, MalformedURLException

Overrides default org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForRawQuery.

Doc from org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForRawQuery.

Constructs a URL that sends the raw, catalog-native query verbatim to the catalog (bypassing the query transformer).

Annotations
@Override