Package org.forgerock.opendj.ldap.schema
Interface MatchingRuleImpl
-
- All Known Implementing Classes:
AbstractOrderingMatchingRuleImpl
,HistoricalCsnOrderingMatchingRuleImpl
,HistoricalCsnRangeMatchingRuleImpl
public interface MatchingRuleImpl
This interface defines the set of methods that must be implemented to define a new matching rule.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Collection<? extends Indexer>
createIndexers(Schema schema, IndexingOptions options)
Returns the indexers for this matching rule.default Assertion
getAssertion(Schema schema, ByteSequence assertionValue)
Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing less than matching operations on that value.default Assertion
getGreaterOrEqualAssertion(Schema schema, ByteSequence value)
Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing greater than or equal matching operations on that value.default Assertion
getLessOrEqualAssertion(Schema schema, ByteSequence value)
Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing less than or equal matching operations on that value.default Assertion
getSubstringAssertion(Schema schema, ByteSequence subInitial, List<? extends ByteSequence> subAnyElements, ByteSequence subFinal)
Retrieves the normalized form of the provided assertion substring values, which is best suited for efficiently performing matching operations on that value.MatchingRule.MatchingRuleType
getType()
Returns the type of this matching rule.ByteString
normalizeAttributeValue(Schema schema, ByteSequence value)
Retrieves the normalized form of the provided attribute value, which is best suited for efficiently performing matching operations on that value.
-
-
-
Method Detail
-
getType
MatchingRule.MatchingRuleType getType()
Returns the type of this matching rule.- Returns:
- the type of this matching rule.
-
getAssertion
default Assertion getAssertion(Schema schema, ByteSequence assertionValue) throws DecodeException
Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing less than matching operations on that value. The assertion value is guaranteed to be valid against this matching rule's assertion syntax.- Parameters:
schema
- The schema in which this matching rule is defined.assertionValue
- The syntax checked assertion value to be normalized.- Returns:
- The normalized version of the provided assertion value.
- Throws:
DecodeException
- if an syntax error occurred while parsing the value.
-
getSubstringAssertion
default Assertion getSubstringAssertion(Schema schema, ByteSequence subInitial, List<? extends ByteSequence> subAnyElements, ByteSequence subFinal) throws DecodeException
Retrieves the normalized form of the provided assertion substring values, which is best suited for efficiently performing matching operations on that value.- Parameters:
schema
- The schema in which this matching rule is defined.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:
- The normalized version of the provided assertion value.
- Throws:
DecodeException
- if an syntax error occurred while parsing the value.
-
getGreaterOrEqualAssertion
default Assertion getGreaterOrEqualAssertion(Schema schema, ByteSequence value) throws DecodeException
Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing greater than or equal matching operations on that value. The assertion value is guaranteed to be valid against this matching rule's assertion syntax.- Parameters:
schema
- The schema in which this matching rule is defined.value
- The syntax checked assertion value to be normalized.- Returns:
- The normalized version of the provided assertion value.
- Throws:
DecodeException
- if an syntax error occurred while parsing the value.
-
getLessOrEqualAssertion
default Assertion getLessOrEqualAssertion(Schema schema, ByteSequence value) throws DecodeException
Retrieves the normalized form of the provided assertion value, which is best suited for efficiently performing less than or equal matching operations on that value. The assertion value is guaranteed to be valid against this matching rule's assertion syntax.- Parameters:
schema
- The schema in which this matching rule is defined.value
- The syntax checked assertion value to be normalized.- Returns:
- The normalized version of the provided assertion value.
- Throws:
DecodeException
- if an syntax error occurred while parsing the value.
-
normalizeAttributeValue
ByteString normalizeAttributeValue(Schema schema, ByteSequence value) throws DecodeException
Retrieves the normalized form of the provided attribute value, which is best suited for efficiently performing matching operations on that value. Equality and ordering matching rules should return a normalized representation which can be compared with other normalized values usingByteSequence.equals(Object)
andByteSequence.compareTo(ByteSequence)
.- Parameters:
schema
- The schema in which this matching rule is defined.value
- The attribute value to be normalized.- Returns:
- The normalized version of the provided attribute value.
- Throws:
DecodeException
- If an syntax error occurred while parsing the value.
-
createIndexers
Collection<? extends Indexer> createIndexers(Schema schema, IndexingOptions options)
Returns the indexers for this matching rule.- Parameters:
schema
- The schema in which this matching rule is defined.options
- The indexing options.- Returns:
- a non null collection of indexers for this matching rule.
-
-