Package org.apache.directory.ldapstudio.browser.core.model.schema

Examples of org.apache.directory.ldapstudio.browser.core.model.schema.Schema


        String displayValue = value.getStringValue();

        if ( !showRawValues() )
        {
            Schema schema = value.getAttribute().getEntry().getConnection().getSchema();
            ObjectClassDescription ocd = schema.getObjectClassDescription( displayValue );
            if ( ocd.isStructural() )
            {
                displayValue = displayValue + " (structural)";
            }
            else if ( ocd.isAbstract() )
View Full Code Here


    /**
     * Returns a ObjectClassValueEditorRawValueWrapper.
     */
    public Object getRawValue( IConnection connection, Object value )
    {
        Schema schema = null;
        if ( connection != null )
        {
            schema = connection.getSchema();
        }
        if ( schema == null || value == null || !( value instanceof String ) )
View Full Code Here

    {
        public Object[] getElements( Object inputElement )
        {
            if ( inputElement instanceof Schema )
            {
                Schema schema = ( Schema ) inputElement;
                if ( schema != null && schema.getMrudMapByName() != null )
                {
                    Set set = new HashSet( schema.getMrudMapByName().values() );
                    return set.toArray();
                }
            }
            return new Object[0];
        }
View Full Code Here

                        try
                        {
                            String schemaFilename = getSchemaCacheFileName( conn.getName() );
                            FileReader reader = new FileReader( schemaFilename );
                            Schema schema = new Schema();
                            schema.loadFromLdif( reader );
                            conn.setSchema( schema );
                        }
                        catch ( Exception e )
                        {
                        }
View Full Code Here

    {
        public Object[] getElements( Object inputElement )
        {
            if ( inputElement instanceof Schema )
            {
                Schema schema = ( Schema ) inputElement;
                if ( schema != null )
                {
                    return schema.getObjectClassDescriptions();
                }
            }
            return new Object[0];
        }
View Full Code Here

                        try
                        {
                            String schemaFilename = getSchemaCacheFileName( conn.getName() );
                            FileReader reader = new FileReader( schemaFilename );
                            Schema schema = new Schema();
                            schema.loadFromLdif( reader );
                            conn.setSchema( schema );
                        }
                        catch ( Exception e )
                        {
                        }
View Full Code Here

                        IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP, } );
                LdifEnumeration le = this.connectionProvider.search( sp, monitor );
                if ( le.hasNext( monitor ) )
                {
                    LdifContentRecord schemaRecord = ( LdifContentRecord ) le.next( monitor );
                    this.schema = new Schema();
                    this.schema.loadFromRecord( schemaRecord );
                    EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
                        ConnectionUpdateEvent.CONNECTION_SCHEMA_LOADED ), this );
                }
                else
View Full Code Here

        this.attributeOid2AtdMap = new TreeMap();
        ConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
        IConnection[] connections = cm.getConnections();
        for ( int i = 0; i < connections.length; i++ )
        {
            Schema schema = connections[i].getSchema();
            if ( schema != null )
            {
                createAttributeMaps( schema );
            }
        }
        createAttributeMaps( Schema.DEFAULT_SCHEMA );
        this.attributeNamesAndOids = new String[this.attributeNames2AtdMap.size() + this.attributeOid2AtdMap.size()];
        System.arraycopy( this.attributeNames2AtdMap.keySet().toArray(), 0, this.attributeNamesAndOids, 0,
            this.attributeNames2AtdMap.size() );
        System.arraycopy( this.attributeOid2AtdMap.keySet().toArray(), 0, this.attributeNamesAndOids,
            this.attributeNames2AtdMap.size(), this.attributeOid2AtdMap.size() );

        // init available syntaxes
        this.syntaxOid2LsdMap = new TreeMap();
        this.syntaxDesc2LsdMap = new TreeMap();
        for ( int i = 0; i < connections.length; i++ )
        {
            Schema schema = connections[i].getSchema();
            if ( schema != null )
            {
                createSyntaxMaps( schema );
            }
        }
View Full Code Here

        this.attributeOid2AtdMap = new TreeMap();
        ConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
        IConnection[] connections = cm.getConnections();
        for ( int i = 0; i < connections.length; i++ )
        {
            Schema schema = connections[i].getSchema();
            if ( schema != null )
            {
                createAttributeMaps( schema );
            }
        }
        createAttributeMaps( Schema.DEFAULT_SCHEMA );
        this.attributeTypesAndOids = new String[this.attributeTypes2AtdMap.size() + this.attributeOid2AtdMap.size()];
        System.arraycopy( this.attributeTypes2AtdMap.keySet().toArray(), 0, this.attributeTypesAndOids, 0,
            this.attributeTypes2AtdMap.size() );
        System.arraycopy( this.attributeOid2AtdMap.keySet().toArray(), 0, this.attributeTypesAndOids,
            this.attributeTypes2AtdMap.size(), this.attributeOid2AtdMap.size() );

        // init available syntaxes
        this.syntaxOid2LsdMap = new TreeMap();
        this.syntaxDesc2LsdMap = new TreeMap();
        for ( int i = 0; i < connections.length; i++ )
        {
            Schema schema = connections[i].getSchema();
            if ( schema != null )
            {
                createSyntaxMaps( schema );
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.schema.Schema

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.