Class MatchingRuleDescriptionSchemaParser

java.lang.Object
org.apache.directory.api.ldap.model.schema.parsers.AbstractSchemaParser<MatchingRule>
org.apache.directory.api.ldap.model.schema.parsers.MatchingRuleDescriptionSchemaParser

public class MatchingRuleDescriptionSchemaParser extends AbstractSchemaParser<MatchingRule>
A parser for RFC 4512 matching rule descriptions.
Author:
Apache Directory Project
  • Constructor Details

    • MatchingRuleDescriptionSchemaParser

      public MatchingRuleDescriptionSchemaParser()
      Creates a schema parser instance.
  • Method Details

    • parse

      public MatchingRule parse(String matchingRuleDescription) throws ParseException
      Parses a matching rule description according to RFC 4512:
      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
      
      extensions = *( SP xstring SP qdstrings )
      xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE ) 
      
      Specified by:
      parse in class AbstractSchemaParser<MatchingRule>
      Parameters:
      matchingRuleDescription - the matching rule description to be parsed
      Returns:
      the parsed MatchingRuleDescription bean
      Throws:
      ParseException - if there are any recognition errors (bad syntax)