org.apache.directory.shared.ldap.schema
Class PrepareString

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.PrepareString

public class PrepareString
extends java.lang.Object

This class implements the 6 steps described in RFC 4518

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Nested Class Summary
static class PrepareString.StringType
          The type of String we have to normalize
 
Method Summary
static java.lang.StringBuilder bidi(char[] array)
          Remove all bidirectionnal chars.
static java.lang.String bidi(java.lang.String str)
          Remove all bidirectionnal chars.
static java.lang.String normalize(java.lang.String str, PrepareString.StringType type)
          We have to go through 6 steps : 1) Transcode 2) Map 3) Normalize 4) Prohibit 5) Bidi 6) Insignifiant Character Handling The first step is already done, the step (3) is not done.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

normalize

public static java.lang.String normalize(java.lang.String str,
                                         PrepareString.StringType type)
                                  throws java.io.IOException
We have to go through 6 steps : 1) Transcode 2) Map 3) Normalize 4) Prohibit 5) Bidi 6) Insignifiant Character Handling The first step is already done, the step (3) is not done.

Parameters:
str - The String to normalize
type - The string type
Returns:
A normalized string.
Throws:
java.io.IOException

bidi

public static java.lang.String bidi(java.lang.String str)
Remove all bidirectionnal chars. This is not really clear in RFC 4518 what we should do with bidi chars : "Bidirectional characters are ignored." But it's not explained what is a bidi chars... So this method just do nothing atm.

Parameters:
str - The string where bidi chars are to be removed
Returns:
The cleaned string

bidi

public static java.lang.StringBuilder bidi(char[] array)
Remove all bidirectionnal chars. This is not really clear in RFC 4518 what we should do with bidi chars : "Bidirectional characters are ignored." But it's not explained what is a bidi chars... So this method just do nothing atm.

Parameters:
array - The char array where bidi chars are to be removed
Returns:
The cleaned StringBuilder


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