Package de.cxp.ocs.config
Class FacetConfiguration.FacetConfig
- java.lang.Object
-
- de.cxp.ocs.config.FacetConfiguration.FacetConfig
-
- Enclosing class:
- FacetConfiguration
public static class FacetConfiguration.FacetConfig extends Object
-
-
Constructor Summary
Constructors Constructor Description FacetConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FacetConfiguration.FacetConfigsetExcludeFromFacetLimit(boolean excludeFromFacetLimit)If set to true, this facet will always be shown and not removed because of facet limit.FacetConfiguration.FacetConfigsetLabel(String label)Label of that facetFacetConfiguration.FacetConfigsetMetaData(Map<String,Object> metaData)Optional map that is returned with that facet.FacetConfiguration.FacetConfigsetMultiSelect(boolean isMultiSelect)Set to true if it should be possible to select several different values of the same facet.FacetConfiguration.FacetConfigsetOptimalValueCount(int optimalValueCount)Primary used for numeric facets to build according number of value ranges.FacetConfiguration.FacetConfigsetOrder(byte order)Optional index, to put the facets in a consistent order.FacetConfiguration.FacetConfigsetShowUnselectedOptions(boolean showUnselectedOptions)Set to true if all options should be shown after filtering on one of the options of the same facet.FacetConfiguration.FacetConfigsetSourceField(String sourceField)Required: Set name of data field that is configured with these config.FacetConfiguration.FacetConfigsetType(String type)Optional type that relates to the available FacetCreators.
-
-
-
Method Detail
-
setLabel
public FacetConfiguration.FacetConfig setLabel(String label)
Label of that facet- Parameters:
label-- Returns:
- self
-
setSourceField
public FacetConfiguration.FacetConfig setSourceField(String sourceField)
Required: Set name of data field that is configured with these config.- Parameters:
sourceField-- Returns:
- self
-
setType
public FacetConfiguration.FacetConfig setType(String type)
Optional type that relates to the available FacetCreators. If not set, it uses the default type of the related field. From some field-types different facet types can be generated:- numeric fields generate "interval" facets per default, but can be set to "range"
- TODO: custom facet creators can support their own facet types
- Parameters:
type-- Returns:
- self
-
setMetaData
public FacetConfiguration.FacetConfig setMetaData(Map<String,Object> metaData)
Optional map that is returned with that facet. Can be used for additional data you need with the facet for visualizing.- Parameters:
metaData-- Returns:
- self
-
setOptimalValueCount
public FacetConfiguration.FacetConfig setOptimalValueCount(int optimalValueCount)
Primary used for numeric facets to build according number of value ranges. Can also be used for advanced displaying term facets.- Parameters:
optimalValueCount-- Returns:
- self
-
setShowUnselectedOptions
public FacetConfiguration.FacetConfig setShowUnselectedOptions(boolean showUnselectedOptions)
Set to true if all options should be shown after filtering on one of the options of the same facet.- Parameters:
showUnselectedOptions-- Returns:
- self
-
setMultiSelect
public FacetConfiguration.FacetConfig setMultiSelect(boolean isMultiSelect)
Set to true if it should be possible to select several different values of the same facet.- Parameters:
isMultiSelect-- Returns:
- self
-
setOrder
public FacetConfiguration.FacetConfig setOrder(byte order)
Optional index, to put the facets in a consistent order.- Parameters:
order-- Returns:
- self
-
setExcludeFromFacetLimit
public FacetConfiguration.FacetConfig setExcludeFromFacetLimit(boolean excludeFromFacetLimit)
If set to true, this facet will always be shown and not removed because of facet limit.- Parameters:
excludeFromFacetLimit-- Returns:
- self
-
-