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

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

public class ObjectClassDescriptionSchemaParser
extends AbstractSchemaParser

A parser for RFC 4512 object class descriptons

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
ObjectClassDescriptionSchemaParser()
          Creates a schema parser instance.
 
Method Summary
 ObjectClass parse(String schemaDescription)
          Parses a ObjectClass description.
 MutableObjectClass parseObjectClassDescription(String objectClassDescription)
          Parses a object class definition 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

ObjectClassDescriptionSchemaParser

public ObjectClassDescriptionSchemaParser()
Creates a schema parser instance.

Method Detail

parseObjectClassDescription

public MutableObjectClass parseObjectClassDescription(String objectClassDescription)
                                               throws ParseException
Parses a object class definition according to RFC 4512:
 ObjectClassDescription = LPAREN WSP
     numericoid                 ; object identifier
     [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
     [ SP "DESC" SP qdstring ]  ; description
     [ SP "OBSOLETE" ]          ; not active
     [ SP "SUP" SP oids ]       ; superior object classes
     [ SP kind ]                ; kind of class
     [ SP "MUST" SP oids ]      ; attribute types
     [ SP "MAY" SP oids ]       ; attribute types
     extensions WSP RPAREN

 kind = "ABSTRACT" / "STRUCTURAL" / "AUXILIARY"
 
 extensions = *( SP xstring SP qdstrings )
 xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE )
 

Parameters:
objectClassDescription - the object class description to be parsed
Returns:
the parsed ObjectClassDescription bean
Throws:
ParseException - if there are any recognition errors (bad syntax)

parse

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

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


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