org.apache.directory.shared.ldap.name
Class DefaultStringNormalizer

java.lang.Object
  extended by org.apache.directory.shared.ldap.name.DefaultStringNormalizer
All Implemented Interfaces:
java.io.Serializable, Normalizer

public class DefaultStringNormalizer
extends java.lang.Object
implements Normalizer

A normalizer which transforms an escape sequence into an internal canonical form: into UTF-8 characters presuming the escape sequence fits that range. This is used explicity for non-binary attribute types only.

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

Constructor Summary
DefaultStringNormalizer()
           
 
Method Summary
 java.lang.String normalize(java.lang.String value)
          Gets the normalized value.
 Value<?> normalize(Value<?> value)
          Gets the normalized value.
static java.lang.String normalizeString(java.lang.String string)
          Normalize the given String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultStringNormalizer

public DefaultStringNormalizer()
Method Detail

normalize

public Value<?> normalize(Value<?> value)
                   throws javax.naming.NamingException
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
Throws:
javax.naming.NamingException - if an error results during normalization

normalize

public java.lang.String normalize(java.lang.String value)
                           throws javax.naming.NamingException
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
Throws:
javax.naming.NamingException - if an error results during normalization

normalizeString

public static java.lang.String normalizeString(java.lang.String string)
                                        throws javax.naming.NamingException
Normalize the given String

Parameters:
string - The string to normalize
Returns:
The normalized object
Throws:
javax.naming.NamingException - If the normalization throws an error


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