|
||||||||||
| 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
public abstract class PropertyFacetExtractor
PropertyFacetExtractor is a base class for facet extractors that
work on a certain property (incl. relative paths to properties in sub-nodes),
specified by the parameter propertyRelPath in the constructor.
In addition, subclasses can implement filter(List, ValueFactory) for
further filtering of the list of values.
| Field Summary | |
|---|---|
protected static List<Property> |
EMPTY_PROPERTY_LIST
Empty list of properties. |
protected String |
propertyRelPath
Relative path to the property that provides the value for the facet. |
| Constructor Summary | |
|---|---|
PropertyFacetExtractor(String propertyRelPath)
|
|
| Method Summary | |
|---|---|
protected abstract List<Value> |
filter(List<Value> values,
ValueFactory vf)
Filters the values by applying the filter of the definition
associated with this facet. |
protected List<Value> |
getValues(Node node)
Gets the values of this facet for the provided node. |
void |
handleNode(Node node)
Called for each node of the result set. |
protected abstract void |
handleValue(Value value)
Called for each value found in a node of the result and that matches the relative property path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.day.cq.search.facets.FacetExtractor |
|---|
getFacet |
| Field Detail |
|---|
protected static final List<Property> EMPTY_PROPERTY_LIST
protected final String propertyRelPath
| Constructor Detail |
|---|
public PropertyFacetExtractor(String propertyRelPath)
| Method Detail |
|---|
protected abstract void handleValue(Value value)
throws RepositoryException
value - a value to check in which bucket it fits
RepositoryException
protected abstract List<Value> filter(List<Value> values,
ValueFactory vf)
throws RepositoryException
values by applying the filter of the definition
associated with this facet.
values - the values to filter.vf - the value factory.
RepositoryException - if an error occurs while reading the values.
public void handleNode(Node node)
throws RepositoryException
FacetExtractor
handleNode in interface FacetExtractornode - node in the result
RepositoryException - if access to the node failed, ie. one of the methods on node
threw an exception
protected List<Value> getValues(Node node)
throws RepositoryException
node.
node - the node.
RepositoryException - if an error occurs while reading from the node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||