org.opends.server.schema
Class CaseIgnoreSubstringMatchingRule

java.lang.Object
  extended by org.opends.server.api.MatchingRule<SubstringMatchingRuleCfg>
      extended by org.opends.server.api.SubstringMatchingRule
          extended by org.opends.server.schema.CaseIgnoreSubstringMatchingRule

public class CaseIgnoreSubstringMatchingRule
extends SubstringMatchingRule

This class defines the caseIgnoreSubstringsMatch matching rule defined in X.520 and referenced in RFC 2252.


Constructor Summary
CaseIgnoreSubstringMatchingRule()
          Creates a new instance of this caseIgnoreSubstringsMatch matching rule.
 
Method Summary
 java.lang.String getDescription()
          Retrieves the description for this matching rule.
 java.lang.String getName()
          Retrieves the common name for this matching rule.
 java.lang.String getOID()
          Retrieves the OID for this matching rule.
 java.lang.String getSyntaxOID()
          Retrieves the OID of the syntax with which this matching rule is associated.
 void initializeMatchingRule(SubstringMatchingRuleCfg configuration)
          Initializes this matching rule based on the information in the provided configuration entry.
 ByteString normalizeSubstring(ByteString substring)
          Normalizes the provided value fragment into a form that can be used to efficiently compare values.
 ByteString normalizeValue(ByteString value)
          Retrieves the normalized form of the provided value, which is best suited for efficiently performing matching operations on that value.
 boolean valueMatchesSubstring(ByteString value, ByteString subInitial, java.util.List<ByteString> subAnyElements, ByteString subFinal)
          Determines whether the provided value matches the given substring filter components.
 
Methods inherited from class org.opends.server.api.SubstringMatchingRule
valuesMatch
 
Methods inherited from class org.opends.server.api.MatchingRule
equals, finalizeMatchingRule, getNameOrOID, hashCode, isConfigurationAcceptable, isObsolete, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CaseIgnoreSubstringMatchingRule

public CaseIgnoreSubstringMatchingRule()
Creates a new instance of this caseIgnoreSubstringsMatch matching rule.

Method Detail

initializeMatchingRule

public void initializeMatchingRule(SubstringMatchingRuleCfg configuration)
                            throws ConfigException,
                                   InitializationException
Initializes this matching rule based on the information in the provided configuration entry.

Specified by:
initializeMatchingRule in class MatchingRule<SubstringMatchingRuleCfg>
Parameters:
configuration - The configuration to use to intialize this matching rule.
Throws:
ConfigException - If an unrecoverable problem arises in the process of performing the initialization.
InitializationException - If a problem that is not configuration-related occurs during initialization.

getName

public java.lang.String getName()
Retrieves the common name for this matching rule.

Specified by:
getName in class MatchingRule<SubstringMatchingRuleCfg>
Returns:
The common name for this matching rule, or null if it does not have a name.

getOID

public java.lang.String getOID()
Retrieves the OID for this matching rule.

Specified by:
getOID in class MatchingRule<SubstringMatchingRuleCfg>
Returns:
The OID for this matching rule.

getDescription

public java.lang.String getDescription()
Retrieves the description for this matching rule.

Specified by:
getDescription in class MatchingRule<SubstringMatchingRuleCfg>
Returns:
The description for this matching rule, or null if there is none.

getSyntaxOID

public java.lang.String getSyntaxOID()
Retrieves the OID of the syntax with which this matching rule is associated.

Specified by:
getSyntaxOID in class MatchingRule<SubstringMatchingRuleCfg>
Returns:
The OID of the syntax with which this matching rule is associated.

normalizeValue

public ByteString normalizeValue(ByteString value)
                          throws DirectoryException
Retrieves the normalized form of the provided value, which is best suited for efficiently performing matching operations on that value.

Specified by:
normalizeValue in class MatchingRule<SubstringMatchingRuleCfg>
Parameters:
value - The value to be normalized.
Returns:
The normalized version of the provided value.
Throws:
DirectoryException - If the provided value is invalid according to the associated attribute syntax.

normalizeSubstring

public ByteString normalizeSubstring(ByteString substring)
                              throws DirectoryException
Normalizes the provided value fragment into a form that can be used to efficiently compare values.

Specified by:
normalizeSubstring in class SubstringMatchingRule
Parameters:
substring - The value fragment to be normalized.
Returns:
The normalized form of the value fragment.
Throws:
DirectoryException - If the provided value fragment is not acceptable according to the associated syntax.

valueMatchesSubstring

public boolean valueMatchesSubstring(ByteString value,
                                     ByteString subInitial,
                                     java.util.List<ByteString> subAnyElements,
                                     ByteString subFinal)
Determines whether the provided value matches the given substring filter components. Note that any of the substring filter components may be null but at least one of them must be non-null.

Specified by:
valueMatchesSubstring in class SubstringMatchingRule
Parameters:
value - The normalized value against which to compare the substring components.
subInitial - The normalized substring value fragment that should appear at the beginning of the target value.
subAnyElements - The normalized substring value fragments that should appear in the middle of the target value.
subFinal - The normalized substring value fragment that should appear at the end of the target value.
Returns:
true if the provided value does match the given substring components, or false if not.