Class Normalizer

All Implemented Interfaces:
Serializable, SchemaObject
Direct Known Subclasses:
BooleanNormalizer, DeepTrimNormalizer, DeepTrimToLowerNormalizer, DnNormalizer, GeneralizedTimeNormalizer, NameOrNumericIdNormalizer, NoOpNormalizer, NumericNormalizer, ObjectIdentifierNormalizer, RegexNormalizer, TelephoneNumberNormalizer, UniqueMemberNormalizer

public abstract class Normalizer extends LoadableSchemaObject
Converts attribute values to a canonical form.
Author:
Apache Directory Project
See Also:
  • Field Details

    • serialVersionUID

      public static final long serialVersionUID
      Declares the Serial Version Uid
      See Also:
  • Constructor Details

    • Normalizer

      protected Normalizer(String oid)
      The Normalizer base constructor. We use it's MR OID to initialize the SchemaObject instance
      Parameters:
      oid - The associated OID. It's the element's MR OID
    • Normalizer

      protected Normalizer()
      Use this default constructor when the Normalizer must be instantiated before setting the OID.
  • Method Details

    • normalize

      public abstract String normalize(String value) throws LdapException
      Gets the normalized value of AssertionValues.
      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 abstract String normalize(String value, PrepareString.AssertionType assertionType) throws LdapException
      Gets the normalized value of a substring assertion.
      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
    • setSchemaManager

      public void setSchemaManager(SchemaManager schemaManager)
      Store the SchemaManager in this instance. It may be necessary for some normalizer which needs to have access to the oidNormalizer Map.
      Parameters:
      schemaManager - the schemaManager to store
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface SchemaObject
      Overrides:
      equals in class LoadableSchemaObject
    • toString

      public String toString()
      Overrides:
      toString in class Object