Package io.goobi.viewer.model.search
Class AdvancedSearchFieldConfiguration
java.lang.Object
io.goobi.viewer.model.search.AdvancedSearchFieldConfiguration
Configuration element for advanced search fields.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetField()getLabel()booleanbooleanbooleanbooleanbooleanisRange()booleanbooleansetAllowMultipleItems(boolean allowMultipleItems) setDatepicker(boolean datepicker) setDisabled(boolean disabled) setDisplaySelectItemsThreshold(int displaySelectItemsThreshold) setHierarchical(boolean hierarchical) setPreselectValue(String preselectValue) setRange(boolean range) setReplaceRegex(String replaceRegex) setReplaceWith(String replaceWith) setSelectType(String selectType) setUntokenizeForPhraseSearch(boolean untokenizeForPhraseSearch) setVisible(boolean visible)
-
Field Details
-
DEFAULT_THRESHOLD
public static final int DEFAULT_THRESHOLD- See Also:
-
SELECT_TYPE_BADGES
- See Also:
-
SELECT_TYPE_CHECKBOXES
- See Also:
-
SELECT_TYPE_DROPDOWN
- See Also:
-
-
Constructor Details
-
AdvancedSearchFieldConfiguration
- Parameters:
field- Solr field name or separate placeholder
-
-
Method Details
-
getField
-
getLabel
- Returns:
- the display label for this search field configuration, or the field name if no label is set
-
setLabel
- Parameters:
label- the display label for this search field configuration- Returns:
- this object
-
isHierarchical
public boolean isHierarchical() -
setHierarchical
- Parameters:
hierarchical- true if the field should be displayed hierarchically; false otherwise- Returns:
- this object
-
isRange
public boolean isRange() -
setRange
- Parameters:
range- true if the field should be displayed as a range input; false otherwise- Returns:
- this object
-
isDatepicker
public boolean isDatepicker() -
setDatepicker
- Parameters:
datepicker- true if the field should use a datepicker UI control; false otherwise- Returns:
- this object
-
isUntokenizeForPhraseSearch
public boolean isUntokenizeForPhraseSearch() -
setUntokenizeForPhraseSearch
public AdvancedSearchFieldConfiguration setUntokenizeForPhraseSearch(boolean untokenizeForPhraseSearch) - Parameters:
untokenizeForPhraseSearch- true if the field value should be untokenized when used in phrase search queries; false otherwise- Returns:
- this object
-
isDisabled
public boolean isDisabled() -
setDisabled
- Parameters:
disabled- true if this search field configuration should be disabled; false otherwise- Returns:
- this object
-
isVisible
public boolean isVisible() -
isAllowMultipleItems
public boolean isAllowMultipleItems() -
setAllowMultipleItems
- Parameters:
allowMultipleItems- true if multiple search items may be added for this field; false otherwise- Returns:
- this
-
setVisible
- Parameters:
visible- true if this field configuration should be visible to the user; false otherwise- Returns:
- this
-
getDisplaySelectItemsThreshold
public int getDisplaySelectItemsThreshold() -
setDisplaySelectItemsThreshold
public AdvancedSearchFieldConfiguration setDisplaySelectItemsThreshold(int displaySelectItemsThreshold) - Parameters:
displaySelectItemsThreshold- maximum number of available values below which a select widget is displayed instead of a text input- Returns:
- this
-
getSelectType
-
setSelectType
- Parameters:
selectType- the type of select widget to use for this field (e.g. dropdown, checkboxes)- Returns:
- this
-
getReplaceRegex
-
setReplaceRegex
- Parameters:
replaceRegex- the regular expression pattern applied to field values before display- Returns:
- this
-
getReplaceWith
-
setReplaceWith
- Parameters:
replaceWith- the replacement string substituted for matches of the replaceRegex pattern- Returns:
- this
-
getPreselectValue
-
setPreselectValue
- Parameters:
preselectValue- the value that should be pre-selected in the search field by default- Returns:
- this
-