|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.search.facets.extractors.PropertyFacetExtractor
com.day.cq.search.facets.extractors.PredefinedBucketsFacetExtractor
public class PredefinedBucketsFacetExtractor
PredefinedBucketsFacetExtractor extracts facets based on a list
of predefined buckets. This means that the buckets
returned will at most be the ones added in the
constructor or
through addPredefinedBucket(PredefinedBucket), but could be less,
because only buckets with at least one match will be returned in the facet.
| Field Summary |
|---|
| Fields inherited from class com.day.cq.search.facets.extractors.PropertyFacetExtractor |
|---|
EMPTY_PROPERTY_LIST, propertyRelPath |
| Constructor Summary | |
|---|---|
PredefinedBucketsFacetExtractor(String propertyRelPath)
|
|
PredefinedBucketsFacetExtractor(String propertyRelPath,
Collection<? extends PredefinedBucket> buckets)
|
|
| Method Summary | |
|---|---|
void |
addPredefinedBucket(PredefinedBucket bucket)
Adds a predefined bucket to this extractor. |
boolean |
equals(Object obj)
|
protected List<Value> |
filter(List<Value> values,
ValueFactory vf)
Filters the values by applying the filter of the definition
associated with this facet. |
Facet |
getFacet()
Called after the result set was scanned (and FacetExtractor.handleNode(Node)
was called for each node in the result) to retrieve the final
Facet object. |
protected void |
handleValue(Value value)
Called for each value found in a node of the result and that matches the relative property path. |
int |
hashCode()
|
| Methods inherited from class com.day.cq.search.facets.extractors.PropertyFacetExtractor |
|---|
getValues, handleNode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PredefinedBucketsFacetExtractor(String propertyRelPath)
public PredefinedBucketsFacetExtractor(String propertyRelPath,
Collection<? extends PredefinedBucket> buckets)
| Method Detail |
|---|
public void addPredefinedBucket(PredefinedBucket bucket)
definition - the bucket definition to add.
protected void handleValue(Value value)
throws RepositoryException
PropertyFacetExtractor
handleValue in class PropertyFacetExtractorvalue - a value to check in which bucket it fits
RepositoryExceptionpublic Facet getFacet()
FacetExtractorFacetExtractor.handleNode(Node)
was called for each node in the result) to retrieve the final
Facet object. Please note that this might be called without
FacetExtractor.handleNode(Node) ever being called, if the result was empty.
Implementations can use the simple FacetImpl implementation
of the Facet interface.
Facet interface with all buckets
found in the result or null if nothing was found in
the result
protected List<Value> filter(List<Value> values,
ValueFactory vf)
throws RepositoryException
PropertyFacetExtractorvalues by applying the filter of the definition
associated with this facet.
filter in class PropertyFacetExtractorvalues - the values to filter.vf - the value factory.
RepositoryException - if an error occurs while reading the values.public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||