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

public Class JstorFetcher

extends Object
implements SearchBasedParserFetcher, FulltextFetcher, IdBasedParserFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.IdBasedParserFetcher, org.jabref.logic.importer.ParserFetcher, org.jabref.logic.importer.IdBasedFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.FulltextFetcher, org.jabref.logic.importer.SearchBasedParserFetcher, org.jabref.logic.importer.SearchBasedFetcher
Imports
java.io.BufferedReader, .IOException, .InputStreamReader, java.net.MalformedURLException, .URISyntaxException, .URL, java.nio.charset.StandardCharsets, java.util.ArrayList, .List, .Optional, java.util.regex.Pattern, java.util.stream.Collectors, org.jabref.logic.importer.FetcherException, .FulltextFetcher, .IdBasedParserFetcher, .ImportFormatPreferences, .ParseException, .Parser, .SearchBasedParserFetcher, org.jabref.logic.importer.fetcher.transformers.JstorQueryTransformer, org.jabref.logic.importer.fileformat.BibtexParser, org.jabref.logic.net.URLDownload, org.jabref.logic.util.URLUtil, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.StandardField, org.jabref.model.search.query.BaseQueryNode, org.apache.hc.core5.net.URIBuilder, org.jsoup.Jsoup, org.jsoup.nodes.Document, .Element, org.jspecify.annotations.NonNull

Fetcher for jstor.org

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private final ImportFormatPreferences
private static final String
private static final Pattern
private static final String

Constructor Summary

AccessConstructor and Description
public
JstorFetcher(ImportFormatPreferences importFormatPreferences)

Method Summary

Modifier and TypeMethod and Description
public Optional<URL>
public String
getName()

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

Returns the localized name of this fetcher.

public Parser
public TrustLevel
getTrustLevel()

Implements org.jabref.logic.importer.FulltextFetcher.getTrustLevel.

Returns the level of trust for this fetcher.

public URL
getUrlForIdentifier(String identifier)

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

Constructs a URL based on the query.

public URL
getURLForQuery(BaseQueryNode queryNode)

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

Constructs a URL based on the lucene query.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CITE_HOSTback to summary
private static final String CITE_HOST
HOSTback to summary
private static final String HOST
importFormatPreferencesback to summary
private final ImportFormatPreferences importFormatPreferences
SEARCH_HOSTback to summary
private static final String SEARCH_HOST
URL_QUERY_PATTERNback to summary
private static final Pattern URL_QUERY_PATTERN
URL_QUERY_REGEXback to summary
private static final String URL_QUERY_REGEX

Constructor Detail

JstorFetcherback to summary
public JstorFetcher(ImportFormatPreferences importFormatPreferences)

Method Detail

findFullTextback to summary
public Optional<URL> findFullText(@NonNull BibEntry entry) throws FetcherException, IOException
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, 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
getTrustLevelback to summary
public TrustLevel getTrustLevel()

Implements org.jabref.logic.importer.FulltextFetcher.getTrustLevel.

Doc from org.jabref.logic.importer.FulltextFetcher.getTrustLevel.

Returns the level of trust for this fetcher. We distinguish between publishers and meta search engines for example.

Annotations
@Override
getUrlForIdentifierback to summary
public URL getUrlForIdentifier(String identifier) throws 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) 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