public class JcrPropertyPredicateEvaluator extends AbstractPredicateEvaluator
Supports facet extraction. Will provide buckets for each unique property value in the results.
jcr:title
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AND |
static java.lang.String |
DEPTH |
static int |
MAX_NUMBER_OF_VALUES |
static java.lang.String |
OP_EQUALS |
static java.lang.String |
OP_EQUALS_IGNORE_CASE |
static java.lang.String |
OP_EXISTS |
static java.lang.String |
OP_LIKE |
static java.lang.String |
OP_NOT |
static java.lang.String |
OP_UNEQUALS |
static java.lang.String |
OP_UNEQUALS_IGNORE_CASE |
static java.lang.String |
OPERATION |
static java.lang.String |
PROPERTY |
static java.lang.String |
STEP |
static java.lang.String |
VALUE |
Constructor and Description |
---|
JcrPropertyPredicateEvaluator() |
Modifier and Type | Method and Description |
---|---|
boolean |
canFilter(Predicate predicate,
EvaluationContext context)
Returns the same as the deprecated
AbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. |
boolean |
canXpath(Predicate predicate,
EvaluationContext context)
Returns the inverted boolean value of the deprecated
AbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. |
FacetExtractor |
getFacetExtractor(Predicate p,
EvaluationContext context)
Default implementation that always returns
null , ie. |
java.lang.String[] |
getOrderByProperties(Predicate p,
EvaluationContext context)
Default implementation that always returns
null . |
java.lang.String |
getXPathExpression(Predicate p,
EvaluationContext context)
Default implementation that always returns
null , ie. |
boolean |
includes(Predicate p,
Row row,
EvaluationContext context)
Default implementation that always returns
true , ie. |
getOrderByComparator, isFiltering
public static final java.lang.String PROPERTY
public static final java.lang.String VALUE
public static final java.lang.String OPERATION
public static final java.lang.String OP_EQUALS
public static final java.lang.String OP_UNEQUALS
public static final java.lang.String OP_LIKE
public static final java.lang.String OP_NOT
public static final java.lang.String OP_EXISTS
public static final java.lang.String OP_EQUALS_IGNORE_CASE
public static final java.lang.String OP_UNEQUALS_IGNORE_CASE
public static final java.lang.String AND
public static final java.lang.String DEPTH
public static final java.lang.String STEP
public static final int MAX_NUMBER_OF_VALUES
public java.lang.String getXPathExpression(Predicate p, EvaluationContext context)
AbstractPredicateEvaluator
null
, ie. adds
nothing to the XPath query. Subclasses can choose whether they want to
implement this method or use the
AbstractPredicateEvaluator.includes(Predicate, Row, EvaluationContext)
method for advanced
filtering (or both).getXPathExpression
in interface PredicateEvaluator
getXPathExpression
in class AbstractPredicateEvaluator
p
- predicate (for this evaluator type) which is evaluatedcontext
- helper class which provides access to various elements of the
query evaluationpublic java.lang.String[] getOrderByProperties(Predicate p, EvaluationContext context)
AbstractPredicateEvaluator
null
.getOrderByProperties
in interface PredicateEvaluator
getOrderByProperties
in class AbstractPredicateEvaluator
p
- predicate (for this evaluator type) which is evaluatedcontext
- helper class which provides access to various elements of the
query evaluationnull
public FacetExtractor getFacetExtractor(Predicate p, EvaluationContext context)
AbstractPredicateEvaluator
null
, ie. no
facets will be extracted for the predicate.getFacetExtractor
in interface PredicateEvaluator
getFacetExtractor
in class AbstractPredicateEvaluator
p
- predicate (for this evaluator type) which is evaluatedcontext
- helper class which provides access to various elements of the
query evaluationFacetExtractor
that is used to create a Facet
or null
if no extractor shall be providedpublic boolean includes(Predicate p, Row row, EvaluationContext context)
AbstractPredicateEvaluator
true
, ie. it does
not "touch" the result set at all.includes
in interface PredicateEvaluator
includes
in class AbstractPredicateEvaluator
p
- predicate (for this evaluator type) which is evaluatedrow
- current row of the result set returned through the xpath querycontext
- helper class which provides access to various elements of the
query evaluationtrue
if this row should be part of the final result
set, false
if it should be droppedpublic boolean canXpath(Predicate predicate, EvaluationContext context)
AbstractPredicateEvaluator
AbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext)
method (ie. if not
overridden, true
).canXpath
in interface PredicateEvaluator
canXpath
in class AbstractPredicateEvaluator
predicate
- predicate (for this evaluator type) which is evaluatedcontext
- helper class which provides access to various elements of the
query evaluationtrue
if this evaluator can express itself via xpath,
ie. PredicateEvaluator.getXPathExpression(Predicate, EvaluationContext)
public boolean canFilter(Predicate predicate, EvaluationContext context)
AbstractPredicateEvaluator
AbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext)
method (ie. if not
overridden, false
).canFilter
in interface PredicateEvaluator
canFilter
in class AbstractPredicateEvaluator
predicate
- predicate (for this evaluator type) which is evaluatedcontext
- helper class which provides access to various elements of the
query evaluationtrue
if this evaluator can be express itself via
filtering, ie.
PredicateEvaluator.includes(Predicate, Row, EvaluationContext)
Copyright © 2010 - 2020 Adobe. All Rights Reserved