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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
generateQuery
(Set<String> searchTerms, boolean aggregateHits, boolean allowFuzzySearch) Generates the advanced query part for this item.getAvailableOperators.getCheckboxSelectables
(String language, String... additionalValues) getCustomSelectableItem
(String value) int
getField()
Getter for the fieldfield
.getLabel()
Getter for the fieldoperator
.int
getSelectItems
(String language) getSelectItems.getValue()
Getter for the fieldvalue
.int
hashCode()
boolean
boolean
isDisplaySelectItems.boolean
isHierarchical.boolean
isRange()
isRange.boolean
isUntokenizeForPhraseSearch.boolean
isValueSet
(String value) void
reset()
reset.void
selectOneMenuListener
(javax.faces.event.ValueChangeEvent ev) This is called aftersetField
, so no point in callingtoggleDisplaySelectItems
here.void
Setter for the fieldfield
.void
Setter for the fieldoperator
.void
Setter for the fieldvalue
.void
void
protected void
toggleDisplaySelectItems.void
toggleValue
(String value) Sets/unsets the given value in the item, depending on the current status.toString()
-
Constructor Details
-
SearchQueryItem
public SearchQueryItem()Zero-argument constructor. -
SearchQueryItem
- Parameters:
template
-
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getAvailableOperators
getAvailableOperators.
- Returns:
- a
List
object.
-
getSelectItems
public List<StringPair> getSelectItems(String language) throws PresentationException, IndexUnreachableException, DAOException getSelectItems.
- Parameters:
language
- aString
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
-
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
- 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(javax.faces.event.ValueChangeEvent ev) This is called aftersetField
, so no point in callingtoggleDisplaySelectItems
here.- Parameters:
ev
- aValueChangeEvent
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. -
toString
-
getProximitySearchDistance
public int getProximitySearchDistance()
-