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
ConstructorsConstructorDescriptionCreates a new LDIF based SchemaLoader.JarLdifSchemaLoader(boolean allowDuplicateResources) Creates a new LDIF based SchemaLoader. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns 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
-
Constructor Details
-
JarLdifSchemaLoader
public JarLdifSchemaLoader() throws IOException, org.apache.directory.api.ldap.model.exception.LdapExceptionCreates 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 fileIOException- 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 fileIOException- 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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-
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.LdapExceptionIOException
-