org.apache.directory.shared.ldap.schema.parsers
Class AttributeTypeDescriptionSchemaParser

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

public class AttributeTypeDescriptionSchemaParser
extends AbstractSchemaParser

A parser for RFC 4512 attribute type descriptions.

Version:
$Rev$, $Date$
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.shared.ldap.schema.parsers.AbstractSchemaParser
lexer, monitor, parser
 
Constructor Summary
AttributeTypeDescriptionSchemaParser()
          Creates a schema parser instance.
 
Method Summary
 AttributeType parse(java.lang.String schemaDescription)
          Parses a AttributeType description
 AttributeType parseAttributeTypeDescription(java.lang.String attributeTypeDescription)
          Parses a attribute type description according to RFC 4512:
 
Methods inherited from class org.apache.directory.shared.ldap.schema.parsers.AbstractSchemaParser
isQuirksMode, reset, setParserMonitor, setQuirksMode, setSchemaName
 
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

AttributeTypeDescriptionSchemaParser

public AttributeTypeDescriptionSchemaParser()
Creates a schema parser instance.

Method Detail

parseAttributeTypeDescription

public AttributeType 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 AttributeType parse(java.lang.String schemaDescription)
                    throws java.text.ParseException
Parses a AttributeType description

Specified by:
parse in class AbstractSchemaParser
Parameters:
The - AttributeType description to parse
Returns:
An instance of AttributeType
Throws:
java.text.ParseException - If the parsing failed


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