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

pack-priv Class StudyFetcher

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Map, .Optional, org.jabref.logic.importer.FetcherException, .PagedSearchBasedFetcher, .SearchBasedFetcher, org.jabref.model.database.BibDatabase, org.jabref.model.entry.BibEntry, org.jabref.model.study.FetchResult, .QueryResult, .StudyQuery, 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 final Map<String, Integer>
private final List<StudyQuery>

Constructor Summary

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

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 Optional<String>
private QueryResult
private List<BibEntry>
private List<BibEntry>
private List<FetchResult>

Returns:

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

Queries all catalogs on the given searchQuery.

private Optional<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
resultLimitsback to summary
private final Map<String, Integer> resultLimits
searchQueriesback to summary
private final List<StudyQuery> searchQueries

Constructor Detail

StudyFetcherback to summary
pack-priv StudyFetcher(List<SearchBasedFetcher> activeFetchers, List<StudyQuery> searchQueries, Map<String, Integer> resultLimits)

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.

getCatalogOverrideback to summary
private Optional<String> getCatalogOverride(StudyQuery searchQuery, SearchBasedFetcher fetcher)
getQueryResultback to summary
private QueryResult getQueryResult(StudyQuery searchQuery)
performNonPagedSearchback to summary
private List<BibEntry> performNonPagedSearch(SearchBasedFetcher fetcher, StudyQuery searchQuery) throws FetcherException
performPagedSearchback to summary
private List<BibEntry> performPagedSearch(PagedSearchBasedFetcher basedFetcher, StudyQuery searchQuery) throws FetcherException
performSearchOnQueryback to summary
private List<FetchResult> performSearchOnQuery(StudyQuery searchQuery)

Queries all catalogs on the given searchQuery.

Parameters
searchQuery:StudyQuery

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 Optional<FetchResult> performSearchOnQueryForFetcher(StudyQuery searchQuery, SearchBasedFetcher fetcher)