Interface SearchServiceCriterionDefinition<T>

Type Parameters:
T - Type of the criterion value
All Superinterfaces:
Comparable<ModelItem>, CriterionDefinition<T>, ElementDefinition<T>, Labelable, ModelItem, ModifiableLabelable
All Known Implementing Classes:
AbstractSearchServiceCriterionDefinition, ContentReferencingSearchServiceCriterionDefinition, DegreeUniversityCriterionDefinition, DublinCoreCriterionDefinition, PageCriterionDefinition, PageTitleCriterionDefinition, ReferencingSearchServiceCriterionDefinition, ResourceFormatCriterionDefinition, SiteCriterionDefinition, SitemapCriterionDefinition, TagCriterionDefinition, TitleOrWordingCriterionDefinition, WordingCriterionDefinition

A potential criterion definition proposed to the creator of an instance of search service.
  • Method Details

    • getContextPrefixLabels

      Gets the prefix labels, sometimes useful (such as for displaying all criterion definitions) for grouping information.
      Returns:
      The prefix labels (can be empty)
    • getSearchable

      Gets the (Searchable) the criterion belongs to.
      Important: if the criterion definition is brought by a specific Searchable, then this searchable must be returned in a non-empty Optional. If the criterion definition is brought by SearchServiceCommonImpls, then an Optional.empty() must be returned.
      Returns:
      the (Searchable) the criterion belongs to.
    • setSearchable

      void setSearchable(Searchable searchable)
      Sets the (Searchable) the criterion belongs to.
      Parameters:
      searchable - the Searchable to set
    • isEnumerated

      boolean isEnumerated()
      Determines if this criterion definition is enumerated
      Returns:
      true if this criterion definition is enumerated, false otherwise
    • getRestrictedEnumerator

      Gets the RestrictedEnumerator used by the final user to fill the criterion. Values of this Enumerator can be restricted according to entered values during service configuration
      Parameters:
      contextualParameters - The contextual parameters
      Returns:
      the enumerated entries
    • convertRestrictedValue

      default T convertRestrictedValue(Object value)
      Converts the given value for RestrictedEnumerator
      Parameters:
      value - the value to convert
      Returns:
      the converted value
    • getEmptyValueQuery

      Query getEmptyValueQuery(String language, Map<String,Object> contextualParameters)
      Gets the query for testing the value is empty
      Parameters:
      language - The current search language.
      contextualParameters - the search contextual parameters.
      Returns:
      the query for testing the value is empty
    • facetValueToSAX

      default String facetValueToSAX(String value, Map<String,Object> contextualParameters)
      Retrieves the facet value to use for SAX events
      Parameters:
      value - the facet value
      contextualParameters - the contextual parameters
      Returns:
      the facet value to use for SAX events