| | |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines an approximate matching rule based on the Double Metaphone |
| | | * algorithm. The Metaphone and Double Metaphone algorithms were originally |
| | |
| | | * |
| | | * @return The normalized version of the provided value. |
| | | * |
| | | * @throws DirectoryException If the provided value is invalid according to |
| | | * @throws DecodeException If the provided value is invalid according to |
| | | * the associated attribute syntax. |
| | | */ |
| | | @Override |
| | | public ByteString normalizeAttributeValue(ByteSequence value) |
| | | throws DirectoryException |
| | | throws DecodeException |
| | | { |
| | | String valueString = value.toString(); |
| | | int length = valueString.length(); |