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

pack-priv Class StudyFetcher

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Objects, java.util.stream.Collectors, org.jabref.logic.importer.FetcherException, .PagedSearchBasedFetcher, .SearchBasedFetcher, org.jabref.model.database.BibDatabase, org.jabref.model.entry.BibEntry, org.jabref.model.study.FetchResult, .QueryResult, org.slf4j.Logger, .LoggerFactory

Delegates the search of the provided set of targeted E-Libraries with the provided queries to the E-Library specific fetchers, and aggregates the results returned by the fetchers by query and E-Library.

Field Summary

Modifier and TypeField and Description
private final List<SearchBasedFetcher>
private static final Logger
private static final int
private final List<String>

Constructor Summary

AccessConstructor and Description
pack-priv
StudyFetcher(List<SearchBasedFetcher> activeFetchers, List<String> searchQueries)

Method Summary

Modifier and TypeMethod and Description
public List<QueryResult>
crawl()

Each Map Entry contains the results for one search term for all libraries.

private QueryResult
getQueryResult(String searchQuery)

private List<FetchResult>

Returns:

Mapping of each fetcher by name and all their retrieved publications as a BibDatabase
performSearchOnQuery
(String
The query the search is performed for.
searchQuery
)

Queries all catalogs on the given searchQuery.

private FetchResult
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

activeFetchersback to summary
private final List<SearchBasedFetcher> activeFetchers
LOGGERback to summary
private static final Logger LOGGER
MAX_AMOUNT_OF_RESULTS_PER_FETCHERback to summary
private static final int MAX_AMOUNT_OF_RESULTS_PER_FETCHER
searchQueriesback to summary
private final List<String> searchQueries

Constructor Detail

StudyFetcherback to summary
pack-priv StudyFetcher(List<SearchBasedFetcher> activeFetchers, List<String> searchQueries) throws IllegalArgumentException

Method Detail

crawlback to summary
public List<QueryResult> crawl()

Each Map Entry contains the results for one search term for all libraries. Each entry of the internal map contains the results for a given library. If any library API is not available, its corresponding entry is missing from the internal map.

getQueryResultback to summary
private QueryResult getQueryResult(String searchQuery)
performSearchOnQueryback to summary
private List<FetchResult> performSearchOnQuery(String searchQuery)

Queries all catalogs on the given searchQuery.

Parameters
searchQuery:String

The query the search is performed for.

Returns:List<FetchResult>

Mapping of each fetcher by name and all their retrieved publications as a BibDatabase

performSearchOnQueryForFetcherback to summary
private FetchResult performSearchOnQueryForFetcher(String searchQuery, SearchBasedFetcher fetcher)