org.apache.directory.server.core.schema
Class DescriptionParsers

java.lang.Object
  extended by org.apache.directory.server.core.schema.DescriptionParsers

public class DescriptionParsers
extends java.lang.Object

Parses descriptions using a number of different parsers for schema descriptions. Also checks to make sure some things are valid as it's parsing paramters of certain entity types.

Version:
$Rev$
Author:
Apache Directory Project

Constructor Summary
DescriptionParsers(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
          Creates a description parser.
 
Method Summary
 org.apache.directory.shared.ldap.schema.AttributeType[] parseAttributeTypes(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parses a set of attributeTypeDescriptions held within an attribute into schema entities.
 org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescription[] parseComparators(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
           
 org.apache.directory.shared.ldap.schema.DITContentRule[] parseDitContentRules(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parses a set of dITContentRuleDescriptions held within an attribute into schema entities.
 org.apache.directory.shared.ldap.schema.DITStructureRule[] parseDitStructureRules(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parses a set of dITStructureRuleDescriptions held within an attribute into schema entities.
 org.apache.directory.shared.ldap.schema.LdapSyntax[] parseLdapSyntaxes(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parses a set of ldapSyntaxes held within an attribute into schema entities.
 org.apache.directory.shared.ldap.schema.MatchingRule[] parseMatchingRules(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parses a set of matchingRuleDescriptions held within an attribute into schema entities.
 org.apache.directory.shared.ldap.schema.MatchingRuleUse[] parseMatchingRuleUses(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parses a set of matchingRuleUseDescriptions held within an attribute into schema entities.
 org.apache.directory.shared.ldap.schema.NameForm[] parseNameForms(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parses a set of nameFormDescriptions held within an attribute into schema entities.
 org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription[] parseNormalizers(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
           
 org.apache.directory.shared.ldap.schema.ObjectClass[] parseObjectClasses(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parses a set of objectClassDescriptions held within an attribute into schema entities.
 org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescription[] parseSyntaxCheckers(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          Parse the SyntaxCheckers description
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptionParsers

public DescriptionParsers(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Creates a description parser.

Parameters:
globalRegistries - the registries to use while creating new schema entities
Method Detail

parseSyntaxCheckers

public org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescription[] parseSyntaxCheckers(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                                               throws org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException
Parse the SyntaxCheckers description

Parameters:
attr - The attribute containing the SC description
Returns:
The array of SyntaxCheckerDescription instances
Throws:
org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException - If something went wrong

parseNormalizers

public org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription[] parseNormalizers(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                                         throws org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException
Throws:
org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException

parseComparators

public org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescription[] parseComparators(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                                             throws org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException
Throws:
org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException

parseAttributeTypes

public org.apache.directory.shared.ldap.schema.AttributeType[] parseAttributeTypes(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                            throws org.apache.directory.shared.ldap.exception.LdapException
Parses a set of attributeTypeDescriptions held within an attribute into schema entities.

Parameters:
attr - the attribute containing attributeTypeDescriptions
Returns:
the set of attributeType objects for the descriptions
Throws:
org.apache.directory.shared.ldap.exception.LdapException - if there are problems parsing the descriptions

parseObjectClasses

public org.apache.directory.shared.ldap.schema.ObjectClass[] parseObjectClasses(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                         throws org.apache.directory.shared.ldap.exception.LdapException
Parses a set of objectClassDescriptions held within an attribute into schema entities.

Parameters:
attr - the attribute containing objectClassDescriptions
Returns:
the set of objectClass objects for the descriptions
Throws:
org.apache.directory.shared.ldap.exception.LdapException - if there are problems parsing the descriptions

parseMatchingRuleUses

public org.apache.directory.shared.ldap.schema.MatchingRuleUse[] parseMatchingRuleUses(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                                throws org.apache.directory.shared.ldap.exception.LdapException
Parses a set of matchingRuleUseDescriptions held within an attribute into schema entities.

Parameters:
attr - the attribute containing matchingRuleUseDescriptions
Returns:
the set of matchingRuleUse objects for the descriptions
Throws:
org.apache.directory.shared.ldap.exception.LdapException - if there are problems parsing the descriptions

parseLdapSyntaxes

public org.apache.directory.shared.ldap.schema.LdapSyntax[] parseLdapSyntaxes(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                       throws org.apache.directory.shared.ldap.exception.LdapException
Parses a set of ldapSyntaxes held within an attribute into schema entities.

Parameters:
attr - the attribute containing ldapSyntaxes
Returns:
the set of Syntax objects for the descriptions
Throws:
org.apache.directory.shared.ldap.exception.LdapException - if there are problems parsing the descriptions

parseMatchingRules

public org.apache.directory.shared.ldap.schema.MatchingRule[] parseMatchingRules(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                          throws org.apache.directory.shared.ldap.exception.LdapException
Parses a set of matchingRuleDescriptions held within an attribute into schema entities.

Parameters:
attr - the attribute containing matchingRuleDescriptions
Returns:
the set of matchingRule objects for the descriptions
Throws:
org.apache.directory.shared.ldap.exception.LdapException - if there are problems parsing the descriptions

parseDitStructureRules

public org.apache.directory.shared.ldap.schema.DITStructureRule[] parseDitStructureRules(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                                  throws org.apache.directory.shared.ldap.exception.LdapException
Parses a set of dITStructureRuleDescriptions held within an attribute into schema entities.

Parameters:
attr - the attribute containing dITStructureRuleDescriptions
Returns:
the set of DITStructureRule objects for the descriptions
Throws:
org.apache.directory.shared.ldap.exception.LdapException - if there are problems parsing the descriptions

parseDitContentRules

public org.apache.directory.shared.ldap.schema.DITContentRule[] parseDitContentRules(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                              throws org.apache.directory.shared.ldap.exception.LdapException
Parses a set of dITContentRuleDescriptions held within an attribute into schema entities.

Parameters:
attr - the attribute containing dITContentRuleDescriptions
Returns:
the set of DITContentRule objects for the descriptions
Throws:
org.apache.directory.shared.ldap.exception.LdapException - if there are problems parsing the descriptions

parseNameForms

public org.apache.directory.shared.ldap.schema.NameForm[] parseNameForms(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
                                                                  throws org.apache.directory.shared.ldap.exception.LdapException
Parses a set of nameFormDescriptions held within an attribute into schema entities.

Parameters:
attr - the attribute containing nameFormDescriptions
Returns:
the set of NameFormRule objects for the descriptions
Throws:
org.apache.directory.shared.ldap.exception.LdapException - if there are problems parsing the descriptions


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