Class BrowsingMenuFieldConfig
java.lang.Object
io.goobi.viewer.model.termbrowsing.BrowsingMenuFieldConfig
- All Implemented Interfaces:
Serializable
Configuration for a single field entry in the alphabetical browsing menu, specifying the Solr field and display options.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBrowsingMenuFieldConfig(String field, String sortField, String filterQuery) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetField()Getter for the fieldfield.getFieldForLanguage(String language) Getter for the fieldfilterQueries.Getter for the fieldsortField.booleanbooleanbooleanbooleansetAlwaysApplyFilter(boolean alwaysApplyFilter) setRecordsAndAnchorsOnly(boolean recordsAndAnchorsOnly) setSkipInWidget(boolean skipInWidget) setTranslate(boolean translate)
-
Constructor Details
-
BrowsingMenuFieldConfig
Constructor.- Parameters:
field- Solr field name to browse.sortField- Solr field used for sorting the terms.filterQuery- optional Solr filter query to restrict results.
-
-
Method Details
-
getField
Getter for the fieldfield.- Returns:
- the Solr field name used for term browsing
-
getFieldForLanguage
- Parameters:
language- the language code to substitute into the field name- Returns:
- Language specific variant of field if it contains a placeholder; otherwise unaltered field
-
getSortField
Getter for the fieldsortField.- Returns:
- the Solr field used for sorting browse terms
-
getFilterQueries
Getter for the fieldfilterQueries.- Returns:
- the list of Solr filter queries applied when browsing this field
-
isTranslate
public boolean isTranslate() -
setTranslate
- Parameters:
translate- true if browse term values should be translated via message keys- Returns:
- this
-
isAlwaysApplyFilter
public boolean isAlwaysApplyFilter() -
setAlwaysApplyFilter
- Parameters:
alwaysApplyFilter- true if a filter query should always be applied when browsing this field- Returns:
- this
-
isSkipInWidget
public boolean isSkipInWidget() -
setSkipInWidget
- Parameters:
skipInWidget- true if this field should be excluded from the browse widget display- Returns:
- this;
-
isRecordsAndAnchorsOnly
public boolean isRecordsAndAnchorsOnly()- Returns:
- true if filterQueries contains SearchHelper.ALL_RECORDS_QUERY; false otherwise
-
setRecordsAndAnchorsOnly
- Parameters:
recordsAndAnchorsOnly- if true, adds a filter query restricting results to records and anchors only- Returns:
- this
-