Interface SearchRequest<P extends SearchParameter>

All Superinterfaces:
Pageable
All Known Implementing Classes:
BaseSearchRequest, DatasetSearchRequest, DatasetSuggestRequest, EventPredicateSearchRequest, EventSearchRequest, FacetedSearchRequest, LiteratureSearchRequest, NameUsageSearchRequest, NameUsageSuggestRequest, OccurrencePredicateSearchRequest, OccurrenceSearchRequest

public interface SearchRequest<P extends SearchParameter> extends Pageable
Generic request class for search operations. This class contains a list of parameters, a list of desired facets and paging options (page size and offset).
  • Method Details

    • isMatchCase

      This flag enables the use of case-sensitive matches and aggregations on certain search parameters.

      Fields that support this feature are: occurrenceId, recordedBy, samplingProtocol, catalogNumber, collectionCode, institutionCode, eventId, parentEventId, waterBody, stateProvince, recordNumber, identifiedBy, organismId and locality.

      This is an experimental feature, and its implementation may change or be removed at any time.

      Be aware that this is not a per-field flag, all possible fields will match case sensitively.

    • isHighlight

      boolean isHighlight()
      Returns:
      true if highlighted search matches are requested
    • setHighlight

      void setHighlight(boolean highlight)
      Parameters:
      highlight - the highlight to set
    • isSpellCheck

      boolean isSpellCheck()
      Returns:
      true if spellCheck search is requested
    • setSpellCheck

      void setSpellCheck(boolean spellCheck)
      Parameters:
      spellCheck - the highlight to set
    • getSpellCheckCount

      Returns:
      max number of spell check suggestions requested
    • setSpellCheckCount

      void setSpellCheckCount(int spellCheckCount)
      Parameters:
      spellCheckCount - number of spell check suggestions
    • getQFields

      Defines whether to match against fields with scientific or vernacular names or both.
    • setQFields

    • getHighlightFields

      Defines the fields to be highlighted if highlighting is activated.
    • setHighlightFields

    • getParameters

      List of input parameters of the search operation. The parameters are handled as the parameter name and the string representation of its value.
      Returns:
      the list of parameters
    • setParameters

      void setParameters(Map<P,Set<String>> parameters)
      Sets the list of parameters.
    • getQ

      Query parameter.
      Returns:
      the q
    • setQ

      void setQ(String q)
      Parameters:
      q - the q to set
    • addParameter

      void addParameter(P parameter, Iterable<String> values)
      Adds the specified parameter.
      Parameters:
      parameter - parameter to add values for
      values - list of values of the parameter to add
    • addParameter

      void addParameter(P parameter, String... values)
      Adds the specified parameter.
      Parameters:
      parameter - parameter to add values for
      values - list of values of the parameter to add
    • addParameter

      void addParameter(P parameter, String value)
      Adds the specified parameter.
      Parameters:
      parameter - parameter to add values for
      value - value of the parameter to add
    • addParameter

      void addParameter(P parameter, long value)
      Adds the specified long parameter.
      Parameters:
      parameter - parameter to add values for
      value - value of the parameter to add
    • addParameter

      void addParameter(P parameter, int value)
      Adds the specified int parameter.
      Parameters:
      parameter - parameter to add values for
      value - value of the parameter to add
    • addParameter

      void addParameter(P parameter, double value)
      Adds the specified double parameter.
      Parameters:
      parameter - parameter to add values for
      value - value of the parameter to add
    • addParameter

      void addParameter(P parameter, boolean value)
      Adds the specified boolean parameter.
      Parameters:
      parameter - parameter to add values for
      value - value of the parameter to add
    • addParameter

      void addParameter(P parameter, Enum<?> value)
      Adds the specified parameter.
      Parameters:
      parameter - parameter to add values for
      value - enum value of the parameter to add
    • addParameter

      void addParameter(P parameter, Date value)
      Adds the specified date parameter as an ISO date.
      Parameters:
      parameter - parameter to add date for
      value - date value of the parameter to add
    • addParameter

      void addParameter(P parameter, IsoDateInterval value)
      Adds the specified date parameter as an ISO date interval.
      Parameters:
      parameter - parameter to add date interval for
      value - date value of the parameter to add
    • copyPagingValues

      void copyPagingValues(Pageable pageable)
      Utility method to copy paging values.