Class FacetFieldSidebarWidget
java.lang.Object
io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
io.goobi.viewer.model.cms.widgets.FacetFieldSidebarWidget
- All Implemented Interfaces:
IPolyglott,Serializable
A subtype of
CustomSidebarWidget to display a list of possible values of a given SOLR field and link to a search listing of items with a
specific value.- Author:
- Florian Alpers
- See Also:
-
Field Summary
Fields inherited from class io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
id -
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructor.Cloning constructor. -
Method Summary
Modifier and TypeMethodDescriptionContains the SOLR field holding the values to list.An additional SOLR query.intgetTitle()Override default title to always show the selected facetField.getType()Return the type of this custom sidebar widget.voidsetFacetField(String facetField) Sets the SOLR field for which to list values.voidsetFilterQuery(String filterQuery) Set the value ofgetFilterQuery().voidsetNumEntries(int numEntries) Sets the number of field values displayed in the widget.Methods inherited from class io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
clone, getAdminBackendUrl, getDescription, getId, getSelectedLocale, getShortDescription, getStyleClass, isCollapsed, isComplete, isEmpty, isHasShortDescription, isValid, setCollapsed, setId, setSelectedLocale, setStyleClass, setTitleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Constructor Details
-
FacetFieldSidebarWidget
public FacetFieldSidebarWidget()Empty default constructor. -
FacetFieldSidebarWidget
Cloning constructor.- Parameters:
o- the widget to copy from
-
-
Method Details
-
getFacetField
Contains the SOLR field holding the values to list.- Returns:
- the name of the Solr field whose values are listed in this widget
-
setFacetField
Sets the SOLR field for which to list values.- Parameters:
facetField- the name of the Solr field to facet on
-
getFilterQuery
An additional SOLR query. If this is not empty, only values of thegetFacetField()are listed that are contained in documents meeting this query. This is also true for the linked result lists- Returns:
- the additional Solr filter query, or an empty string if no filter is set
-
getCombinedFilterQuery
-
setFilterQuery
Set the value ofgetFilterQuery().- Parameters:
filterQuery- an additional Solr query to restrict which field values are shown
-
getType
Description copied from class:CustomSidebarWidgetReturn the type of this custom sidebar widget. Must be implemented by subclasses ofCustomSidebarWidget- Overrides:
getTypein classCustomSidebarWidget- Returns:
CustomWidgetType
-
getNumEntries
public int getNumEntries()- Returns:
- the number of field values displayed in the widget
-
setNumEntries
public void setNumEntries(int numEntries) Sets the number of field values displayed in the widget.- Parameters:
numEntries- the number of field values to display
-
getTitle
Override default title to always show the selected facetField.- Overrides:
getTitlein classCustomSidebarWidget- Returns:
- a
TranslatedTextbuilt from the translations of the configured facet field name
-