public abstract class Facet extends FacetView implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Facet.FromDataModel |
static class |
Facet.Implementation |
static class |
Facet.RefinementPolicy |
static interface |
Facet.Transformer<T> |
static class |
Facet.Type |
static interface |
Facet.Visitor |
FacetView.SortFunction
Modifier and Type | Field and Description |
---|---|
java.util.List<AdditionalFacetView> |
additionalFacetView |
java.util.List<AggregationFunction> |
aggregationFunction |
java.lang.String |
dataModelClass |
java.lang.String |
dataModelProperty |
java.lang.String |
dataModelState |
static java.lang.String |
DEFAULT_IMPLEMENTATION |
static boolean |
DEFAULT_IN_HITS |
static boolean |
DEFAULT_IN_NAVIGATION |
static int |
DEFAULT_MAX_SLICE_CATEGORIES |
static java.lang.String |
DEFAULT_REFINEMENT_POLICY |
protected Facet.FromDataModel |
fromDataModel |
java.lang.String |
id |
java.lang.String |
implementation |
int |
index |
boolean |
inHits |
boolean |
inNavigation |
int |
maxSliceCategories |
java.lang.String |
refinementPolicy |
java.lang.String |
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 |
---|
Facet() |
Facet(Facet o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
abstract <T> T |
accept(Facet.Transformer<T> transformer,
T[] t) |
abstract void |
accept(Facet.Visitor visitor) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this Facet.
|
static Facet |
fromString(java.lang.String s)
String representation of this Facet.
|
java.util.List<AdditionalFacetView> |
getAdditionalFacetView() |
java.util.Map<java.lang.String,AdditionalFacetView> |
getAdditionalFacetViewAsMap()
Get the map of AdditionalFacetView, indexed by id
|
AdditionalFacetView |
getAdditionalFacetViewById(java.lang.String _lookup)
Get the AdditionalFacetView for which the id matches _lookup
|
java.util.List<AggregationFunction> |
getAggregationFunction()
A numerical computation to perform on hits matching each value of the facet.
|
java.util.Map<java.lang.String,AggregationFunction> |
getAggregationFunctionAsMap()
Get the map of AggregationFunction, indexed by id
|
AggregationFunction |
getAggregationFunctionById(java.lang.String _lookup)
Get the AggregationFunction for which the id matches _lookup
|
java.lang.String |
getDataModelClass()
If dataModelState is "auto" or "customized", you will find here the
name of the DataModelClass that generated this facet. |
java.lang.String |
getDataModelProperty()
If dataModelState is "auto" or "customized", you will find here the
name of the DataModelProperty that generated this facet. |
java.lang.String |
getDataModelState() |
Facet.FromDataModel |
getFromDataModel() |
java.lang.String |
getId()
Unique identifier of this facet.
Used in Mashup-Builder and client applications to identify the facet. |
java.lang.String |
getImplementation()
Internal algorithm for implementation of this facet.
Value can be null or one of autodetect favor_cpu favor_memory . "favor_cpu" consumes less CPU, at the expense of additional RAM consumption (RAM is consumed for each facet value in the index). "favor_memory" reduces RAM consumption (RAM is only consumed for each facet value in the result set). "autodetect" automatically selects a suitable policy based on the result set and facet data. |
Facet.Implementation |
getImplementationAsEnum()
Internal algorithm for implementation of this facet.
Value can be null or one of autodetect favor_cpu favor_memory . "favor_cpu" consumes less CPU, at the expense of additional RAM consumption (RAM is consumed for each facet value in the index). "favor_memory" reduces RAM consumption (RAM is only consumed for each facet value in the result set). "autodetect" automatically selects a suitable policy based on the result set and facet data. |
int |
getIndex()
Internal.
|
int |
getMaxSliceCategories()
Maximum number of categories returned by each slice for one facet.
0 means no limit. Warning: Results merged by the search server may be incorrect. |
java.lang.String |
getRefinementPolicy()
Defines the Refinements panel behavior.
Disjunctive: Allows you to select multiple categories at once for refinement (it creates an OR operation). |
Facet.RefinementPolicy |
getRefinementPolicyAsEnum()
Defines the Refinements panel behavior.
Disjunctive: Allows you to select multiple categories at once for refinement (it creates an OR operation). |
java.lang.String |
getType()
Used for convenience in various introspection code
|
Facet.Type |
getTypeAsEnum()
Used for convenience in various introspection code
|
static boolean |
isA(java.lang.String str,
Facet.Implementation item) |
static boolean |
isA(java.lang.String str,
Facet.RefinementPolicy item) |
static boolean |
isA(java.lang.String str,
Facet.Type item) |
boolean |
isInHits()
Computes the value of this facet for each hit.
|
boolean |
isInNavigation()
Computes navigation on this facet.
|
static boolean |
isOneOf(java.lang.String str,
Facet.Implementation... items) |
static boolean |
isOneOf(java.lang.String str,
Facet.RefinementPolicy... items) |
static boolean |
isOneOf(java.lang.String str,
Facet.Type... items) |
Facet |
makeCopy() |
static Facet |
readFrom(java.io.InputStream is)
Read this Facet from an XML fragment.
|
boolean |
removeAdditionalFacetViewById(java.lang.String _lookup)
Removes the AdditionalFacetView for which the id matches _lookup
|
boolean |
removeAggregationFunctionById(java.lang.String _lookup)
Removes the AggregationFunction for which the id matches _lookup
|
void |
setDataModelClass(java.lang.String dataModelClass)
If dataModelState is "auto" or "customized", you will find here the
name of the DataModelClass that generated this facet. |
void |
setDataModelProperty(java.lang.String dataModelProperty)
If dataModelState is "auto" or "customized", you will find here the
name of the DataModelProperty that generated this facet. |
void |
setDataModelState(java.lang.String dataModelState) |
void |
setFromDataModel(Facet.FromDataModel __value) |
void |
setId(java.lang.String id)
Unique identifier of this facet.
Used in Mashup-Builder and client applications to identify the facet. |
void |
setImplementation(Facet.Implementation item)
Internal algorithm for implementation of this facet.
Value can be null or one of autodetect favor_cpu favor_memory . "favor_cpu" consumes less CPU, at the expense of additional RAM consumption (RAM is consumed for each facet value in the index). "favor_memory" reduces RAM consumption (RAM is only consumed for each facet value in the result set). "autodetect" automatically selects a suitable policy based on the result set and facet data. |
void |
setImplementation(java.lang.String implementation)
Internal algorithm for implementation of this facet.
Value can be null or one of autodetect favor_cpu favor_memory . "favor_cpu" consumes less CPU, at the expense of additional RAM consumption (RAM is consumed for each facet value in the index). "favor_memory" reduces RAM consumption (RAM is only consumed for each facet value in the result set). "autodetect" automatically selects a suitable policy based on the result set and facet data. |
void |
setIndex(int index)
Internal.
|
void |
setInHits(boolean inHits)
Computes the value of this facet for each hit.
|
void |
setInNavigation(boolean inNavigation)
Computes navigation on this facet.
|
void |
setMaxSliceCategories(int maxSliceCategories)
Maximum number of categories returned by each slice for one facet.
0 means no limit. Warning: Results merged by the search server may be incorrect. |
void |
setRefinementPolicy(Facet.RefinementPolicy item)
Defines the Refinements panel behavior.
Disjunctive: Allows you to select multiple categories at once for refinement (it creates an OR operation). |
void |
setRefinementPolicy(java.lang.String refinementPolicy)
Defines the Refinements panel behavior.
Disjunctive: Allows you to select multiple categories at once for refinement (it creates an OR operation). |
void |
setType(Facet.Type item)
Used for convenience in various introspection code
|
void |
setType(java.lang.String type)
Used for convenience in various introspection code
|
java.lang.String |
toString()
String representation of this Facet.
|
Facet |
withAdditionalFacetView(AdditionalFacetView... __values) |
Facet |
withAdditionalFacetView(java.util.Collection<AdditionalFacetView> __values) |
Facet |
withAggregateScores(boolean aggregateScores)
Deprecated.
|
Facet |
withAggregateScores(java.lang.Boolean aggregateScores)
Deprecated.
|
Facet |
withAggregationFunction(AggregationFunction... __values)
A numerical computation to perform on hits matching each value of the facet.
|
Facet |
withAggregationFunction(java.util.Collection<AggregationFunction> __values) |
Facet |
withDataModelClass(java.lang.String dataModelClass) |
Facet |
withDataModelProperty(java.lang.String dataModelProperty) |
Facet |
withDataModelState(java.lang.String dataModelState) |
Facet |
withExplicitSortOrderValues(java.lang.String explicitSortOrderValues) |
Facet |
withId(java.lang.String id) |
Facet |
withImplementation(java.lang.String implementation) |
Facet |
withIndex(int index) |
Facet |
withIndex(java.lang.Integer index) |
Facet |
withInHits(boolean inHits) |
Facet |
withInHits(java.lang.Boolean inHits) |
Facet |
withInNavigation(boolean inNavigation) |
Facet |
withInNavigation(java.lang.Boolean inNavigation) |
Facet |
withMaxCategories(int maxCategories) |
Facet |
withMaxCategories(java.lang.Integer maxCategories) |
Facet |
withMaxCategoriesPerLevel(int maxCategoriesPerLevel) |
Facet |
withMaxCategoriesPerLevel(java.lang.Integer maxCategoriesPerLevel) |
Facet |
withMaxSliceCategories(int maxSliceCategories) |
Facet |
withMaxSliceCategories(java.lang.Integer maxSliceCategories) |
Facet |
withMinDocsPerCategory(int minDocsPerCategory) |
Facet |
withMinDocsPerCategory(java.lang.Integer minDocsPerCategory) |
Facet |
withRefinementPolicy(java.lang.String refinementPolicy) |
Facet |
withReverse(boolean reverse) |
Facet |
withReverse(java.lang.Boolean reverse) |
Facet |
withSortAggregationFunction(java.lang.String sortAggregationFunction) |
Facet |
withSortFunction(java.lang.String sortFunction) |
Facet |
withType(java.lang.String type) |
void |
writeTo(java.io.OutputStream os) |
accept, accept, getExplicitSortOrderValues, getMaxCategories, getMaxCategoriesPerLevel, getMinDocsPerCategory, getSortAggregationFunction, getSortFunction, getSortFunctionAsEnum, isA, isAggregateScores, isOneOf, isReverse, setAggregateScores, setExplicitSortOrderValues, setMaxCategories, setMaxCategoriesPerLevel, setMinDocsPerCategory, setReverse, setSortAggregationFunction, setSortFunction, setSortFunction
public java.lang.String id
public java.lang.String type
public int index
public java.lang.String refinementPolicy
public static final java.lang.String DEFAULT_REFINEMENT_POLICY
public java.lang.String implementation
public static final java.lang.String DEFAULT_IMPLEMENTATION
public java.lang.String dataModelState
protected Facet.FromDataModel fromDataModel
public java.lang.String dataModelClass
public java.lang.String dataModelProperty
public boolean inNavigation
public static final boolean DEFAULT_IN_NAVIGATION
public boolean inHits
public static final boolean DEFAULT_IN_HITS
public java.util.List<AggregationFunction> aggregationFunction
public java.util.List<AdditionalFacetView> additionalFacetView
public int maxSliceCategories
public static final int DEFAULT_MAX_SLICE_CATEGORIES
public Facet()
public Facet(Facet o)
public static boolean isA(java.lang.String str, Facet.Type item)
public static boolean isOneOf(java.lang.String str, Facet.Type... items)
public void setType(Facet.Type item)
public Facet.Type getTypeAsEnum()
public static boolean isA(java.lang.String str, Facet.RefinementPolicy item)
public static boolean isOneOf(java.lang.String str, Facet.RefinementPolicy... items)
public void setRefinementPolicy(Facet.RefinementPolicy item)
public Facet.RefinementPolicy getRefinementPolicyAsEnum()
public static boolean isA(java.lang.String str, Facet.Implementation item)
public static boolean isOneOf(java.lang.String str, Facet.Implementation... items)
public void setImplementation(Facet.Implementation item)
public Facet.Implementation getImplementationAsEnum()
public Facet withMinDocsPerCategory(int minDocsPerCategory)
withMinDocsPerCategory
in class FacetView
public Facet withMinDocsPerCategory(java.lang.Integer minDocsPerCategory)
withMinDocsPerCategory
in class FacetView
public Facet withMaxCategories(int maxCategories)
withMaxCategories
in class FacetView
public Facet withMaxCategories(java.lang.Integer maxCategories)
withMaxCategories
in class FacetView
public Facet withMaxCategoriesPerLevel(int maxCategoriesPerLevel)
withMaxCategoriesPerLevel
in class FacetView
public Facet withMaxCategoriesPerLevel(java.lang.Integer maxCategoriesPerLevel)
withMaxCategoriesPerLevel
in class FacetView
public Facet withSortFunction(java.lang.String sortFunction)
withSortFunction
in class FacetView
public Facet withSortAggregationFunction(java.lang.String sortAggregationFunction)
withSortAggregationFunction
in class FacetView
public Facet withExplicitSortOrderValues(java.lang.String explicitSortOrderValues)
withExplicitSortOrderValues
in class FacetView
public Facet withReverse(boolean reverse)
withReverse
in class FacetView
public Facet withReverse(java.lang.Boolean reverse)
withReverse
in class FacetView
@Deprecated public Facet withAggregateScores(boolean aggregateScores)
withAggregateScores
in class FacetView
@Deprecated public Facet withAggregateScores(java.lang.Boolean aggregateScores)
withAggregateScores
in class FacetView
public void setId(java.lang.String id)
public java.lang.String getId()
public Facet withId(java.lang.String id)
public void setType(java.lang.String type)
public java.lang.String getType()
public Facet withType(java.lang.String type)
public void setIndex(int index)
public int getIndex()
public Facet withIndex(int index)
public Facet withIndex(java.lang.Integer index)
public void setRefinementPolicy(java.lang.String refinementPolicy)
public java.lang.String getRefinementPolicy()
public Facet withRefinementPolicy(java.lang.String refinementPolicy)
public void setImplementation(java.lang.String implementation)
public java.lang.String getImplementation()
public Facet withImplementation(java.lang.String implementation)
public void setDataModelState(java.lang.String dataModelState)
public java.lang.String getDataModelState()
public Facet withDataModelState(java.lang.String dataModelState)
public Facet.FromDataModel getFromDataModel()
public void setFromDataModel(Facet.FromDataModel __value)
public void setDataModelClass(java.lang.String dataModelClass)
public java.lang.String getDataModelClass()
public Facet withDataModelClass(java.lang.String dataModelClass)
public void setDataModelProperty(java.lang.String dataModelProperty)
public java.lang.String getDataModelProperty()
public Facet withDataModelProperty(java.lang.String dataModelProperty)
public void setInNavigation(boolean inNavigation)
public boolean isInNavigation()
public Facet withInNavigation(boolean inNavigation)
public Facet withInNavigation(java.lang.Boolean inNavigation)
public void setInHits(boolean inHits)
public boolean isInHits()
public Facet withInHits(boolean inHits)
public Facet withInHits(java.lang.Boolean inHits)
public java.util.List<AggregationFunction> getAggregationFunction()
public AggregationFunction getAggregationFunctionById(java.lang.String _lookup)
public java.util.Map<java.lang.String,AggregationFunction> getAggregationFunctionAsMap()
public boolean removeAggregationFunctionById(java.lang.String _lookup)
public Facet withAggregationFunction(AggregationFunction... __values)
public Facet withAggregationFunction(java.util.Collection<AggregationFunction> __values)
public java.util.List<AdditionalFacetView> getAdditionalFacetView()
public AdditionalFacetView getAdditionalFacetViewById(java.lang.String _lookup)
public java.util.Map<java.lang.String,AdditionalFacetView> getAdditionalFacetViewAsMap()
public boolean removeAdditionalFacetViewById(java.lang.String _lookup)
public Facet withAdditionalFacetView(AdditionalFacetView... __values)
public Facet withAdditionalFacetView(java.util.Collection<AdditionalFacetView> __values)
public void setMaxSliceCategories(int maxSliceCategories)
public int getMaxSliceCategories()
public Facet withMaxSliceCategories(int maxSliceCategories)
public Facet withMaxSliceCategories(java.lang.Integer maxSliceCategories)
public static Facet 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 Facet 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 abstract void accept(Facet.Visitor visitor) throws com.exalead.util.TypedException
com.exalead.util.TypedException
public abstract <T> T accept(Facet.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.