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

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.DefaultStringNormalizer
All Implemented Interfaces:
java.io.Serializable, SchemaObject

public class DefaultStringNormalizer
extends 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

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification
 
Constructor Summary
protected 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 org.apache.directory.shared.ldap.schema.Normalizer
equals, setSchemaManager, toString
 
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
 

Constructor Detail

DefaultStringNormalizer

protected DefaultStringNormalizer()
Method Detail

normalize

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

normalize

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

normalizeString

public static java.lang.String normalizeString(java.lang.String string)
                                        throws LdapException
Normalize the given String

Parameters:
string - The string to normalize
Returns:
The normalized object
Throws:
LdapException - If the normalization throws an error


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