Package org.apache.directory.studio.schemaeditor.model.hierarchy

Examples of org.apache.directory.studio.schemaeditor.model.hierarchy.HierarchyManager


     */
    private List<TreeNode> createTypeHierarchyObjectClass( MutableObjectClass oc )
    {
        List<TreeNode> children = new ArrayList<TreeNode>();

        HierarchyManager hierarchyManager = new HierarchyManager();

        // Creating the wrapper of the object class
        ObjectClassWrapper ocw = new ObjectClassWrapper( oc );

        int mode = Activator.getDefault().getDialogSettings().getInt( PluginConstants.PREFS_HIERARCHY_VIEW_MODE );
        if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_TYPE )
        {
            // Creating its children's wrappers
            createChildrenHierarchy( ocw, hierarchyManager.getChildren( oc ), hierarchyManager );

            // Creating its parents' wrappers
            createParentHierarchy( hierarchyManager.getParents( oc ), children, ocw, hierarchyManager );
        }
        else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUPERTYPE )
        {
            // Creating its parents' wrappers
            createParentHierarchy( hierarchyManager.getParents( oc ), children, ocw, hierarchyManager );
        }
        else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUBTYPE )
        {
            // Creating its children's wrappers
            createChildrenHierarchy( ocw, hierarchyManager.getChildren( oc ), hierarchyManager );

            children.add( ocw );
        }

        return children;
View Full Code Here


     *      the Type Hierarchy for an attribute type
     */
    private List<TreeNode> createTypeHierarchyAttributeType( AttributeType at )
    {
        List<TreeNode> children = new ArrayList<TreeNode>();
        HierarchyManager hierarchyManager = new HierarchyManager();
        int mode = Activator.getDefault().getDialogSettings().getInt( PluginConstants.PREFS_HIERARCHY_VIEW_MODE );

        // Creating the wrapper of the attribute type
        AttributeTypeWrapper atw = new AttributeTypeWrapper( at );

        if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_TYPE )
        {
            // Creating the children's wrappers
            createChildrenHierarchy( atw, hierarchyManager.getChildren( at ), hierarchyManager );

            // Creating its parents' wrappers
            List<Object> parents = hierarchyManager.getParents( at );
            while ( ( parents != null ) && ( parents.size() == 1 ) )
            {
                Object parent = parents.get( 0 );
                if ( parent instanceof AttributeType )
                {
                    AttributeType parentAT = ( AttributeType ) parent;

                    AttributeTypeWrapper atw2 = new AttributeTypeWrapper( parentAT );
                    atw.setParent( atw2 );
                    atw2.addChild( atw );

                    atw = atw2;

                    parents = hierarchyManager.getParents( parentAT );
                }
                else
                {
                    break;
                }
            }

            children.add( atw );
        }
        else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUPERTYPE )
        {
            // Creating its parents' wrappers
            List<Object> parents = hierarchyManager.getParents( at );
            while ( ( parents != null ) && ( parents.size() == 1 ) )
            {
                Object parent = parents.get( 0 );
                if ( parent instanceof AttributeType )
                {
                    AttributeType parentAT = ( AttributeType ) parent;

                    AttributeTypeWrapper atw2 = new AttributeTypeWrapper( parentAT );
                    atw.setParent( atw2 );
                    atw2.addChild( atw );

                    atw = atw2;

                    parents = hierarchyManager.getParents( parentAT );
                }
                else
                {
                    break;
                }
            }

            children.add( atw );
        }
        else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUBTYPE )
        {
            // Creating the children's wrappers
            createChildrenHierarchy( atw, hierarchyManager.getChildren( at ), hierarchyManager );

            children.add( atw );
        }

        return children;
View Full Code Here

            {
                if ( root.getChildren().isEmpty() )
                {
                    elementsToWrappersMap = new MultiValueMap();

                    hierarchyManager = new HierarchyManager();

                    if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
                    {
                        Folder atFolder = new Folder( FolderType.ATTRIBUTE_TYPE, root );
                        Folder ocFolder = new Folder( FolderType.OBJECT_CLASS, root );
View Full Code Here

            {
                if ( root.getChildren().isEmpty() )
                {
                    elementsToWrappersMap = new MultiValueMap();

                    hierarchyManager = new HierarchyManager();

                    if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
                    {
                        Folder atFolder = new Folder( FolderType.ATTRIBUTE_TYPE, root );
                        Folder ocFolder = new Folder( FolderType.OBJECT_CLASS, root );
View Full Code Here

     */
    private List<TreeNode> createTypeHierarchyObjectClass( ObjectClassImpl oc )
    {
        List<TreeNode> children = new ArrayList<TreeNode>();

        HierarchyManager hierarchyManager = new HierarchyManager();

        // Creating the wrapper of the object class
        ObjectClassWrapper ocw = new ObjectClassWrapper( oc );

        int mode = Activator.getDefault().getDialogSettings().getInt( PluginConstants.PREFS_HIERARCHY_VIEW_MODE );
        if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_TYPE )
        {
            // Creating its children's wrappers
            createChildrenHierarchy( ocw, hierarchyManager.getChildren( oc ), hierarchyManager );

            // Creating its parents' wrappers
            createParentHierarchy( hierarchyManager.getParents( oc ), children, ocw, hierarchyManager );
        }
        else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUPERTYPE )
        {
            // Creating its parents' wrappers
            createParentHierarchy( hierarchyManager.getParents( oc ), children, ocw, hierarchyManager );
        }
        else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUBTYPE )
        {
            // Creating its children's wrappers
            createChildrenHierarchy( ocw, hierarchyManager.getChildren( oc ), hierarchyManager );

            children.add( ocw );
        }

        return children;
View Full Code Here

     *      the Type Hierarchy for an attribute type
     */
    private List<TreeNode> createTypeHierarchyAttributeType( AttributeTypeImpl at )
    {
        List<TreeNode> children = new ArrayList<TreeNode>();
        HierarchyManager hierarchyManager = new HierarchyManager();
        int mode = Activator.getDefault().getDialogSettings().getInt( PluginConstants.PREFS_HIERARCHY_VIEW_MODE );

        // Creating the wrapper of the attribute type
        AttributeTypeWrapper atw = new AttributeTypeWrapper( at );

        if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_TYPE )
        {
            // Creating the children's wrappers
            createChildrenHierarchy( atw, hierarchyManager.getChildren( at ), hierarchyManager );

            // Creating its parents' wrappers
            List<Object> parents = hierarchyManager.getParents( at );
            while ( ( parents != null ) && ( parents.size() == 1 ) )
            {
                Object parent = parents.get( 0 );
                if ( parent instanceof AttributeTypeImpl )
                {
                    AttributeTypeImpl parentAT = ( AttributeTypeImpl ) parent;

                    AttributeTypeWrapper atw2 = new AttributeTypeWrapper( parentAT );
                    atw.setParent( atw2 );
                    atw2.addChild( atw );

                    atw = atw2;

                    parents = hierarchyManager.getParents( parentAT );
                }
                else
                {
                    break;
                }
            }

            children.add( atw );
        }
        else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUPERTYPE )
        {
            // Creating its parents' wrappers
            List<Object> parents = hierarchyManager.getParents( at );
            while ( ( parents != null ) && ( parents.size() == 1 ) )
            {
                Object parent = parents.get( 0 );
                if ( parent instanceof AttributeTypeImpl )
                {
                    AttributeTypeImpl parentAT = ( AttributeTypeImpl ) parent;

                    AttributeTypeWrapper atw2 = new AttributeTypeWrapper( parentAT );
                    atw.setParent( atw2 );
                    atw2.addChild( atw );

                    atw = atw2;

                    parents = hierarchyManager.getParents( parentAT );
                }
                else
                {
                    break;
                }
            }

            children.add( atw );
        }
        else if ( mode == PluginConstants.PREFS_HIERARCHY_VIEW_MODE_SUBTYPE )
        {
            // Creating the children's wrappers
            createChildrenHierarchy( atw, hierarchyManager.getChildren( at ), hierarchyManager );

            children.add( atw );
        }

        return children;
View Full Code Here

            {
                if ( root.getChildren().isEmpty() )
                {
                    elementsToWrappersMap = new MultiValueMap();

                    hierarchyManager = new HierarchyManager();

                    if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )
                    {
                        Folder atFolder = new Folder( FolderType.ATTRIBUTE_TYPE, root );
                        Folder ocFolder = new Folder( FolderType.OBJECT_CLASS, root );
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.schemaeditor.model.hierarchy.HierarchyManager

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.