public class CategoryFacet extends Facet implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
CategoryFacet.Form |
Facet.FromDataModel, Facet.Implementation, Facet.RefinementPolicy, Facet.Transformer<T>, Facet.Type, Facet.Visitor
FacetView.SortFunction
Modifier and Type | Field and Description |
---|---|
java.lang.String |
categoryField |
static java.lang.String |
DEFAULT_FORM |
static int |
DEFAULT_HITS_MAX_CATEGORIES |
static int |
DEFAULT_MAX_CATEGORY_TREE_DEPTH |
static int |
DEFAULT_MAX_CATEGORY_TREE_DEPTH_FROM_ROOT |
java.lang.String |
form |
int |
hitsMaxCategories |
int |
maxCategoryTreeDepth |
int |
maxCategoryTreeDepthFromRoot |
java.lang.String |
root |
additionalFacetView, aggregationFunction, dataModelClass, dataModelProperty, dataModelState, DEFAULT_IMPLEMENTATION, DEFAULT_IN_HITS, DEFAULT_IN_NAVIGATION, DEFAULT_MAX_SLICE_CATEGORIES, DEFAULT_REFINEMENT_POLICY, fromDataModel, id, implementation, index, inHits, inNavigation, maxSliceCategories, refinementPolicy, type
aggregateScores, DEFAULT_AGGREGATE_SCORES, DEFAULT_MAX_CATEGORIES, DEFAULT_MAX_CATEGORIES_PER_LEVEL, DEFAULT_MIN_DOCS_PER_CATEGORY, DEFAULT_REVERSE, DEFAULT_SORT_FUNCTION, explicitSortOrderValues, maxCategories, maxCategoriesPerLevel, minDocsPerCategory, reverse, sortAggregationFunction, sortFunction
Constructor and Description |
---|
CategoryFacet() |
CategoryFacet(CategoryFacet o)
Copy constructor
|
CategoryFacet(java.lang.String id,
java.lang.String categoryField,
java.lang.String root) |
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(Facet.Transformer<T> transformer,
T[] t) |
void |
accept(Facet.Visitor visitor) |
<T> T |
accept(FacetView.Transformer<T> transformer,
T[] t) |
void |
accept(FacetView.Visitor visitor) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this CategoryFacet.
|
static CategoryFacet |
fromString(java.lang.String s)
String representation of this CategoryFacet.
|
java.lang.String |
getCategoryField()
Specifies from which field the categories should be retrieved.
|
java.lang.String |
getForm()
Normalization form for the category path.
|
CategoryFacet.Form |
getFormAsEnum()
Normalization form for the category path.
|
int |
getHitsMaxCategories()
Maximum number of facet values displayed in hits.
|
int |
getMaxCategoryTreeDepth()
Maximum depth of the returned category tree.
Whatever the level of refinement, there will never be more levels retrieved (this ensures we are not overtaking the maxCategoryTreeDepthFromRoot). |
int |
getMaxCategoryTreeDepthFromRoot()
Maximum depth of the returned category tree, starting from the global root of the category.
Setting this attribute to N means that no categories will be kept below this level. |
java.lang.String |
getRoot()
In the categories field, category values are stored in a tree.
|
static boolean |
isA(java.lang.String str,
CategoryFacet.Form item) |
static boolean |
isOneOf(java.lang.String str,
CategoryFacet.Form... items) |
CategoryFacet |
makeCopy()
Creates and returns a deep copy of this CategoryFacet.
|
static CategoryFacet |
readFrom(java.io.InputStream is)
Read this CategoryFacet from an XML fragment.
|
void |
setCategoryField(java.lang.String categoryField)
Specifies from which field the categories should be retrieved.
|
void |
setForm(CategoryFacet.Form item)
Normalization form for the category path.
|
void |
setForm(java.lang.String form)
Normalization form for the category path.
|
void |
setHitsMaxCategories(int hitsMaxCategories)
Maximum number of facet values displayed in hits.
|
void |
setMaxCategoryTreeDepth(int maxCategoryTreeDepth)
Maximum depth of the returned category tree.
Whatever the level of refinement, there will never be more levels retrieved (this ensures we are not overtaking the maxCategoryTreeDepthFromRoot). |
void |
setMaxCategoryTreeDepthFromRoot(int maxCategoryTreeDepthFromRoot)
Maximum depth of the returned category tree, starting from the global root of the category.
Setting this attribute to N means that no categories will be kept below this level. |
void |
setRoot(java.lang.String root)
In the categories field, category values are stored in a tree.
|
java.lang.String |
toString()
String representation of this CategoryFacet.
|
CategoryFacet |
withAdditionalFacetView(AdditionalFacetView... __values) |
CategoryFacet |
withAdditionalFacetView(java.util.Collection<AdditionalFacetView> __values) |
CategoryFacet |
withAggregateScores(boolean aggregateScores)
Deprecated.
|
CategoryFacet |
withAggregateScores(java.lang.Boolean aggregateScores)
Deprecated.
|
CategoryFacet |
withAggregationFunction(AggregationFunction... __values)
A numerical computation to perform on hits matching each value of the facet.
|
CategoryFacet |
withAggregationFunction(java.util.Collection<AggregationFunction> __values) |
CategoryFacet |
withCategoryField(java.lang.String categoryField) |
CategoryFacet |
withDataModelClass(java.lang.String dataModelClass) |
CategoryFacet |
withDataModelProperty(java.lang.String dataModelProperty) |
CategoryFacet |
withDataModelState(java.lang.String dataModelState) |
CategoryFacet |
withExplicitSortOrderValues(java.lang.String explicitSortOrderValues) |
CategoryFacet |
withForm(java.lang.String form) |
CategoryFacet |
withFromDataModel(Facet fromDataModel) |
CategoryFacet |
withHitsMaxCategories(int hitsMaxCategories) |
CategoryFacet |
withHitsMaxCategories(java.lang.Integer hitsMaxCategories) |
CategoryFacet |
withId(java.lang.String id) |
CategoryFacet |
withImplementation(java.lang.String implementation) |
CategoryFacet |
withIndex(int index) |
CategoryFacet |
withIndex(java.lang.Integer index) |
CategoryFacet |
withInHits(boolean inHits) |
CategoryFacet |
withInHits(java.lang.Boolean inHits) |
CategoryFacet |
withInNavigation(boolean inNavigation) |
CategoryFacet |
withInNavigation(java.lang.Boolean inNavigation) |
CategoryFacet |
withMaxCategories(int maxCategories) |
CategoryFacet |
withMaxCategories(java.lang.Integer maxCategories) |
CategoryFacet |
withMaxCategoriesPerLevel(int maxCategoriesPerLevel) |
CategoryFacet |
withMaxCategoriesPerLevel(java.lang.Integer maxCategoriesPerLevel) |
CategoryFacet |
withMaxCategoryTreeDepth(int maxCategoryTreeDepth) |
CategoryFacet |
withMaxCategoryTreeDepth(java.lang.Integer maxCategoryTreeDepth) |
CategoryFacet |
withMaxCategoryTreeDepthFromRoot(int maxCategoryTreeDepthFromRoot) |
CategoryFacet |
withMaxCategoryTreeDepthFromRoot(java.lang.Integer maxCategoryTreeDepthFromRoot) |
CategoryFacet |
withMaxSliceCategories(int maxSliceCategories) |
CategoryFacet |
withMaxSliceCategories(java.lang.Integer maxSliceCategories) |
CategoryFacet |
withMinDocsPerCategory(int minDocsPerCategory) |
CategoryFacet |
withMinDocsPerCategory(java.lang.Integer minDocsPerCategory) |
CategoryFacet |
withRefinementPolicy(java.lang.String refinementPolicy) |
CategoryFacet |
withReverse(boolean reverse) |
CategoryFacet |
withReverse(java.lang.Boolean reverse) |
CategoryFacet |
withRoot(java.lang.String root) |
CategoryFacet |
withSortAggregationFunction(java.lang.String sortAggregationFunction) |
CategoryFacet |
withSortFunction(java.lang.String sortFunction) |
CategoryFacet |
withType(java.lang.String type) |
void |
writeTo(java.io.OutputStream os)
Write this CategoryFacet as an XML fragment
|
getAdditionalFacetView, getAdditionalFacetViewAsMap, getAdditionalFacetViewById, getAggregationFunction, getAggregationFunctionAsMap, getAggregationFunctionById, getDataModelClass, getDataModelProperty, getDataModelState, getFromDataModel, getId, getImplementation, getImplementationAsEnum, getIndex, getMaxSliceCategories, getRefinementPolicy, getRefinementPolicyAsEnum, getType, getTypeAsEnum, isA, isA, isA, isInHits, isInNavigation, isOneOf, isOneOf, isOneOf, removeAdditionalFacetViewById, removeAggregationFunctionById, setDataModelClass, setDataModelProperty, setDataModelState, setFromDataModel, setId, setImplementation, setImplementation, setIndex, setInHits, setInNavigation, setMaxSliceCategories, setRefinementPolicy, setRefinementPolicy, setType, setType
getExplicitSortOrderValues, getMaxCategories, getMaxCategoriesPerLevel, getMinDocsPerCategory, getSortAggregationFunction, getSortFunction, getSortFunctionAsEnum, isA, isAggregateScores, isOneOf, isReverse, setAggregateScores, setExplicitSortOrderValues, setMaxCategories, setMaxCategoriesPerLevel, setMinDocsPerCategory, setReverse, setSortAggregationFunction, setSortFunction, setSortFunction
public java.lang.String root
public int maxCategoryTreeDepth
public static final int DEFAULT_MAX_CATEGORY_TREE_DEPTH
public int maxCategoryTreeDepthFromRoot
public static final int DEFAULT_MAX_CATEGORY_TREE_DEPTH_FROM_ROOT
public java.lang.String categoryField
public java.lang.String form
public static final java.lang.String DEFAULT_FORM
public int hitsMaxCategories
public static final int DEFAULT_HITS_MAX_CATEGORIES
public CategoryFacet()
public CategoryFacet(java.lang.String id, java.lang.String categoryField, java.lang.String root)
public CategoryFacet(CategoryFacet o)
public static boolean isA(java.lang.String str, CategoryFacet.Form item)
public static boolean isOneOf(java.lang.String str, CategoryFacet.Form... items)
public void setForm(CategoryFacet.Form item)
public CategoryFacet.Form getFormAsEnum()
public CategoryFacet withId(java.lang.String id)
public CategoryFacet withType(java.lang.String type)
public CategoryFacet withIndex(int index)
public CategoryFacet withIndex(java.lang.Integer index)
public CategoryFacet withRefinementPolicy(java.lang.String refinementPolicy)
withRefinementPolicy
in class Facet
public CategoryFacet withImplementation(java.lang.String implementation)
withImplementation
in class Facet
public CategoryFacet withDataModelState(java.lang.String dataModelState)
withDataModelState
in class Facet
public CategoryFacet withFromDataModel(Facet fromDataModel)
public CategoryFacet withDataModelClass(java.lang.String dataModelClass)
withDataModelClass
in class Facet
public CategoryFacet withDataModelProperty(java.lang.String dataModelProperty)
withDataModelProperty
in class Facet
public CategoryFacet withInNavigation(boolean inNavigation)
withInNavigation
in class Facet
public CategoryFacet withInNavigation(java.lang.Boolean inNavigation)
withInNavigation
in class Facet
public CategoryFacet withInHits(boolean inHits)
withInHits
in class Facet
public CategoryFacet withInHits(java.lang.Boolean inHits)
withInHits
in class Facet
public CategoryFacet withAggregationFunction(AggregationFunction... __values)
withAggregationFunction
in class Facet
public CategoryFacet withAggregationFunction(java.util.Collection<AggregationFunction> __values)
withAggregationFunction
in class Facet
public CategoryFacet withAdditionalFacetView(AdditionalFacetView... __values)
withAdditionalFacetView
in class Facet
public CategoryFacet withAdditionalFacetView(java.util.Collection<AdditionalFacetView> __values)
withAdditionalFacetView
in class Facet
public CategoryFacet withMaxSliceCategories(int maxSliceCategories)
withMaxSliceCategories
in class Facet
public CategoryFacet withMaxSliceCategories(java.lang.Integer maxSliceCategories)
withMaxSliceCategories
in class Facet
public CategoryFacet withMinDocsPerCategory(int minDocsPerCategory)
withMinDocsPerCategory
in class Facet
public CategoryFacet withMinDocsPerCategory(java.lang.Integer minDocsPerCategory)
withMinDocsPerCategory
in class Facet
public CategoryFacet withMaxCategories(int maxCategories)
withMaxCategories
in class Facet
public CategoryFacet withMaxCategories(java.lang.Integer maxCategories)
withMaxCategories
in class Facet
public CategoryFacet withMaxCategoriesPerLevel(int maxCategoriesPerLevel)
withMaxCategoriesPerLevel
in class Facet
public CategoryFacet withMaxCategoriesPerLevel(java.lang.Integer maxCategoriesPerLevel)
withMaxCategoriesPerLevel
in class Facet
public CategoryFacet withSortFunction(java.lang.String sortFunction)
withSortFunction
in class Facet
public CategoryFacet withSortAggregationFunction(java.lang.String sortAggregationFunction)
withSortAggregationFunction
in class Facet
public CategoryFacet withExplicitSortOrderValues(java.lang.String explicitSortOrderValues)
withExplicitSortOrderValues
in class Facet
public CategoryFacet withReverse(boolean reverse)
withReverse
in class Facet
public CategoryFacet withReverse(java.lang.Boolean reverse)
withReverse
in class Facet
@Deprecated public CategoryFacet withAggregateScores(boolean aggregateScores)
withAggregateScores
in class Facet
@Deprecated public CategoryFacet withAggregateScores(java.lang.Boolean aggregateScores)
withAggregateScores
in class Facet
public void setRoot(java.lang.String root)
public java.lang.String getRoot()
public CategoryFacet withRoot(java.lang.String root)
public void setMaxCategoryTreeDepth(int maxCategoryTreeDepth)
public int getMaxCategoryTreeDepth()
public CategoryFacet withMaxCategoryTreeDepth(int maxCategoryTreeDepth)
public CategoryFacet withMaxCategoryTreeDepth(java.lang.Integer maxCategoryTreeDepth)
public void setMaxCategoryTreeDepthFromRoot(int maxCategoryTreeDepthFromRoot)
public int getMaxCategoryTreeDepthFromRoot()
public CategoryFacet withMaxCategoryTreeDepthFromRoot(int maxCategoryTreeDepthFromRoot)
public CategoryFacet withMaxCategoryTreeDepthFromRoot(java.lang.Integer maxCategoryTreeDepthFromRoot)
public void setCategoryField(java.lang.String categoryField)
public java.lang.String getCategoryField()
public CategoryFacet withCategoryField(java.lang.String categoryField)
public void setForm(java.lang.String form)
public java.lang.String getForm()
public CategoryFacet withForm(java.lang.String form)
public void setHitsMaxCategories(int hitsMaxCategories)
public int getHitsMaxCategories()
public CategoryFacet withHitsMaxCategories(int hitsMaxCategories)
public CategoryFacet withHitsMaxCategories(java.lang.Integer hitsMaxCategories)
public CategoryFacet makeCopy()
public static CategoryFacet readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
public static CategoryFacet fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
public void accept(Facet.Visitor visitor) throws com.exalead.util.TypedException
public void accept(FacetView.Visitor visitor) throws com.exalead.util.TypedException
public <T> T accept(Facet.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
public <T> T accept(FacetView.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.