Class JarLdifSchemaLoader

java.lang.Object
org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
org.apache.directory.api.ldap.schema.loader.JarLdifSchemaLoader
All Implemented Interfaces:
org.apache.directory.api.ldap.model.schema.registries.SchemaLoader

public class JarLdifSchemaLoader extends org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader
Loads schema data from LDIF files containing entries representing schema objects, using the meta schema format. This class is used only for tests.
Author:
Apache Directory Project
  • Field Summary

    Fields inherited from class org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader

    schemaMap
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new LDIF based SchemaLoader.
    JarLdifSchemaLoader(boolean allowDuplicateResources)
    Creates a new LDIF based SchemaLoader.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true, if loading duplicate resources is allowed.
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadAttributeTypes(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadComparators(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadDitContentRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadDitStructureRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadMatchingRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadMatchingRuleUses(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadNameForms(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadNormalizers(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadObjectClasses(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadSyntaxCheckers(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)
    List<org.apache.directory.api.ldap.model.entry.Entry>
    loadSyntaxes(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas)

    Methods inherited from class org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader

    addSchema, getAllEnabled, getAllSchemas, getSchema, getSchema, isRelaxed, isStrict, loadAttributeTypes, loadComparators, loadDitContentRules, loadDitStructureRules, loadMatchingRules, loadMatchingRuleUses, loadNameForms, loadNormalizers, loadObjectClasses, loadSyntaxCheckers, loadSyntaxes, removeSchema, setRelaxed

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JarLdifSchemaLoader

      public JarLdifSchemaLoader() throws IOException, org.apache.directory.api.ldap.model.exception.LdapException
      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.
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException - if the base directory does not exist or does not a valid schema.ldif file
      IOException - If we can't load the schema
    • JarLdifSchemaLoader

      public JarLdifSchemaLoader(boolean allowDuplicateResources) throws IOException, org.apache.directory.api.ldap.model.exception.LdapException
      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:
      allowDuplicateResources - If set to true, loading duplicate resources is allowed. E.g. loading schema definitions that are loaded several times on the classpath. In case of several files with the same name, it returns any of them. This is useful in cases when the same artefacts are loaded several times, e.g. in some testing scenarios or weird classloading situations.
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException - if the base directory does not exist or does not a valid schema.ldif file
      IOException - If we can't load the schema
  • Method Details

    • isAllowDuplicateResources

      public boolean isAllowDuplicateResources()
      Returns true, if loading duplicate resources is allowed. E.g. loading schema definitions that are loaded several times on the classpath. In case of several files with the same name, it returns any of them. This is useful in cases when the same artefacts are loaded several times, e.g. in some testing scenarios or weird classloading situations.
      Returns:
      trueif loading duplicate resources is allowed.
    • loadComparators

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadComparators(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadSyntaxCheckers

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadSyntaxCheckers(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadNormalizers

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadNormalizers(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadMatchingRules

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadMatchingRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadSyntaxes

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadSyntaxes(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadAttributeTypes

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadAttributeTypes(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadMatchingRuleUses

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadMatchingRuleUses(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadNameForms

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadNameForms(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadDitContentRules

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadDitContentRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadDitStructureRules

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadDitStructureRules(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException
    • loadObjectClasses

      public List<org.apache.directory.api.ldap.model.entry.Entry> loadObjectClasses(org.apache.directory.api.ldap.model.schema.registries.Schema... schemas) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
      Throws:
      org.apache.directory.api.ldap.model.exception.LdapException
      IOException