org.apache.directory.shared.ldap.schema.normalizers
Class RegexNormalizer

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.normalizers.RegexNormalizer
All Implemented Interfaces:
java.io.Serializable, Normalizer

public class RegexNormalizer
extends java.lang.Object
implements Normalizer

A Normalizer that uses Perl5 based regular expressions to normalize values.

Version:
$Rev: 798550 $
Author:
Apache Directory Project
See Also:
Serialized Form

Constructor Summary
RegexNormalizer(java.util.regex.Pattern[] regexes)
          Creates a Perl5 regular expression based normalizer.
 
Method Summary
 java.lang.String normalize(java.lang.String value)
          Gets the normalized value.
 Value<?> normalize(Value<?> value)
          Gets the normalized value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegexNormalizer

public RegexNormalizer(java.util.regex.Pattern[] regexes)
Creates a Perl5 regular expression based normalizer.

Parameters:
regexes - the set of regular expressions used to transform values
Method Detail

normalize

public Value<?> normalize(Value<?> value)
Gets the normalized value.

Specified by:
normalize in interface Normalizer
Parameters:
value - the value to normalize. It must *not* be null !
Returns:
the normalized form for a value

normalize

public java.lang.String normalize(java.lang.String value)
Gets the normalized value.

Specified by:
normalize in interface Normalizer
Parameters:
value - the value to normalize. It must *not* be null !
Returns:
the normalized form for a value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.