/** * Creates a top level Evaluator where leaves are delegated to a leaf node * evaluator which will be created. * * @param schemaManager The server schemaManager */ public ExpressionEvaluator( SchemaManager schemaManager ) { SubstringEvaluator substringEvaluator = null; substringEvaluator = new SubstringEvaluator(); // leafEvaluator = new LeafEvaluator( schemaManager, substringEvaluator ); leafEvaluator = new LeafEvaluator( substringEvaluator ); }
/** * Gets the comparator for equality matching. * * @param attributeType the attributeType * @return the comparator for equality matching * @throws LdapException if there is a failure */ private LdapComparator<? super Object> getComparator( AttributeType attributeType ) throws LdapException { MatchingRule mrule = getMatchingRule( attributeType, EQUALITY_MATCH ); return mrule.getLdapComparator(); }
return evalPresence( ( ( PresenceNode ) node ).getAttributeType(), entry ); return evalEquality( ( EqualityNode<?> ) node, entry ); return evalGreaterOrLesser( ( GreaterEqNode<?> ) node, entry, COMPARE_GREATER ); return evalGreaterOrLesser( ( LessEqNode<?> ) node, entry, COMPARE_LESSER );
private boolean evalEquality( EqualityNode<?> node, Entry entry ) throws LdapException Normalizer normalizer = getNormalizer( node.getAttributeType() ); Comparator comparator = getComparator( node.getAttributeType() );
Normalizer normalizer = getNormalizer( attributeType ); Value filterValue = node.getValue();
return leafEvaluator.evaluate( node, dn, entry );
/** * Gets the normalizer for equality matching. * * @param attributeType the attributeType * @return the normalizer for equality matching * @throws LdapException if there is a failure */ private Normalizer getNormalizer( AttributeType attributeType ) throws LdapException { MatchingRule mrule = getMatchingRule( attributeType, EQUALITY_MATCH ); return mrule.getNormalizer(); }