Class GScopeItem
- java.lang.Object
-
- com.funnelback.publicui.search.model.collection.facetednavigation.CategoryDefinition
-
- com.funnelback.publicui.search.model.collection.facetednavigation.impl.GScopeItem
-
- All Implemented Interfaces:
GScopeBasedCategory
public class GScopeItem extends CategoryDefinition implements GScopeBasedCategory
CategoryDefinition
based on a GScope number.- Since:
- 11.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.funnelback.publicui.search.model.collection.facetednavigation.CategoryDefinition
CategoryDefinition.CountSupplier, CategoryDefinition.FacetSearchData, CategoryDefinition.MetadataAndValue, CategoryDefinition.SearchResonseForCountSupplier
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<QueryProcessorOption<?>>
qpOptions
private java.lang.String
userSetGScope
GScope number-
Fields inherited from class com.funnelback.publicui.search.model.collection.facetednavigation.CategoryDefinition
data, facetName, label, MD_VALUE_SEPARATOR, QS_PARAM_SEPARATOR, subCategories
-
-
Constructor Summary
Constructors Constructor Description GScopeItem(java.lang.String categoryName, java.lang.String userSetGscope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allValuesDefinedByUser()
Tells you if all the CategoryValues this CategoryDefiniton can produce are ones that must be set on the category by the user.java.util.List<CategoryValueComputedDataHolder>
computeData(SearchTransaction st, FacetDefinition facetDefinition)
java.lang.String
getGScope1Constraint()
Get the GScope constraint.java.lang.String
getGScopeNumber()
Get the GScope number.java.util.List<QueryProcessorOption<?>>
getQueryProcessorOptions(SearchQuestion question)
Get additional query processor options to apply for this category definition.java.lang.String
getQueryStringCategoryExtraPart()
Gets the extra part of the query string param name e.g.java.lang.String
getUserSetGScope()
GScope numberprivate CategoryValueComputedDataHolder
makeValue(boolean selected, java.lang.Integer count)
boolean
matches(java.lang.String value, java.lang.String extraParams)
Given the value of a query string parameter, and any extra parameters, whether this category types is relevant for this parameter.boolean
selectedValuesAreNested()
void
setUserSetGScope(java.lang.String userSetGScope)
GScope numberjava.lang.String
toString()
-
Methods inherited from class com.funnelback.publicui.search.model.collection.facetednavigation.CategoryDefinition
computeValues, getAllQueryStringParamNames, getData, getFacetName, getFacetSearchData, getLabel, getMatchingFacetSelectedDetails, getQueryStringParamName, getSubCategories, matches, parseMetadata, setData, setFacetedNavProps, setFacetName, setLabel
-
-
-
-
Field Detail
-
qpOptions
private final java.util.List<QueryProcessorOption<?>> qpOptions
-
userSetGScope
private java.lang.String userSetGScope
GScope number
-
-
Method Detail
-
computeData
public java.util.List<CategoryValueComputedDataHolder> computeData(SearchTransaction st, FacetDefinition facetDefinition)
- Specified by:
computeData
in classCategoryDefinition
-
makeValue
private CategoryValueComputedDataHolder makeValue(boolean selected, java.lang.Integer count)
-
getQueryStringCategoryExtraPart
public java.lang.String getQueryStringCategoryExtraPart()
Gets the extra part of the query string param name e.g. f.| =value. - Specified by:
getQueryStringCategoryExtraPart
in classCategoryDefinition
- Returns:
-
matches
public boolean matches(java.lang.String value, java.lang.String extraParams)
Given the value of a query string parameter, and any extra parameters, whether this category types is relevant for this parameter.
For example: f.By Date|dc.date=2010-01-01:
- value = 2010-01-01
- extra = dc.date
A category of type "metadata fill" for the "dc.date" metadata should return true.
- Specified by:
matches
in classCategoryDefinition
- Parameters:
value
- The value to check for.extraParams
- The extra parameter to check for.- Returns:
- true if this category definition matches, false otherwise.
-
getGScopeNumber
public java.lang.String getGScopeNumber()
Get the GScope number.- Specified by:
getGScopeNumber
in interfaceGScopeBasedCategory
- Returns:
- The GScope number for this category type.
-
getGScope1Constraint
public java.lang.String getGScope1Constraint()
Get the GScope constraint.- Specified by:
getGScope1Constraint
in interfaceGScopeBasedCategory
- Returns:
- The GScope constraint for this category type.
It's actually the same as
GScopeBasedCategory.getGScopeNumber()
-
getQueryProcessorOptions
public java.util.List<QueryProcessorOption<?>> getQueryProcessorOptions(SearchQuestion question)
Description copied from class:CategoryDefinition
Get additional query processor options to apply for this category definition.
That gives the opportunity to the category definition to add additional QPOs that it may need. QPOs may differ depending if the facet is currently selected or not, such as setting
-count_urls
dynamically depending on the current number of segments in the URL drill down facet- Specified by:
getQueryProcessorOptions
in classCategoryDefinition
- Parameters:
question
- Can be used to inspect the currently selected facets and return appropriate QPOs- Returns:
- A list of query processor options
-
allValuesDefinedByUser
public boolean allValuesDefinedByUser()
Description copied from class:CategoryDefinition
Tells you if all the CategoryValues this CategoryDefiniton can produce are ones that must be set on the category by the user.Values defined by the user are ones like gscopes where values not from the user come from other sources such as metadata.
- Specified by:
allValuesDefinedByUser
in classCategoryDefinition
- Returns:
- true if all values are defined by the user and not generated from the data.
-
selectedValuesAreNested
public boolean selectedValuesAreNested()
- Specified by:
selectedValuesAreNested
in classCategoryDefinition
- Returns:
- true if returned selected values are nested.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCategoryDefinition
-
getUserSetGScope
public java.lang.String getUserSetGScope()
GScope number
-
setUserSetGScope
public void setUserSetGScope(java.lang.String userSetGScope)
GScope number
-
-