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

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

public class RegexNormalizer
extends Normalizer

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

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

Field Summary
static long serialVersionUID
          The serial UID
 
Fields inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification
 
Constructor Summary
RegexNormalizer(java.lang.String oid, 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 org.apache.directory.shared.ldap.schema.Normalizer
equals, setSchemaManager
 
Methods inherited from class org.apache.directory.shared.ldap.schema.LoadableSchemaObject
copy, getBytecode, getFqcn, isValid, registerOid, setBytecode, setFqcn
 
Methods inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
addExtension, addName, addToRegistries, clear, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, removeFromRegistries, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setRegistries, setSchemaName, setSpecification
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
The serial UID

See Also:
Constant Field Values
Constructor Detail

RegexNormalizer

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

Parameters:
oid - The MR OID to use for this Normalizer
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 class 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 class 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 Normalizer
See Also:
Object.toString()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.