org.apache.directory.api.ldap.model.schema.normalizers
Class DeepTrimToLowerNormalizer

java.lang.Object
  extended by org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
      extended by org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
          extended by org.apache.directory.api.ldap.model.schema.Normalizer
              extended by org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer
All Implemented Interfaces:
Serializable, SchemaObject

public class DeepTrimToLowerNormalizer
extends Normalizer

Normalizer which trims down whitespace replacing multiple whitespace characters on the edges and within the string with a single space character thereby preserving tokenization order - while doing all this in the same pass it lower cases all characters.

Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification
 
Constructor Summary
DeepTrimToLowerNormalizer()
          Creates a new instance of DeepTrimToLowerNormalizer where the OID is set after instantiation.
DeepTrimToLowerNormalizer(String oid)
          Creates a new instance of DeepTrimToLowerNormalizer.
 
Method Summary
 String normalize(String value)
          Gets the normalized value.
 Value<?> normalize(Value<?> value)
          Gets the normalized value.
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.Normalizer
equals, setSchemaManager, toString
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
copy, getBytecode, getFqcn, isValid, setBytecode, setFqcn
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, clear, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setSchemaName, setSpecification, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeepTrimToLowerNormalizer

public DeepTrimToLowerNormalizer(String oid)
Creates a new instance of DeepTrimToLowerNormalizer.

Parameters:
oid - The MR OID to use with this Normalizer

DeepTrimToLowerNormalizer

public DeepTrimToLowerNormalizer()
Creates a new instance of DeepTrimToLowerNormalizer where the OID is set after instantiation.

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 String normalize(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


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.