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

public Class EuropePmcFetcher

extends Object
implements IdBasedParserFetcher, 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, org.jabref.logic.importer.IdBasedParserFetcher, org.jabref.logic.importer.IdBasedFetcher
Imports
java.net.MalformedURLException, .URI, .URISyntaxException, .URL, java.util.ArrayList, .List, .Optional, java.util.regex.Pattern, org.jabref.logic.cleanup.FieldFormatterCleanup, org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter, org.jabref.logic.importer.IdBasedParserFetcher, .ParseException, .Parser, .SearchBasedParserFetcher, org.jabref.logic.importer.fetcher.transformers.DefaultSearchQueryTransformer, org.jabref.logic.importer.util.JsonReader, org.jabref.model.entry.Author, .AuthorList, .BibEntry, .Month, org.jabref.model.entry.field.StandardField, .UnknownField, org.jabref.model.entry.types.EntryType, .StandardEntryType, org.jabref.model.search.query.BaseQueryNode, kong.unirest.core.json.JSONArray, kong.unirest.core.json.JSONException, kong.unirest.core.json.JSONObject, org.apache.hc.core5.net.URIBuilder, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private static final Pattern
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private EntryType
determineEntryType(kong.unirest.core.json.JSONObject result)

public void
doPostCleanup(BibEntry entry)

Overrides default org.jabref.logic.importer.ParserFetcher.doPostCleanup.

Performs a cleanup of the fetched entry.

private Optional<String>
extractBestFullTextUrl(kong.unirest.core.json.JSONObject result)

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 queryList)

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

Constructs a URL based on the lucene query.

private BibEntry
jsonItemToBibEntry(kong.unirest.core.json.JSONObject item)

private boolean
matchesAny(List<String> list, String searchString)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DATE_PATTERNback to summary
private static final Pattern DATE_PATTERN
LOGGERback to summary
private static final Logger LOGGER

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

Constructor Detail

EuropePmcFetcherback to summary
public EuropePmcFetcher()

Method Detail

determineEntryTypeback to summary
private EntryType determineEntryType(kong.unirest.core.json.JSONObject result)
doPostCleanupback to summary
public void doPostCleanup(BibEntry entry)

Overrides default org.jabref.logic.importer.ParserFetcher.doPostCleanup.

Doc from org.jabref.logic.importer.ParserFetcher.doPostCleanup.

Performs a cleanup of the fetched entry.

Only systematic errors of the fetcher should be corrected here (i.e. if information is consistently contained in the wrong field or the wrong format) but not cosmetic issues which may depend on the user's taste (for example, LateX code vs HTML in the abstract).

Try to reuse existing org.jabref.logic.formatter.Formatter for the cleanup. For example, new FieldFormatterCleanup(StandardField.TITLE, new RemoveBracesFormatter()).cleanup(entry);

By default, no cleanup is done.

Annotations
@Override
extractBestFullTextUrlback to summary
private Optional<String> extractBestFullTextUrl(kong.unirest.core.json.JSONObject result)
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.IdBasedParserFetcher.getParser, org.jabref.logic.importer.SearchBasedParserFetcher.getParser.

Doc from org.jabref.logic.importer.IdBasedParserFetcher.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 queryList) 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
jsonItemToBibEntryback to summary
private BibEntry jsonItemToBibEntry(kong.unirest.core.json.JSONObject item) throws ParseException
matchesAnyback to summary
private boolean matchesAny(List<String> list, String searchString)