Package io.goobi.viewer.model.search
Class SearchQueryItem
java.lang.Object
io.goobi.viewer.model.search.SearchQueryItem
- All Implemented Interfaces:
Serializable
Field/operator/value tuple for the advanced search.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangenerateQuery(Set<String> searchTerms, boolean aggregateHits, boolean allowFuzzySearch) Generates the advanced query part for this item.getAvailableOperators.getCheckboxSelectables(String language, String... additionalValues) getCustomSelectableItem(String value) intgetField()Getter for the fieldfield.getLabel()Getter for the fieldoperator.intgetSelectItems(String language) getSelectItems.getValue()Getter for the fieldvalue.inthashCode()booleanDeprecated.booleanbooleanbooleanbooleanisDisplaySelectItems.booleanisHierarchical.booleanisRange()isRange.booleanbooleanbooleanbooleanisUntokenizeForPhraseSearch.booleanisValueSet(String value) voidreset()reset.voidselectOneMenuListener(jakarta.faces.event.ValueChangeEvent ev) This is called aftersetField, so no point in callingtoggleDisplaySelectItemshere.setDisplayAddNewItemButton(boolean displayAddNewItemButton) voidSetter for the fieldfield.voidSetter for the fieldoperator.voidsetPreselectValue(String preselectValue) setSameFieldGroupCopy(boolean sameFieldGroupCopy) setSameFieldGroupEnd(boolean sameFieldGroupEnd) setSameFieldGroupStart(boolean sameFieldGroupStart) voidSetter for the fieldvalue.voidvoidprotected voidtoggleDisplaySelectItems.voidtoggleValue(String value) Sets/unsets the given value in the item, depending on the current status.
-
Constructor Details
-
SearchQueryItem
public SearchQueryItem()Zero-argument constructor. -
SearchQueryItem
- Parameters:
template-
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getAvailableOperators
getAvailableOperators.
- Returns:
- a
Listobject.
-
getSelectItems
public List<StringPair> getSelectItems(String language) throws PresentationException, IndexUnreachableException, DAOException getSelectItems.
- Parameters:
language- aStringobject.- Returns:
- a
Listobject. - 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:
DAOExceptionPresentationExceptionIndexUnreachableException
-
getCustomSelectableItem
-
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
-
isAllowMultipleItems
public boolean isAllowMultipleItems()- Returns:
- a boolean
-
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
- Returns:
- the selectType
-
getReplaceRegex
- Returns:
- the replaceRegex
-
getReplaceWith
- Returns:
- the replaceWith
-
getLabel
- Returns:
- the label
-
setLabel
- Parameters:
label- the label to set- Returns:
- this
-
getField
Getter for the field
field.- Returns:
- the field
-
setField
Setter for the field
field.- Parameters:
field- the field to set
-
getOperator
Getter for the field
operator.- Returns:
- the operator
-
setOperator
Setter for the field
operator.- Parameters:
operator- the operator to set
-
getValues
- Returns:
- the values
-
setValues
- Parameters:
values- the values to set
-
getValue
Getter for the field
value.- Returns:
- the value
-
setValue
Setter for the field
value.- Parameters:
value- the value to set
-
isValueSet
- Parameters:
value-- Returns:
- true if values contains given value; false otherwise
-
toggleValue
Sets/unsets the given value in the item, depending on the current status.- Parameters:
value- Value to set/unset
-
getValue2
- Returns:
- the value2
-
setValue2
- Parameters:
value2- the value2 to set
-
isDisplaySelectItems
public boolean isDisplaySelectItems()isDisplaySelectItems.
- Returns:
- a boolean.
-
selectOneMenuListener
public void selectOneMenuListener(jakarta.faces.event.ValueChangeEvent ev) This is called aftersetField, so no point in callingtoggleDisplaySelectItemshere.- Parameters:
ev- aValueChangeEventobject.
-
toggleDisplaySelectItems
protected void toggleDisplaySelectItems()toggleDisplaySelectItems.
-
generateQuery
public String generateQuery(Set<String> searchTerms, boolean aggregateHits, boolean allowFuzzySearch) Generates the advanced query part for this item. -
getProximitySearchDistance
public int getProximitySearchDistance() -
getPreselectValue
- Returns:
- the preselectValue
-
setPreselectValue
- Parameters:
preselectValue- the preselectValue to set
-
isDisplayAddNewItemButton
public boolean isDisplayAddNewItemButton()- Returns:
- the displayAddNewItemButton
-
setDisplayAddNewItemButton
- Parameters:
displayAddNewItemButton- the displayAddNewItemButton to set- Returns:
- this
-
isSameFieldGroupStart
public boolean isSameFieldGroupStart()- Returns:
- the sameFieldGroupStart
-
setSameFieldGroupStart
- Parameters:
sameFieldGroupStart- the sameFieldGroupStart to set- Returns:
- this
-
isAdditionalCopy
Deprecated. -
isSameFieldGroupCopy
public boolean isSameFieldGroupCopy()- Returns:
- the sameFieldGroupCopy
-
setSameFieldGroupCopy
- Parameters:
sameFieldGroupCopy- the sameFieldGroupCopy to set- Returns:
- this
-
isSameFieldGroupEnd
public boolean isSameFieldGroupEnd()- Returns:
- the sameFieldGroupEnd
-
setSameFieldGroupEnd
- Parameters:
sameFieldGroupEnd- the sameFieldGroupEnd to set- Returns:
- this
-