Package org.apache.directory.studio.schemaeditor.view.wrappers

Examples of org.apache.directory.studio.schemaeditor.view.wrappers.SchemaWrapper


     * @param at
     *      the added attribute type
     */
    public void attributeTypeAddedFlatPresentation( AttributeType at )
    {
        SchemaWrapper schemaWrapper = ( SchemaWrapper ) getWrapper( Activator.getDefault().getSchemaHandler()
            .getSchema( at.getSchemaName() ) );
        if ( schemaWrapper != null )
        {
            AttributeTypeWrapper atw = null;
            int group = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );
            if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
            {
                for ( TreeNode child : schemaWrapper.getChildren() )
                {
                    if ( ( ( Folder ) child ).getType() == FolderType.ATTRIBUTE_TYPE )
                    {
                        atw = new AttributeTypeWrapper( at, child );
                        break;
View Full Code Here


     * @param oc
     *      the added object class
     */
    public void objectClassAddedFlatPresentation( ObjectClass oc )
    {
        SchemaWrapper schemaWrapper = ( SchemaWrapper ) getWrapper( Activator.getDefault().getSchemaHandler()
            .getSchema( oc.getSchemaName() ) );
        if ( schemaWrapper != null )
        {
            ObjectClassWrapper ocw = null;
            int group = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );
            if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
            {
                for ( TreeNode child : schemaWrapper.getChildren() )
                {
                    if ( ( ( Folder ) child ).getType() == FolderType.OBJECT_CLASS )
                    {
                        ocw = new ObjectClassWrapper( oc, child );
                        break;
View Full Code Here

     * @param schema
     *      the removed schema
     */
    private void schemaRemovedFlatPresentation( Schema schema )
    {
        SchemaWrapper sw = ( SchemaWrapper ) getWrapper( schema );
        if ( sw != null )
        {
            sw.getParent().removeChild( sw );
            elementsToWrappersMap.remove( schema, sw );
            removeRecursiveChildren( sw );
        }
    }
View Full Code Here

     *
     * @param schema
     */
    public void addSchemaFlatPresentation( Schema schema )
    {
        SchemaWrapper schemaWrapper = new SchemaWrapper( schema, root );
        root.addChild( schemaWrapper );
        elementsToWrappersMap.put( schema, schemaWrapper );

        int group = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );
        if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
        {
            Folder atFolder = new Folder( FolderType.ATTRIBUTE_TYPE, schemaWrapper );
            schemaWrapper.addChild( atFolder );

            for ( AttributeType attributeType : schema.getAttributeTypes() )
            {
                AttributeTypeWrapper atw = new AttributeTypeWrapper( attributeType, atFolder );
                atw.getParent().addChild( atw );
                elementsToWrappersMap.put( attributeType, atw );
            }

            Folder ocFolder = new Folder( FolderType.OBJECT_CLASS, schemaWrapper );
            schemaWrapper.addChild( ocFolder );

            for ( MutableObjectClass objectClass : schema.getObjectClasses() )
            {
                ObjectClassWrapper ocw = new ObjectClassWrapper( objectClass, ocFolder );
                ocw.getParent().addChild( ocw );
View Full Code Here

            .getInt( PluginConstants.PREFS_SCHEMA_VIEW_SECONDARY_LABEL_ABBREVIATE_MAX_LENGTH );
        boolean schemaLabelDisplay = store.getBoolean( PluginConstants.PREFS_SCHEMA_VIEW_SCHEMA_LABEL_DISPLAY );

        if ( element instanceof SchemaWrapper )
        {
            SchemaWrapper sw = ( SchemaWrapper ) element;

            return sw.getSchema().getName();
        }
        else if ( element instanceof AttributeTypeWrapper )
        {
            AttributeTypeImpl at = ( ( AttributeTypeWrapper ) element ).getAttributeType();
View Full Code Here

                }
            }
            else if ( ( workbenchPart instanceof SchemaEditor ) && ( wrapper instanceof SchemaWrapper ) )
            {
                SchemaEditor editor = ( SchemaEditor ) workbenchPart;
                SchemaWrapper sw = ( SchemaWrapper ) wrapper;
                if ( editor.getSchema().equals( sw.getSchema() ) )
                {
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop( workbenchPart );
                    return;
                }
            }
View Full Code Here

     * @param at
     *      the added attribute type
     */
    public void attributeTypeAddedFlatPresentation( AttributeTypeImpl at )
    {
        SchemaWrapper schemaWrapper = ( SchemaWrapper ) getWrapper( Activator.getDefault().getSchemaHandler()
            .getSchema( at.getSchema() ) );
        if ( schemaWrapper != null )
        {
            AttributeTypeWrapper atw = null;
            int group = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );
            if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
            {
                for ( TreeNode child : schemaWrapper.getChildren() )
                {
                    if ( ( ( Folder ) child ).getType() == FolderType.ATTRIBUTE_TYPE )
                    {
                        atw = new AttributeTypeWrapper( at, child );
                        break;
View Full Code Here

     * @param oc
     *      the added object class
     */
    public void objectClassAddedFlatPresentation( ObjectClassImpl oc )
    {
        SchemaWrapper schemaWrapper = ( SchemaWrapper ) getWrapper( Activator.getDefault().getSchemaHandler()
            .getSchema( oc.getSchema() ) );
        if ( schemaWrapper != null )
        {
            ObjectClassWrapper ocw = null;
            int group = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );
            if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
            {
                for ( TreeNode child : schemaWrapper.getChildren() )
                {
                    if ( ( ( Folder ) child ).getType() == FolderType.OBJECT_CLASS )
                    {
                        ocw = new ObjectClassWrapper( oc, child );
                        break;
View Full Code Here

     * @param schema
     *      the removed schema
     */
    private void schemaRemovedFlatPresentation( Schema schema )
    {
        SchemaWrapper sw = ( SchemaWrapper ) getWrapper( schema );
        if ( sw != null )
        {
            sw.getParent().removeChild( sw );
            elementsToWrappersMap.remove( schema, sw );
            removeRecursiveChildren( sw );
        }
    }
View Full Code Here

     *
     * @param schema
     */
    public void addSchemaFlatPresentation( Schema schema )
    {
        SchemaWrapper schemaWrapper = new SchemaWrapper( schema, root );
        root.addChild( schemaWrapper );
        elementsToWrappersMap.put( schema, schemaWrapper );

        int group = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );
        if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
        {
            Folder atFolder = new Folder( FolderType.ATTRIBUTE_TYPE, schemaWrapper );
            schemaWrapper.addChild( atFolder );

            for ( AttributeTypeImpl attributeType : schema.getAttributeTypes() )
            {
                AttributeTypeWrapper atw = new AttributeTypeWrapper( attributeType, atFolder );
                atw.getParent().addChild( atw );
                elementsToWrappersMap.put( attributeType, atw );
            }

            Folder ocFolder = new Folder( FolderType.OBJECT_CLASS, schemaWrapper );
            schemaWrapper.addChild( ocFolder );

            for ( ObjectClassImpl objectClass : schema.getObjectClasses() )
            {
                ObjectClassWrapper ocw = new ObjectClassWrapper( objectClass, ocFolder );
                ocw.getParent().addChild( ocw );
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.schemaeditor.view.wrappers.SchemaWrapper

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.