org.apache.directory.api.ldap.model.schema.parsers
Class MatchingRuleUseDescriptionSchemaParser

java.lang.Object
  extended by org.apache.directory.api.ldap.model.schema.parsers.AbstractSchemaParser
      extended by org.apache.directory.api.ldap.model.schema.parsers.MatchingRuleUseDescriptionSchemaParser

public class MatchingRuleUseDescriptionSchemaParser
extends AbstractSchemaParser

A parser for RFC 4512 matching rule use descriptions.

Author:
Apache Directory Project

Field Summary
protected static org.slf4j.Logger LOG
          The LoggerFactory used by this class
 
Fields inherited from class org.apache.directory.api.ldap.model.schema.parsers.AbstractSchemaParser
lexer, monitor, parser
 
Constructor Summary
MatchingRuleUseDescriptionSchemaParser()
          Creates a schema parser instance.
 
Method Summary
 MatchingRuleUse parse(String schemaDescription)
          Parses a MatchingRuleUse description.
 MatchingRuleUse parseMatchingRuleUseDescription(String matchingRuleUseDescription)
          Parses a matching rule use description according to RFC 4512:
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.parsers.AbstractSchemaParser
isQuirksMode, reset, setParserMonitor, setQuirksMode, updateSchemaName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
The LoggerFactory used by this class

Constructor Detail

MatchingRuleUseDescriptionSchemaParser

public MatchingRuleUseDescriptionSchemaParser()
Creates a schema parser instance.

Method Detail

parseMatchingRuleUseDescription

public MatchingRuleUse parseMatchingRuleUseDescription(String matchingRuleUseDescription)
                                                throws ParseException
Parses a matching rule use description according to RFC 4512:
 MatchingRuleUseDescription = LPAREN WSP
    numericoid                 ; object identifier
    [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
    [ SP "DESC" SP qdstring ]  ; description
    [ SP "OBSOLETE" ]          ; not active
    SP "APPLIES" SP oids       ; attribute types
    extensions WSP RPAREN      ; extensions
 
 extensions = *( SP xstring SP qdstrings )
 xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE ) 
 

Parameters:
matchingRuleUseDescription - the matching rule use description to be parsed
Returns:
the parsed MatchingRuleUseDescription bean
Throws:
ParseException - if there are any recognition errors (bad syntax)

parse

public MatchingRuleUse parse(String schemaDescription)
                      throws ParseException
Parses a MatchingRuleUse description.

Specified by:
parse in class AbstractSchemaParser
Parameters:
schemaDescription - The MatchingRuleUse description to parse
Returns:
An instance of MatchingRuleUse
Throws:
ParseException - If the parsing failed


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.