Class MatchingRule
java.lang.Object
org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
org.apache.directory.api.ldap.model.schema.MatchingRule
- All Implemented Interfaces:
Serializable, 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.
- Author:
- Apache Directory Project
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LdapComparator<? super Object> The associated Comparatorprotected LdapSyntaxThe associated LdapSyntaxprotected StringThe associated LdapSyntax OIDprotected NormalizerThe associated Normalizerstatic final longDeclares the Serial Version UidFields inherited from class AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.copy()Copy an MatchingRulebooleanLdapComparator<? super Object> Gets the LdapComparator enabling the use of this MatchingRule for ORDERING and sorted indexing.Gets the Normalizer enabling the use of this MatchingRule for EQUALITY matching and indexing.Gets the LdapSyntax used by this MatchingRule.Gets the LdapSyntax OID used by this MatchingRule.voidrehash()Compute the hashcode, and store it in the 'h' variablevoidsetLdapComparator(LdapComparator<?> ldapComparator) Sets the LdapComparatorvoidsetNormalizer(Normalizer normalizer) Sets the NormalizervoidsetSyntax(LdapSyntax ldapSyntax) Sets the SyntaxvoidsetSyntaxOid(String oid) Sets the Syntax's OIDtoString()Methods inherited from class AbstractSchemaObject
addExtension, addExtension, addName, compareOid, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, hashCode, isDisabled, isEnabled, isObsolete, lock, rehashBase, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
Field Details
-
serialVersionUID
public static final long serialVersionUIDDeclares the Serial Version Uid- See Also:
-
ldapComparator
The associated Comparator -
normalizer
The associated Normalizer -
ldapSyntax
The associated LdapSyntax -
ldapSyntaxOid
The associated LdapSyntax OID
-
-
Constructor Details
-
MatchingRule
Creates a new instance of MatchingRule.- Parameters:
oid- The MatchingRule OID
-
-
Method Details
-
getSyntax
Gets the LdapSyntax used by this MatchingRule.- Returns:
- the LdapSyntax of this MatchingRule
-
setSyntax
-
getSyntaxOid
Gets the LdapSyntax OID used by this MatchingRule.- Returns:
- the LdapSyntax of this MatchingRule
-
setSyntaxOid
-
getLdapComparator
Gets the LdapComparator enabling the use of this MatchingRule for ORDERING and sorted indexing.- Returns:
- the ordering LdapComparator
-
setLdapComparator
Sets the LdapComparator- Parameters:
ldapComparator- The LdapComparator
-
getNormalizer
Gets the Normalizer enabling the use of this MatchingRule for EQUALITY matching and indexing.- Returns:
- the associated normalizer
-
setNormalizer
Sets the Normalizer- Parameters:
normalizer- The Normalizer
-
toString
-
copy
-
rehash
public void rehash()Description copied from class:AbstractSchemaObjectCompute the hashcode, and store it in the 'h' variable- Overrides:
rehashin classAbstractSchemaObject- See Also:
-
equals
Description copied from class:AbstractSchemaObject- Specified by:
equalsin interfaceSchemaObject- Overrides:
equalsin classAbstractSchemaObject- See Also:
-
clear
public void clear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.- Specified by:
clearin interfaceSchemaObject- Overrides:
clearin classAbstractSchemaObject
-