Class Facet.Category
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.Facet.Category
-
- Enclosing class:
- Facet
public static class Facet.Category extends java.lang.ObjectCategory of a facet, such as "Location, based on the metadata class X".
Correspond to the definition of a category, not the value itself.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Facet.Category>categoriesSub categories, in case of a hierarchical definition.private java.lang.StringlabelLabel for this category.private java.lang.StringqueryStringParamNameName of the query string parameter for this category.private java.util.List<Facet.CategoryValue>valuesValues for this category.
-
Constructor Summary
Constructors Constructor Description Category(java.lang.String label, java.lang.String queryStringParamName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Facet.CategoryfindDeepest(java.util.List<java.lang.String> categoryParamNames)Recursively find the deepest category.java.util.List<Facet.Category>getCategories()Sub categories, in case of a hierarchical definition.java.lang.StringgetLabel()Label for this category.java.lang.StringgetQueryStringParamName()Name of the query string parameter for this category.java.util.List<Facet.CategoryValue>getValues()Values for this category.booleanhasValues()Recursively check if this category or any of its sub-categories has values.voidsetLabel(java.lang.String label)Label for this category.voidsetQueryStringParamName(java.lang.String queryStringParamName)Name of the query string parameter for this category.java.lang.StringtoString()
-
-
-
Field Detail
-
label
private java.lang.String label
Label for this category.
-
queryStringParamName
private java.lang.String queryStringParamName
Name of the query string parameter for this category. (Ex:f.Location|X).
-
values
private final java.util.List<Facet.CategoryValue> values
Values for this category.
Either a single one for item type
CategoryDefinitions or multiple for fill typeCategoryDefinitions.
-
categories
private final java.util.List<Facet.Category> categories
Sub categories, in case of a hierarchical definition.
-
-
Method Detail
-
hasValues
public boolean hasValues()
Recursively check if this category or any of its sub-categories has values.- Returns:
- true if this category or a nested one has at least one value.
-
findDeepest
public Facet.Category findDeepest(java.util.List<java.lang.String> categoryParamNames)
Recursively find the deepest category.- Parameters:
categoryParamNames-- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getLabel
public java.lang.String getLabel()
Label for this category.
-
setLabel
public void setLabel(java.lang.String label)
Label for this category.
-
getQueryStringParamName
public java.lang.String getQueryStringParamName()
Name of the query string parameter for this category. (Ex:f.Location|X).
-
setQueryStringParamName
public void setQueryStringParamName(java.lang.String queryStringParamName)
Name of the query string parameter for this category. (Ex:f.Location|X).
-
getValues
public java.util.List<Facet.CategoryValue> getValues()
Values for this category.
Either a single one for item type
CategoryDefinitions or multiple for fill typeCategoryDefinitions.
-
getCategories
public java.util.List<Facet.Category> getCategories()
Sub categories, in case of a hierarchical definition.
-
-