org.apache.directory.shared.ldap.schema
Interface MatchingRule

All Superinterfaces:
SchemaObject
All Known Implementing Classes:
AbstractMatchingRule

public interface MatchingRule
extends SchemaObject

A matchingRule definition. MatchingRules associate a comparator and a normalizer, forming the basic tools necessary to assert actions against attribute values. MatchingRules are associated with a specific Syntax for the purpose of resolving a normalized form and for comparisons.

According to ldapbis [MODELS]:

  4.1.3. Matching Rules
  
    Matching rules are used by servers to compare attribute values against
    assertion values when performing Search and Compare operations.  They
    are also used to identify the value to be added or deleted when
    modifying entries, and are used when comparing a purported
    distinguished name with the name of an entry.
  
    A matching rule specifies the syntax of the assertion value.
 
    Each matching rule is identified by an object identifier (OID) and,
    optionally, one or more short names (descriptors).
 
    Matching rule definitions are written according to the ABNF:
 
      MatchingRuleDescription = LPAREN WSP
          numericoid                ; object identifier
          [ SP "NAME" SP qdescrs ]  ; short names (descriptors)
          [ SP "DESC" SP qdstring ] ; description
          [ SP "OBSOLETE" ]         ; not active
          SP "SYNTAX" SP numericoid ; assertion syntax
          extensions WSP RPAREN     ; extensions
 
    where:
      [numericoid] is object identifier assigned to this matching rule;
      NAME [qdescrs] are short names (descriptors) identifying this
          matching rule;
      DESC [qdstring] is a short descriptive string;
      OBSOLETE indicates this matching rule is not active;
      SYNTAX identifies the assertion syntax by object identifier; and
      [extensions] describe extensions.
 

Version:
$Rev: 379008 $
Author:
Apache Directory Project
See Also:
RFC 2252 Section 4.5, ldapbis [MODELS], DescriptionUtils.getDescription(MatchingRule)

Method Summary
 java.util.Comparator getComparator()
          Gets the Comparator enabling the use of this MatchingRule for ORDERING and sorted indexing.
 Normalizer getNormalizer()
          Gets the Normalizer enabling the use of this MatchingRule for EQUALITY matching and indexing.
 Syntax getSyntax()
          Gets the SyntaxImpl used by this MatchingRule.
 
Methods inherited from interface org.apache.directory.shared.ldap.schema.SchemaObject
getDescription, getName, getNames, getOid, isObsolete
 

Method Detail

getSyntax

public Syntax getSyntax()
                 throws javax.naming.NamingException
Gets the SyntaxImpl used by this MatchingRule.

Returns:
the SyntaxImpl of this MatchingRule
Throws:
javax.naming.NamingException - if there is a failure resolving the object

getComparator

public java.util.Comparator getComparator()
                                   throws javax.naming.NamingException
Gets the Comparator enabling the use of this MatchingRule for ORDERING and sorted indexing.

Returns:
the ordering Comparator
Throws:
javax.naming.NamingException - if there is a failure resolving the object

getNormalizer

public Normalizer getNormalizer()
                         throws javax.naming.NamingException
Gets the Normalizer enabling the use of this MatchingRule for EQUALITY matching and indexing.

Returns:
the ordering Comparator
Throws:
javax.naming.NamingException - if there is a failure resolving the object


Copyright © 2003-2006 . All Rights Reserved.