Package org.apache.directory.shared.ldap.schema.parsers

Examples of org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription


        Iterator<NormalizerDescription> list = registries.getNormalizerRegistry().normalizerDescriptionIterator();

        while ( list.hasNext() )
        {
            NormalizerDescription normalizer = list.next();
            attr.add( SchemaUtils.render( normalizer ) );
        }
       
        return attr;
    }
View Full Code Here


        // check first to see if it is present in the subschemaSubentry
        // -------------------------------------------------------------------
       
        Attributes attrs = getSubschemaSubentryAttributes();
        Attribute attrTypes = attrs.get( "normalizers" );
        NormalizerDescription normalizerDescription = null;
        for ( int ii = 0; ii < attrTypes.size(); ii++ )
        {
            String desc = ( String ) attrTypes.get( ii );
            if ( desc.indexOf( oid ) != -1 )
            {
                normalizerDescription = normalizerDescriptionSchemaParser.parseNormalizerDescription( desc );
                break;
            }
        }
    
        if ( isPresent )
        {
            assertNotNull( normalizerDescription );
            assertEquals( oid, normalizerDescription.getNumericOid() );
        }
        else
        {
            assertNull( normalizerDescription );
        }
View Full Code Here

    }


    private NormalizerDescription getNormalizerDescription( String schemaName, ServerEntry entry ) throws Exception
    {
        NormalizerDescription description = new NormalizerDescription( getOid( entry ) );
        List<String> values = new ArrayList<String>();
        values.add( schemaName );
        description.addExtension( MetaSchemaConstants.X_SCHEMA, values );
        description.setFqcn( entry.get( fqcnAT ).getString() );

        EntryAttribute desc = entry.get( descAT );
        if ( desc != null && desc.size() > 0 )
        {
            description.setDescription( desc.getString() );
        }

        EntryAttribute bytecode = entry.get( byteCodeAT );

        if ( bytecode != null && bytecode.size() > 0 )
        {
            byte[] bytes = bytecode.getBytes();
            description.setBytecode( new String( Base64.encode( bytes ) ) );
        }

        return description;
    }
View Full Code Here

        // check first to see if it is present in the subschemaSubentry
        // -------------------------------------------------------------------
       
        Attributes attrs = getSubschemaSubentryAttributes();
        Attribute attrTypes = attrs.get( "normalizers" );
        NormalizerDescription normalizerDescription = null;
       
        for ( int i = 0; i < attrTypes.size(); i++ )
        {
            String desc = ( String ) attrTypes.get( i );
           
            if ( desc.indexOf( oid ) != -1 )
            {
                normalizerDescription = normalizerDescriptionSchemaParser.parseNormalizerDescription( desc );
                break;
            }
        }
    
        if ( isPresent )
        {
            assertNotNull( normalizerDescription );
            assertEquals( oid, normalizerDescription.getOid() );
        }
        else
        {
            assertNull( normalizerDescription );
        }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.