public final class DfFacetDefinition
extends java.lang.Object
setGroupBy(String)
,
IDfFacet
Modifier and Type | Class and Description |
---|---|
static class |
DfFacetDefinition.ORDER
Define the order of the facet value in the returned facets.
|
Constructor and Description |
---|
DfFacetDefinition(java.lang.String name)
Create a new definition.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String attr)
Add an attribute to use for facet computation.
|
DfFacetDefinition |
copy()
Deep copy of this object.
|
boolean |
equals(java.lang.Object o) |
java.util.List<java.lang.String> |
getAttributes()
Get the list of attributes used for facet computation.
|
java.lang.String |
getGroupBy()
Get the grouping startegy used for this facet.
|
java.lang.Integer |
getMax()
Get the maximum number of facet.
|
java.lang.String |
getName()
Get the name for the facet
|
DfFacetDefinition.ORDER |
getOrderBy()
Get the sorting order used for facet values returned.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties() |
java.lang.String |
getProperty(java.lang.String name) |
DfFacetDefinition |
getSubFacetDefinition() |
int |
hashCode() |
boolean |
hasMax()
Indicate if the definition specified a maximum number of facets
|
void |
setAttributes(java.util.Collection<java.lang.String> attrs)
Set the list of attributes to use for facet computation.
|
void |
setGroupBy(java.lang.String groupBy)
Set the grouping used to compute facets.
|
void |
setMax(java.lang.Integer max)
Set the maximum number of facets value.
|
void |
setName(java.lang.String name)
Set the name for the facet
|
void |
setOrderBy(DfFacetDefinition.ORDER orderBy)
Set the sorting order used for facet values returned.
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Set a custom property to be used for certain grouping strategy.
|
void |
setSubFacetDefinition(DfFacetDefinition definition)
Define a facet definition to be used to compute sub-facets
some 'grouping' strategy do not support sub-facets: 'relativeDate' and 'location'.
|
java.lang.String |
toString() |
public DfFacetDefinition(java.lang.String name)
name
- name for the facet. Example: authorpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- name for the facet. Example: authorpublic java.lang.String getGroupBy()
setGroupBy(String)
public void setGroupBy(java.lang.String groupBy)
groupBy
- the name of the grouping strategysetProperty(String, String)
public DfFacetDefinition.ORDER getOrderBy()
public void setOrderBy(DfFacetDefinition.ORDER orderBy)
public void addAttribute(java.lang.String attr)
public void setAttributes(java.util.Collection<java.lang.String> attrs)
public java.util.List<java.lang.String> getAttributes()
public boolean hasMax()
public java.lang.Integer getMax()
public void setMax(java.lang.Integer max)
max
- -1 to get all the values. If nothing is specified, the maximum is 10.public void setProperty(java.lang.String name, java.lang.String value)
name
- property's namevalue
- property's value. This is a String representation. Depending on the property name it may be parsed
as a boolean or a numerical value.public java.lang.String getProperty(java.lang.String name)
public java.util.Map<java.lang.String,java.lang.String> getProperties()
public void setSubFacetDefinition(DfFacetDefinition definition)
definition
- a DfFacetDefinition. The definition can be nested recursively.public DfFacetDefinition getSubFacetDefinition()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public DfFacetDefinition copy()
Copyright 1994-2023 OpenText Corporation. All rights reserved.