Class NameUsageSearchRequest
- 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<NameUsageSearchParameter>
-
- org.gbif.api.model.checklistbank.search.NameUsageSearchRequest
-
- All Implemented Interfaces:
Pageable
public class NameUsageSearchRequest extends FacetedSearchRequest<NameUsageSearchParameter>
A name usage specific search request with convenience methods to add enum based search filters. By default the query q is send to all available query fields. Highlighting by default works for descriptions and vernacular names - if turned on.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NameUsageSearchRequest.NameUsageQueryField
-
Nested classes/interfaces inherited from class org.gbif.api.model.common.search.FacetedSearchRequest
FacetedSearchRequest.FacetParameters
-
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 NameUsageSearchRequest()
NameUsageSearchRequest(long offset, int limit)
NameUsageSearchRequest(Pageable page)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChecklistFilter(UUID datasetKey)
void
addExtinctFilter(boolean isExtinct)
void
addHabitatFilter(Habitat habitat)
void
addHigherTaxonFilter(int taxonKey)
void
addIssueFilter(NameUsageIssue issue)
void
addOriginFilter(Origin origin)
void
addRankFilter(Rank rank)
void
addTaxonomicStatusFilter(NomenclaturalStatus nomenclaturalStatus)
void
addTaxonomicStatusFilter(TaxonomicStatus status)
void
addThreatStatusFilter(ThreatStatus threat)
Integer
getHighlightContext()
boolean
isExtended()
Allows to request an extended search object with the larger list properties: habitats nomenclaturalStatus threatStatuses descriptions vernacularNames If extended=false and highlighting is activated, the highlighted matches will still be added to the extended properties.void
setExtended(boolean extended)
void
setHighlightContext(Integer highlightContext)
-
Methods inherited from class org.gbif.api.model.common.search.FacetedSearchRequest
addFacetPage, addFacets, getFacetLimit, getFacetMinCount, getFacetOffset, getFacetPage, getFacetPages, getFacets, isMultiSelectFacets, setFacetLimit, setFacetMinCount, setFacetOffset, setFacetPages, setFacets, setMultiSelectFacets
-
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
-
NameUsageSearchRequest
public NameUsageSearchRequest()
-
NameUsageSearchRequest
public NameUsageSearchRequest(Pageable page)
-
NameUsageSearchRequest
public NameUsageSearchRequest(long offset, int limit)
-
-
Method Detail
-
getHighlightContext
public Integer getHighlightContext()
- Returns:
- the number of characters of the context to show for the highlighted match, including the match itself.
-
setHighlightContext
public void setHighlightContext(Integer highlightContext)
-
isExtended
public boolean isExtended()
Allows to request an extended search object with the larger list properties:- habitats
- nomenclaturalStatus
- threatStatuses
- descriptions
- vernacularNames
- Returns:
- if true request the extended search model
-
setExtended
public void setExtended(boolean extended)
-
addChecklistFilter
public void addChecklistFilter(UUID datasetKey)
-
addExtinctFilter
public void addExtinctFilter(boolean isExtinct)
-
addHigherTaxonFilter
public void addHigherTaxonFilter(int taxonKey)
-
addHabitatFilter
public void addHabitatFilter(Habitat habitat)
-
addRankFilter
public void addRankFilter(Rank rank)
-
addTaxonomicStatusFilter
public void addTaxonomicStatusFilter(TaxonomicStatus status)
-
addTaxonomicStatusFilter
public void addTaxonomicStatusFilter(NomenclaturalStatus nomenclaturalStatus)
-
addThreatStatusFilter
public void addThreatStatusFilter(ThreatStatus threat)
-
addIssueFilter
public void addIssueFilter(NameUsageIssue issue)
-
addOriginFilter
public void addOriginFilter(Origin origin)
-
-