Java Code Examples for org.apache.directory.api.ldap.model.schema.registries.Schema#getSchemaLoader()

The following examples show how to use org.apache.directory.api.ldap.model.schema.registries.Schema#getSchemaLoader() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultSchemaManager.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
/**
 * Add all the Schema's AttributeTypes
 * 
 * @param schema The schema in which the AttributeTypes will be added
 * @param registries The Registries to process
 * @throws LdapException If the AttributeTypes cannot be added
 * @throws IOException If the AttributeTypes cannot be loaded
 */
private void addAttributeTypes( Schema schema, Registries registries ) throws LdapException, IOException
{
    if ( schema.getSchemaLoader() == null )
    {
        return;
    }

    for ( Entry entry : schema.getSchemaLoader().loadAttributeTypes( schema ) )
    {
        AttributeType attributeType = factory.getAttributeType( this, entry, registries, schema.getSchemaName() );

        addSchemaObject( registries, attributeType, schema );
    }
}
 
Example 2
Source File: DefaultSchemaManager.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
/**
 * Add all the Schema's comparators
 * 
 * @param schema The schema in which the Comparators will be added
 * @param registries The Registries to process
 * @throws LdapException If the Comparators cannot be added
 * @throws IOException If the Comparators cannot be loaded
 */
private void addComparators( Schema schema, Registries registries ) throws LdapException, IOException
{
    if ( schema.getSchemaLoader() == null )
    {
        return;
    }
    
    for ( Entry entry : schema.getSchemaLoader().loadComparators( schema ) )
    {
        LdapComparator<?> comparator = factory.getLdapComparator( this, entry, registries, schema.getSchemaName() );

        addSchemaObject( registries, comparator, schema );
    }
}
 
Example 3
Source File: DefaultSchemaManager.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
/**
 * Add all the Schema's MatchingRules
 * 
 * @param schema The schema in which the MatchingRules will be added
 * @param registries The Registries to process
 * @throws LdapException If the MatchingRules cannot be added
 * @throws IOException If the MatchingRules cannot be loaded
 */
private void addMatchingRules( Schema schema, Registries registries ) throws LdapException, IOException
{
    if ( schema.getSchemaLoader() == null )
    {
        return;
    }

    for ( Entry entry : schema.getSchemaLoader().loadMatchingRules( schema ) )
    {
        MatchingRule matchingRule = factory.getMatchingRule( this, entry, registries, schema.getSchemaName() );

        addSchemaObject( registries, matchingRule, schema );
    }
}
 
Example 4
Source File: DefaultSchemaManager.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
/**
 * Add all the Schema's Normalizers
 * 
 * @param schema The schema in which the Normalizers will be added
 * @param registries The Registries to process
 * @throws LdapException If the Normalizers cannot be added
 * @throws IOException If the Normalizers cannot be loaded
 */
private void addNormalizers( Schema schema, Registries registries ) throws LdapException, IOException
{
    if ( schema.getSchemaLoader() == null )
    {
        return;
    }

    for ( Entry entry : schema.getSchemaLoader().loadNormalizers( schema ) )
    {
        Normalizer normalizer = factory.getNormalizer( this, entry, registries, schema.getSchemaName() );

        addSchemaObject( registries, normalizer, schema );
    }
}
 
Example 5
Source File: DefaultSchemaManager.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
/**
 * Add all the Schema's ObjectClasses
 * 
 * @param schema The schema in which the ObjectClasses will be added
 * @param registries The Registries to process
 * @throws LdapException If the ObjectClasses cannot be added
 * @throws IOException If the ObjectClasses cannot be loaded
 */
private void addObjectClasses( Schema schema, Registries registries ) throws LdapException, IOException
{
    if ( schema.getSchemaLoader() == null )
    {
        return;
    }

    for ( Entry entry : schema.getSchemaLoader().loadObjectClasses( schema ) )
    {
        ObjectClass objectClass = factory.getObjectClass( this, entry, registries, schema.getSchemaName() );

        addSchemaObject( registries, objectClass, schema );
    }
}
 
Example 6
Source File: DefaultSchemaManager.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
/**
 * Add all the Schema's Syntaxes
 * 
 * @param schema The schema in which the Syntaxes will be added
 * @param registries The Registries to process
 * @throws LdapException If the Syntaxes cannot be added
 * @throws IOException If the Syntaxes cannot be loaded
 */
private void addSyntaxes( Schema schema, Registries registries ) throws LdapException, IOException
{
    if ( schema.getSchemaLoader() == null )
    {
        return;
    }

    for ( Entry entry : schema.getSchemaLoader().loadSyntaxes( schema ) )
    {
        LdapSyntax syntax = factory.getSyntax( this, entry, registries, schema.getSchemaName() );

        addSchemaObject( registries, syntax, schema );
    }
}
 
Example 7
Source File: DefaultSchemaManager.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
/**
 * Register all the Schema's SyntaxCheckers
 * 
 * @param schema The schema in which the SyntaxChecker will be added
 * @param registries The Registries to process
 * @throws LdapException If the SyntaxChecker cannot be added
 * @throws IOException If the SyntaxChecker cannot be loaded
 */
private void addSyntaxCheckers( Schema schema, Registries registries ) throws LdapException, IOException
{
    if ( schema.getSchemaLoader() == null )
    {
        return;
    }

    for ( Entry entry : schema.getSchemaLoader().loadSyntaxCheckers( schema ) )
    {
        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( this, entry, registries, schema.getSchemaName() );

        addSchemaObject( registries, syntaxChecker, schema );
    }
}