Class SearchQueryItem

java.lang.Object
io.goobi.viewer.model.search.SearchQueryItem
All Implemented Interfaces:
Serializable

public class SearchQueryItem extends Object implements Serializable
Field/operator/value tuple for the advanced search.
See Also:
  • Constructor Details

    • SearchQueryItem

      public SearchQueryItem()
      Zero-argument constructor.
    • SearchQueryItem

      public SearchQueryItem(String template)
      Parameters:
      template -
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getAvailableOperators

      public List<SearchQueryItem.SearchItemOperator> getAvailableOperators()

      getAvailableOperators.

      Returns:
      a List object.
    • getSelectItems

      getSelectItems.

      Parameters:
      language - a String object.
      Returns:
      a List object.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
    • getCheckboxSelectables

      public List<CheckboxSelectable<String>> getCheckboxSelectables(String language, String... additionalValues) throws DAOException, PresentationException, IndexUnreachableException
      Parameters:
      language -
      additionalValues - 0-n additional, manually added values
      Returns:
      List<CheckboxSelectable<String>>
      Throws:
      DAOException
      PresentationException
      IndexUnreachableException
    • getCustomSelectableItem

      public CheckboxSelectable<String> getCustomSelectableItem(String value)
    • reset

      public void reset()

      reset.

    • isHierarchical

      public boolean isHierarchical()

      isHierarchical.

      Returns:
      true or false
    • isRange

      public boolean isRange()

      isRange.

      Returns:
      true or false
    • isUntokenizeForPhraseSearch

      public boolean isUntokenizeForPhraseSearch()

      isUntokenizeForPhraseSearch.

      Returns:
      true or false
    • isAllFields

      public boolean isAllFields()
      Returns:
      true if selected field is "all fields"; false otherwise
    • getDisplaySelectItemsThreshold

      public int getDisplaySelectItemsThreshold()
      Returns:
      Configured threshold for displayed select items
    • getSelectType

      public String getSelectType()
      Returns:
      the selectType
    • getReplaceRegex

      public String getReplaceRegex()
      Returns:
      the replaceRegex
    • getReplaceWith

      public String getReplaceWith()
      Returns:
      the replaceWith
    • getLabel

      public String getLabel()
      Returns:
      the label
    • setLabel

      public SearchQueryItem setLabel(String label)
      Parameters:
      label - the label to set
      Returns:
      this
    • getField

      public String getField()

      Getter for the field field.

      Returns:
      the field
    • setField

      public void setField(String field)

      Setter for the field field.

      Parameters:
      field - the field to set
    • getOperator

      public SearchQueryItem.SearchItemOperator getOperator()

      Getter for the field operator.

      Returns:
      the operator
    • setOperator

      public void setOperator(SearchQueryItem.SearchItemOperator operator)

      Setter for the field operator.

      Parameters:
      operator - the operator to set
    • getValues

      public List<String> getValues()
      Returns:
      the values
    • setValues

      public void setValues(List<String> values)
      Parameters:
      values - the values to set
    • getValue

      public String getValue()

      Getter for the field value.

      Returns:
      the value
    • setValue

      public void setValue(String value)

      Setter for the field value.

      Parameters:
      value - the value to set
    • isValueSet

      public boolean isValueSet(String value)
      Parameters:
      value -
      Returns:
      true if values contains given value; false otherwise
    • toggleValue

      public void toggleValue(String value)
      Sets/unsets the given value in the item, depending on the current status.
      Parameters:
      value - Value to set/unset
    • getValue2

      public String getValue2()
      Returns:
      the value2
    • setValue2

      public void setValue2(String value2)
      Parameters:
      value2 - the value2 to set
    • isDisplaySelectItems

      public boolean isDisplaySelectItems()

      isDisplaySelectItems.

      Returns:
      a boolean.
    • selectOneMenuListener

      public void selectOneMenuListener(javax.faces.event.ValueChangeEvent ev)
      This is called after setField, so no point in calling toggleDisplaySelectItems here.
      Parameters:
      ev - a ValueChangeEvent object.
    • toggleDisplaySelectItems

      protected void toggleDisplaySelectItems()

      toggleDisplaySelectItems.

    • generateQuery

      public String generateQuery(Set<String> searchTerms, boolean aggregateHits, boolean allowFuzzySearch)
      Generates the advanced query part for this item.
      Parameters:
      searchTerms - a Set object.
      aggregateHits - a boolean.
      allowFuzzySearch - If true, search terms will be augmented by fuzzy search tokens
      Returns:
      a String object.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProximitySearchDistance

      public int getProximitySearchDistance()