org.apache.directory.shared.ldap.schema.loader.ldif
Class LdifSchemaLoader

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.registries.AbstractSchemaLoader
      extended by org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader
All Implemented Interfaces:
SchemaLoader

public class LdifSchemaLoader
extends AbstractSchemaLoader

Loads schema data from LDIF files containing entries representing schema objects, using the meta schema format. This class is used only for tests.

Version:
$Revision$
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.schema.registries.AbstractSchemaLoader
listener, schemaMap
 
Constructor Summary
LdifSchemaLoader(java.io.File baseDirectory)
          Creates a new LDIF based SchemaLoader.
 
Method Summary
 java.util.List<Entry> loadAttributeTypes(Schema... schemas)
          Loads a set of schemas.
 java.util.List<Entry> loadComparators(Schema... schemas)
          Build a list of Comparators read from the underlying storage for a list of specific schema.
 java.util.List<Entry> loadDitContentRules(Schema... schemas)
          Build a list of DitContentRules read from the underlying storage for a list of specific schema.
 java.util.List<Entry> loadDitStructureRules(Schema... schemas)
          Build a list of DitStructureRules read from the underlying storage for a list of specific schema.
 java.util.List<Entry> loadMatchingRules(Schema... schemas)
          Build a list of MatchingRules read from the underlying storage for a list of specific schema
 java.util.List<Entry> loadMatchingRuleUses(Schema... schemas)
          Build a list of MatchingRuleUses read from the underlying storage for a list of specific schema.
 java.util.List<Entry> loadNameForms(Schema... schemas)
          Build a list of NameForms read from the underlying storage for a list of specific schema.
 java.util.List<Entry> loadNormalizers(Schema... schemas)
          Build a list of Normalizers read from the underlying storage for a list of specified schema
 java.util.List<Entry> loadObjectClasses(Schema... schemas)
          Build a list of ObjectClasses read from the underlying storage for a list of specific schema.
 java.util.List<Entry> loadSyntaxCheckers(Schema... schemas)
          Build a list of SyntaxCheckers read from the underlying storage for a list of specified schema
 java.util.List<Entry> loadSyntaxes(Schema... schemas)
          Build a list of Syntaxes read from the underlying storage for a list of specified schema
 
Methods inherited from class org.apache.directory.shared.ldap.schema.registries.AbstractSchemaLoader
addSchema, getAllEnabled, getAllSchemas, getDao, getSchema, getSchema, loadAttributeTypes, loadComparators, loadDitContentRules, loadDitStructureRules, loadMatchingRules, loadMatchingRuleUses, loadNameForms, loadNormalizers, loadObjectClasses, loadSyntaxCheckers, loadSyntaxes, notifyListenerOrRegistries, removeSchema, setListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdifSchemaLoader

public LdifSchemaLoader(java.io.File baseDirectory)
                 throws java.lang.Exception
Creates a new LDIF based SchemaLoader. The constructor checks to make sure the supplied base directory exists and contains a schema.ldif file and if not complains about it.

Parameters:
baseDirectory - the schema LDIF base directory
Throws:
java.lang.Exception - if the base directory does not exist or does not a valid schema.ldif file
Method Detail

loadComparators

public java.util.List<Entry> loadComparators(Schema... schemas)
                                      throws java.lang.Exception
Build a list of Comparators read from the underlying storage for a list of specific schema.

Parameters:
schemas - the schemas from which Comparators are loaded
Throws:
java.lang.Exception - if there are failures accessing Comparator information

loadSyntaxCheckers

public java.util.List<Entry> loadSyntaxCheckers(Schema... schemas)
                                         throws java.lang.Exception
Build a list of SyntaxCheckers read from the underlying storage for a list of specified schema

Parameters:
schemas - the schemas from which SyntaxCheckers are loaded
Throws:
java.lang.Exception - if there are failures accessing SyntaxChecker information

loadNormalizers

public java.util.List<Entry> loadNormalizers(Schema... schemas)
                                      throws java.lang.Exception
Build a list of Normalizers read from the underlying storage for a list of specified schema

Parameters:
schemas - the schemas from which Normalizers are loaded
Throws:
java.lang.Exception - if there are failures accessing Normalizer information

loadMatchingRules

public java.util.List<Entry> loadMatchingRules(Schema... schemas)
                                        throws java.lang.Exception
Build a list of MatchingRules read from the underlying storage for a list of specific schema

Parameters:
schemas - the schemas from which MatchingRules are loaded
Throws:
java.lang.Exception - if there are failures accessing MatchingRule information

loadSyntaxes

public java.util.List<Entry> loadSyntaxes(Schema... schemas)
                                   throws java.lang.Exception
Build a list of Syntaxes read from the underlying storage for a list of specified schema

Parameters:
schemas - the schemas from which Syntaxes are loaded
Throws:
java.lang.Exception - if there are failures accessing Syntax information

loadAttributeTypes

public java.util.List<Entry> loadAttributeTypes(Schema... schemas)
                                         throws java.lang.Exception
Loads a set of schemas. A best effort should be made to load the dependended schemas that these schemas may rely on even if they are not included in the collection.

Parameters:
schemas - the set of schemas to load
Returns:
the list of erros we met during the loading of schemas
Throws:
java.lang.Exception - if any kind of problems are encountered during the load List loadWithDependencies( Registries registries, boolean check, Schema... schemas ) throws Exception; /** Loads all available enabled schemas.

loadMatchingRuleUses

public java.util.List<Entry> loadMatchingRuleUses(Schema... schemas)
                                           throws java.lang.Exception
Build a list of MatchingRuleUses read from the underlying storage for a list of specific schema.

Parameters:
schemas - the schemas from which MatchingRuleUses are loaded
Throws:
java.lang.Exception - if there are failures accessing MatchingRuleUse information

loadNameForms

public java.util.List<Entry> loadNameForms(Schema... schemas)
                                    throws java.lang.Exception
Build a list of NameForms read from the underlying storage for a list of specific schema.

Parameters:
schemas - the schemas from which NameForms are loaded
Throws:
java.lang.Exception - if there are failures accessing NameForm information

loadDitContentRules

public java.util.List<Entry> loadDitContentRules(Schema... schemas)
                                          throws java.lang.Exception
Build a list of DitContentRules read from the underlying storage for a list of specific schema.

Parameters:
schemas - the schemas from which DitContentRules are loaded
Throws:
java.lang.Exception - if there are failures accessing DitContentRule information

loadDitStructureRules

public java.util.List<Entry> loadDitStructureRules(Schema... schemas)
                                            throws java.lang.Exception
Build a list of DitStructureRules read from the underlying storage for a list of specific schema.

Parameters:
schemas - the schemas from which DitStructureRules are loaded
Throws:
java.lang.Exception - if there are failures accessing DitStructureRule information

loadObjectClasses

public java.util.List<Entry> loadObjectClasses(Schema... schemas)
                                        throws java.lang.Exception
Build a list of ObjectClasses read from the underlying storage for a list of specific schema.

Parameters:
schemas - the schemas from which ObjectClasses are loaded
Throws:
java.lang.Exception - if there are failures accessing ObjectClass information


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