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 );
root.addChild( atFolder );
root.addChild( ocFolder );
List<Object> rootChildren = hierarchyManager.getChildren( hierarchyManager.getRootObject() );
if ( ( rootChildren != null ) && ( rootChildren.size() > 0 ) )
{
for ( Object rootChild : rootChildren )
{
TreeNode childNode = null;
// Creating the wrapper
if ( rootChild instanceof AttributeType )
{
AttributeType at = ( AttributeType ) rootChild;
childNode = new AttributeTypeWrapper( at, atFolder );
atFolder.addChild( childNode );
}
else if ( rootChild instanceof ObjectClass )
{
MutableObjectClass oc = ( MutableObjectClass ) rootChild;
childNode = new ObjectClassWrapper( oc, ocFolder );
ocFolder.addChild( childNode );
}
// Filling the 'Elements To Wrappers' Map
elementsToWrappersMap.put( rootChild, childNode );