Package org.gbif.api.model.common.search
Class FacetedSearchRequest<P extends SearchParameter>
- java.lang.Object
-
- org.gbif.api.model.common.paging.PageableBase
-
- org.gbif.api.model.common.search.SearchRequest<P>
-
- org.gbif.api.model.common.search.FacetedSearchRequest<P>
-
- All Implemented Interfaces:
Pageable
- Direct Known Subclasses:
DatasetSearchRequest
,LiteratureSearchRequest
,NameUsageSearchRequest
,OccurrenceSearchRequest
public class FacetedSearchRequest<P extends SearchParameter> extends SearchRequest<P>
Generic request class for search operations requesting facets. It extends a search request with a list of desired facets and optional settings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FacetedSearchRequest.FacetParameters
Annotation to document the facet query parameters.-
Nested classes/interfaces inherited from class org.gbif.api.model.common.search.SearchRequest
SearchRequest.QueryField
-
Nested classes/interfaces inherited from interface org.gbif.api.model.common.paging.Pageable
Pageable.OffsetLimitParameters
-
-
Constructor Summary
Constructors Constructor Description FacetedSearchRequest()
FacetedSearchRequest(long offset, int limit)
FacetedSearchRequest(Pageable page)
FacetedSearchRequest(SearchRequest<P> searchRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFacetPage(P parameter, int facetOffset, int facetLimit)
Sets the paging setting of facet parameter.void
addFacets(P... facets)
Integer
getFacetLimit()
Page size of the facet request.Integer
getFacetMinCount()
Min count of facet to return, if the facet count is less than this number the facet won't be included.Integer
getFacetOffset()
Offset of the facet request.Pageable
getFacetPage(P parameter)
Gets the paging configuration of a facet parameter.Map<P,Pageable>
getFacetPages()
Holds the paging configuration for each requested facet.Set<P>
getFacets()
Gets the list of requested facets by the search operation.boolean
isMultiSelectFacets()
void
setFacetLimit(Integer facetLimit)
void
setFacetMinCount(Integer facetMinCount)
void
setFacetOffset(Integer facetOffset)
void
setFacetPages(Map<P,Pageable> facetPages)
void
setFacets(Set<P> facets)
Sets the list of facets.void
setMultiSelectFacets(boolean multiSelectFacets)
-
Methods inherited from class org.gbif.api.model.common.search.SearchRequest
addParameter, addParameter, addParameter, addParameter, addParameter, addParameter, addParameter, addParameter, addParameter, addParameter, getHighlightFields, getParameters, getQ, getQFields, getSpellCheckCount, isHighlight, isSpellCheck, setHighlight, setHighlightFields, setParameters, setQ, setQFields, setSpellCheck, setSpellCheckCount, toString
-
Methods inherited from class org.gbif.api.model.common.paging.PageableBase
addOffset, copyPagingValues, equals, getLimit, getOffset, hashCode, setLimit, setOffset
-
-
-
-
Constructor Detail
-
FacetedSearchRequest
public FacetedSearchRequest()
-
FacetedSearchRequest
public FacetedSearchRequest(Pageable page)
-
FacetedSearchRequest
public FacetedSearchRequest(SearchRequest<P> searchRequest)
-
FacetedSearchRequest
public FacetedSearchRequest(long offset, int limit)
-
-
Method Detail
-
getFacetMinCount
public Integer getFacetMinCount()
Min count of facet to return, if the facet count is less than this number the facet won't be included.
-
setFacetMinCount
public void setFacetMinCount(Integer facetMinCount)
-
getFacets
public Set<P> getFacets()
Gets the list of requested facets by the search operation. The facets are a list of search parameters.
-
isMultiSelectFacets
public boolean isMultiSelectFacets()
- Returns:
- the multiSelectFacets
-
setMultiSelectFacets
public void setMultiSelectFacets(boolean multiSelectFacets)
- Parameters:
multiSelectFacets
- the multiSelectFacets to set
-
getFacetLimit
public Integer getFacetLimit()
Page size of the facet request.
-
setFacetLimit
public void setFacetLimit(Integer facetLimit)
-
getFacetPages
public Map<P,Pageable> getFacetPages()
Holds the paging configuration for each requested facet.
-
setFacetPages
public void setFacetPages(Map<P,Pageable> facetPages)
-
addFacetPage
public void addFacetPage(P parameter, int facetOffset, int facetLimit)
Sets the paging setting of facet parameter.
-
getFacetPage
public Pageable getFacetPage(P parameter)
Gets the paging configuration of a facet parameter.
-
getFacetOffset
public Integer getFacetOffset()
Offset of the facet request.
-
setFacetOffset
public void setFacetOffset(Integer facetOffset)
-
-