org.apache.directory.shared.ldap.schema.syntax.parser
Class MatchingRuleUseDescriptionSchemaParser

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.syntax.parser.AbstractSchemaParser
      extended by org.apache.directory.shared.ldap.schema.syntax.parser.MatchingRuleUseDescriptionSchemaParser

public class MatchingRuleUseDescriptionSchemaParser
extends AbstractSchemaParser

A parser for RFC 4512 matching rule use descriptions.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.schema.syntax.parser.AbstractSchemaParser
lexer, monitor, parser
 
Constructor Summary
MatchingRuleUseDescriptionSchemaParser()
          Creates a schema parser instance.
 
Method Summary
 AbstractSchemaDescription parse(java.lang.String schemaDescription)
           
 MatchingRuleUseDescription parseMatchingRuleUseDescription(java.lang.String matchingRuleUseDescription)
          Parses a matching rule use description according to RFC 4512:
 
Methods inherited from class org.apache.directory.shared.ldap.schema.syntax.parser.AbstractSchemaParser
isQuirksMode, reset, setParserMonitor, setQuirksMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatchingRuleUseDescriptionSchemaParser

public MatchingRuleUseDescriptionSchemaParser()
Creates a schema parser instance.

Method Detail

parseMatchingRuleUseDescription

public MatchingRuleUseDescription parseMatchingRuleUseDescription(java.lang.String matchingRuleUseDescription)
                                                           throws java.text.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:
java.text.ParseException - if there are any recognition errors (bad syntax)

parse

public AbstractSchemaDescription parse(java.lang.String schemaDescription)
                                throws java.text.ParseException
Specified by:
parse in class AbstractSchemaParser
Throws:
java.text.ParseException


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.