Class DeepTrimToLowerNormalizer
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
-
- org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
-
- org.apache.directory.api.ldap.model.schema.Normalizer
-
- org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer
-
- All Implemented Interfaces:
Serializable
,PreparedNormalizer
,SchemaObject
public class DeepTrimToLowerNormalizer extends Normalizer implements PreparedNormalizer
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.Normalizer
serialVersionUID
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
normalize(String value)
Gets the normalized value of AssertionValues.String
normalize(String value, PrepareString.AssertionType assertionType)
Gets the normalized value of a substring assertion.-
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, hashCode, isValid, setBytecode, setFqcn
-
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, clear, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
-
-
-
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 String normalize(String value) throws LdapException
Gets the normalized value of AssertionValues.- Specified by:
normalize
in classNormalizer
- 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, PrepareString.AssertionType assertionType) throws LdapException
Gets the normalized value of a substring assertion.- Specified by:
normalize
in interfacePreparedNormalizer
- Specified by:
normalize
in classNormalizer
- Parameters:
value
- the substring value to normalize. It must *not* be null !assertionType
- The type of assertion- Returns:
- the normalized form for a value
- Throws:
LdapException
- if an error results during normalization
-
-