Package org.apache.directory.studio.ldapbrowser.core.model.schema

Examples of org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaPart


    /**
     * {@inheritDoc}
     */
    public String getText()
    {
        SchemaPart schemaElement = getSchemElement();
        if ( schemaElement != null )
        {
            if(schemaElement instanceof ObjectClassDescription)
            {
                return "Object Class " + schemaElement.toString();
            }
            else if(schemaElement instanceof AttributeTypeDescription )
            {
                return "Attribute Type " + schemaElement.toString();
            }
            else if(schemaElement instanceof LdapSyntaxDescription )
            {
                return "Syntax " + schemaElement.toString();
            }
            else if(schemaElement instanceof MatchingRuleDescription)
            {
                return "Matching Rule " + schemaElement.toString();
            }
            else if(schemaElement instanceof MatchingRuleUseDescription )
            {
                return "Matching Rule Use " + schemaElement.toString();
            }
            else
            {
                return schemaElement.getNumericOID();
            }
        }
        else
        {
            return super.getText();
View Full Code Here


     * {@inheritDoc}
     */
    public void saveState( IMemento memento )
    {
        IBrowserConnection connection = getConnection();
        SchemaPart schemaElement = getSchemElement();
        memento.putString( "CONNECTION", connection.getConnection().getId() );
        memento.putString( "SCHEMAELEMENTYPE", schemaElement.getClass().getName() );
        memento.putString( "SCHEMAELEMENTOID", schemaElement.getNumericOID() );
    }
View Full Code Here

    {
        IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnectionById(
            memento.getString( "CONNECTION" ) );
        String schemaElementType = memento.getString( "SCHEMAELEMENTYPE" );
        String schemaElementOid = memento.getString( "SCHEMAELEMENTOID" );
        SchemaPart schemaElement = null;
        if(ObjectClassDescription.class.getName().equals( schemaElementType ) )
        {
            schemaElement = connection.getSchema().getObjectClassDescription( schemaElementOid );
        }
        else if(AttributeTypeDescription.class.getName().equals( schemaElementType ) )
View Full Code Here

        {
            return false;
        }

        SchemaBrowserNavigationLocation location = ( SchemaBrowserNavigationLocation ) currentLocation;
        SchemaPart other = location.getSchemElement();
        SchemaPart element = getSchemElement();

        if ( other == null && element == null )
        {
            return true;
        }
        else if ( other == null || element == null )
        {
            return false;
        }
        else
        {
            return element.equals( other );
        }
    }
View Full Code Here

        Object editorInput = getInput();
        if ( editorInput != null && editorInput instanceof SchemaBrowserInput )
        {
            SchemaBrowserInput schemaBrowserInput = ( SchemaBrowserInput ) editorInput;
            SchemaPart schemaElement = schemaBrowserInput.getSchemaElement();
            if ( schemaElement != null )
            {
                return schemaElement;
            }
        }
View Full Code Here

            // set connection;
            IBrowserConnection connection = sbi.getConnection();
            setConnection( connection );

            // set schema element and activate tab
            SchemaPart schemaElement = sbi.getSchemaElement();
            if ( schemaElement instanceof ObjectClassDescription )
            {
                ocdPage.select( schemaElement );
                tabFolder.setSelection( ocdTab );
            }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaPart

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.