AttributeTypeRegistry attributeTypeRegistry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
attributeTypeRegistry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
    public void init( ContextFactoryConfiguration factoryCfg, ContextPartitionConfiguration cfg ) throws NamingException    {        AttributeTypeRegistry attributeTypeRegistry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();        OidRegistry oidRegistry = factoryCfg.getGlobalRegistries().getOidRegistry();        ExpressionEvaluator evaluator = new ExpressionEvaluator( this, oidRegistry, attributeTypeRegistry );        ExpressionEnumerator enumerator = new ExpressionEnumerator( this, attributeTypeRegistry, evaluator );        this.searchEngine = new DefaultSearchEngine( this, evaluator, enumerator );        HashSet sysOidSet = new HashSet();        sysOidSet.add( Oid.EXISTANCE );        sysOidSet.add( Oid.HIERARCHY );        sysOidSet.add( Oid.UPDN );        sysOidSet.add( Oid.NDN );        sysOidSet.add( Oid.ONEALIAS );        sysOidSet.add( Oid.SUBALIAS );        sysOidSet.add( Oid.ALIAS );        Iterator i = cfg.getIndexedAttributes().iterator();        while( i.hasNext() )        {            String name = ( String ) i.next();            String oid = oidRegistry.getOid( name );            AttributeType type = attributeTypeRegistry.lookup( oid );                        // check if attribute is a system attribute            if ( sysOidSet.contains( oid ) )            {                if ( oid.equals( Oid.EXISTANCE ) )                {                    setExistanceIndexOn( type );                }                else if ( oid.equals( Oid.HIERARCHY ) )                {                    setHierarchyIndexOn( type );                }                else if ( oid.equals( Oid.UPDN ) )                {                    setUpdnIndexOn( type );                }                else if ( oid.equals( Oid.NDN ) )                {                    setNdnIndexOn( type );                }                else if ( oid.equals( Oid.ONEALIAS ) )                {                    setOneAliasIndexOn( type );                }                else if ( oid.equals( Oid.SUBALIAS ) )                {                    setSubAliasIndexOn( type );                }                else if ( oid.equals( Oid.ALIAS ) )                {                    setAliasIndexOn( type );                }                else                {                    throw new NamingException( "Unidentified system index "                        + oid );                }            }            else            {                addIndexOn( type );            }        }                add( cfg.getSuffix(),                cfg.getNormalizedSuffix( factoryCfg.getGlobalRegistries().getMatchingRuleRegistry() ),                cfg.getContextEntry() );    }