org.opends.server.schema
Class GeneralizedTimeEqualityMatchingRule

java.lang.Object
  extended by org.opends.server.api.MatchingRule<EqualityMatchingRuleCfg>
      extended by org.opends.server.api.EqualityMatchingRule
          extended by org.opends.server.schema.GeneralizedTimeEqualityMatchingRule

public class GeneralizedTimeEqualityMatchingRule
extends EqualityMatchingRule

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


Constructor Summary
GeneralizedTimeEqualityMatchingRule()
          Creates a new instance of this generalizedTimeMatch matching rule.
 
Method Summary
 boolean areEqual(ByteString value1, ByteString value2)
          Indicates whether the two provided normalized values are equal to each other.
 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(EqualityMatchingRuleCfg configuration)
          Initializes this matching rule based on the information in the provided configuration entry.
 ByteString normalizeValue(ByteString value)
          Retrieves the normalized form of the provided value, which is best suited for efficiently performing matching operations on that value.
 
Methods inherited from class org.opends.server.api.EqualityMatchingRule
generateHashCode, 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

GeneralizedTimeEqualityMatchingRule

public GeneralizedTimeEqualityMatchingRule()
Creates a new instance of this generalizedTimeMatch matching rule.

Method Detail

initializeMatchingRule

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

Specified by:
initializeMatchingRule in class MatchingRule<EqualityMatchingRuleCfg>
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<EqualityMatchingRuleCfg>
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<EqualityMatchingRuleCfg>
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<EqualityMatchingRuleCfg>
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<EqualityMatchingRuleCfg>
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<EqualityMatchingRuleCfg>
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.

areEqual

public boolean areEqual(ByteString value1,
                        ByteString value2)
Indicates whether the two provided normalized values are equal to each other.

Specified by:
areEqual in class EqualityMatchingRule
Parameters:
value1 - The normalized form of the first value to compare.
value2 - The normalized form of the second value to compare.
Returns:
true if the provided values are equal, or false if not.