Package org.apache.directory.server.schema.bootstrap.partition

Examples of org.apache.directory.server.schema.bootstrap.partition.SchemaPartitionExtractor


        // --------------------------------------------------------------------
        // If not present extract schema partition from jar
        // --------------------------------------------------------------------

        File schemaDirectory = new File( workingDirectory, "schema" );
        SchemaPartitionExtractor extractor;
       
        if ( ! schemaDirectory.exists() )
        {
            try
            {
                extractor = new SchemaPartitionExtractor( workingDirectory );
                extractor.extract();
            }
            catch ( IOException e )
            {
                NamingException ne = new NamingException( "Failed to extract pre-loaded schema partition." );
                ne.setRootCause( e );
View Full Code Here


        // --------------------------------------------------------------------
        // If not present extract schema partition from jar
        // --------------------------------------------------------------------

        SchemaPartitionExtractor extractor = null;
        try
        {
            extractor = new SchemaPartitionExtractor( directoryService.getWorkingDirectory() );
            extractor.extract();
        }
        catch ( IOException e )
        {
            NamingException ne = new NamingException( "Failed to extract pre-loaded schema partition." );
            ne.setRootCause( e );
            throw ne;
        }
       
        // --------------------------------------------------------------------
        // Initialize schema partition
        // --------------------------------------------------------------------

        schemaPartition = new JdbmPartition();
        schemaPartition.setId( "schema" );
        schemaPartition.setCacheSize( 1000 );

        Set<Index<?, ServerEntry>> indexedAttributes = new HashSet<Index<?, ServerEntry>>();
        for ( String attributeId : extractor.getDbFileListing().getIndexedAttributes() )
        {
            indexedAttributes.add( new JdbmIndex<String,ServerEntry>( attributeId ) );
        }

        schemaPartition.setIndexedAttributes( indexedAttributes );
View Full Code Here

TOP

Related Classes of org.apache.directory.server.schema.bootstrap.partition.SchemaPartitionExtractor

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.