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

public Class DOAJFetcher

extends Object
implements SearchBasedParserFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.SearchBasedParserFetcher, org.jabref.logic.importer.ParserFetcher, org.jabref.logic.importer.SearchBasedFetcher, org.jabref.logic.importer.WebFetcher
Imports
java.io.BufferedReader, .InputStreamReader, java.net.MalformedURLException, .URISyntaxException, .URL, java.time.Duration, java.util.ArrayList, .List, .Optional, java.util.stream.Collectors, org.jabref.logic.help.HelpFile, org.jabref.logic.importer.ImportFormatPreferences, .Parser, .SearchBasedParserFetcher, org.jabref.logic.importer.fetcher.transformers.DefaultSearchQueryTransformer, org.jabref.logic.net.URLDownload, org.jabref.logic.os.OS, org.jabref.logic.util.strings.StringUtil, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.Field, .StandardField, org.jabref.model.entry.types.StandardEntryType, org.jabref.model.search.query.BaseQueryNode, kong.unirest.core.json.JSONArray, kong.unirest.core.json.JSONObject, org.apache.hc.core5.net.URIBuilder, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Fetches data from the Directory of Open Access Journals (DOAJ)
See Also
API documentation

Field Summary

Modifier and TypeField and Description
private static final FetcherRateLimiter
private static final Logger
private final ImportFormatPreferences
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
addPath(URIBuilder base, String subPath)

private static String
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 Parser
getParser()

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

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

public URLDownload
getUrlDownload(URL url)

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

Constructs an URLDownload object for downloading content based on the given URL.

public URL
getURLForQuery(BaseQueryNode queryNode)

Implements org.jabref.logic.importer.SearchBasedParserFetcher.getURLForQuery.

Constructs a URL based on the lucene query.

public static BibEntry

Returns:

the converted BibEntry
parseBibJSONtoBibtex
(kong.unirest.core.json.JSONObject
The JSONObject to convert
bibJsonEntry
,
Character keywordSeparator)

Convert a JSONObject containing a bibJSON entry to a BibEntry

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DOAJ_API_RATE_LIMITERback to summary
private static final FetcherRateLimiter DOAJ_API_RATE_LIMITER
LOGGERback to summary
private static final Logger LOGGER
preferencesback to summary
private final ImportFormatPreferences preferences
SEARCH_URLback to summary
private static final String SEARCH_URL

Constructor Detail

DOAJFetcherback to summary
public DOAJFetcher(@NonNull ImportFormatPreferences preferences)

Method Detail

addPathback to summary
public static void addPath(URIBuilder base, String subPath)
appendSegmentToPathback to summary
private static String appendSegmentToPath(String path, String segment)
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
getParserback to summary
public Parser getParser()

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

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

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

Annotations
@Override
getUrlDownloadback to summary
public URLDownload getUrlDownload(URL url)

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

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

Constructs an URLDownload object for downloading content based on the given URL. Overwrite, if you need to send additional headers for the download.

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

Implements org.jabref.logic.importer.SearchBasedParserFetcher.getURLForQuery.

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

Constructs a URL based on the lucene query.

Annotations
@Override
parseBibJSONtoBibtexback to summary
public static BibEntry parseBibJSONtoBibtex(kong.unirest.core.json.JSONObject bibJsonEntry, Character keywordSeparator)

Convert a JSONObject containing a bibJSON entry to a BibEntry

Parameters
bibJsonEntry:kong.unirest.core.json.JSONObject

The JSONObject to convert

Returns:BibEntry

the converted BibEntry