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.Object normalize(java.lang.Object value)
          Gets the normalized value.
static java.lang.Object 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 java.lang.Object normalize(java.lang.Object value)
                           throws javax.naming.NamingException
Description copied from interface: Normalizer
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.Object 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 © 2003-2011 Apache Software Foundation. All Rights Reserved.