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

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

public class AttributeTypeDescriptionSchemaParser
extends AbstractSchemaParser

A parser for RFC 4512 attribute type 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
AttributeTypeDescriptionSchemaParser()
          Creates a schema parser instance.
 
Method Summary
 AbstractSchemaDescription parse(java.lang.String schemaDescription)
           
 AttributeTypeDescription parseAttributeTypeDescription(java.lang.String attributeTypeDescription)
          Parses a attribute type 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

AttributeTypeDescriptionSchemaParser

public AttributeTypeDescriptionSchemaParser()
Creates a schema parser instance.

Method Detail

parseAttributeTypeDescription

public AttributeTypeDescription parseAttributeTypeDescription(java.lang.String attributeTypeDescription)
                                                       throws java.text.ParseException
Parses a attribute type description according to RFC 4512:
 AttributeTypeDescription = LPAREN WSP
     numericoid                    ; object identifier
     [ SP "NAME" SP qdescrs ]      ; short names (descriptors)
     [ SP "DESC" SP qdstring ]     ; description
     [ SP "OBSOLETE" ]             ; not active
     [ SP "SUP" SP oid ]           ; supertype
     [ SP "EQUALITY" SP oid ]      ; equality matching rule
     [ SP "ORDERING" SP oid ]      ; ordering matching rule
     [ SP "SUBSTR" SP oid ]        ; substrings matching rule
     [ SP "SYNTAX" SP noidlen ]    ; value syntax
     [ SP "SINGLE-VALUE" ]         ; single-value
     [ SP "COLLECTIVE" ]           ; collective
     [ SP "NO-USER-MODIFICATION" ] ; not user modifiable
     [ SP "USAGE" SP usage ]       ; usage
     extensions WSP RPAREN         ; extensions
 
 usage = "userApplications"     /  ; user
         "directoryOperation"   /  ; directory operational
         "distributedOperation" /  ; DSA-shared operational
         "dSAOperation"            ; DSA-specific operational     
 
 extensions = *( SP xstring SP qdstrings )
 xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE ) 
 

Parameters:
attributeTypeDescription - the attribute type description to be parsed
Returns:
the parsed AttributeTypeDescription 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.