Top Description Fields Constructors Methods
org.jabref.logic.importer

public Class FulltextFetchers

extends Object
Class Inheritance
Imports
java.io.IOException, java.net.MalformedURLException, .URL, java.util.Comparator, .HashSet, .List, .Optional, .Set, java.util.concurrent.Callable, .CancellationException, .ExecutionException, .Future, .TimeUnit, java.util.function.Predicate, java.util.stream.Collectors, org.jabref.logic.net.URLDownload, org.jabref.logic.util.HeadlessExecutorService, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.StandardField, org.jabref.model.entry.identifier.DOI, org.slf4j.Logger, .LoggerFactory

Utility class for trying to resolve URLs to full-text PDF for articles. Combines multiple FulltextFetchers together. Each fetcher is invoked, the "best" result (sorted by the fetcher trust level) is returned.

Field Summary

Modifier and TypeField and Description
private static final int
private final Set<FulltextFetcher>
private final Predicate<String>
private static final Logger

Constructor Summary

AccessConstructor and Description
public
FulltextFetchers(ImportFormatPreferences importFormatPreferences, ImporterPreferences importerPreferences)

pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
public Optional<URL>
private Callable<Optional<FetcherResult>>
private List<Callable<Optional<FetcherResult>>>
private static Optional<FetcherResult>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FETCHER_TIMEOUTback to summary
private static final int FETCHER_TIMEOUT
findersback to summary
private final Set<FulltextFetcher> finders
isPDFback to summary
private final Predicate<String> isPDF
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

FulltextFetchersback to summary
public FulltextFetchers(ImportFormatPreferences importFormatPreferences, ImporterPreferences importerPreferences)
FulltextFetchersback to summary
pack-priv FulltextFetchers(Set<FulltextFetcher> fetcher)

Method Detail

findDoiForEntryback to summary
private void findDoiForEntry(BibEntry clonedEntry)
findFullTextPDFback to summary
public Optional<URL> findFullTextPDF(BibEntry entry)
getCallableback to summary
private Callable<Optional<FetcherResult>> getCallable(BibEntry entry, FulltextFetcher fetcher)
getCallablesback to summary
private List<Callable<Optional<FetcherResult>>> getCallables(BibEntry entry, Set<FulltextFetcher> fetchers)
getResultsback to summary
private static Optional<FetcherResult> getResults(Future<Optional<FetcherResult>> future)