{
selectedSchema = ( ( SchemaWrapper ) ( ( Folder ) firstElement ).getParent() ).getSchema();
}
else if ( firstElement instanceof AttributeTypeWrapper )
{
TreeNode parent = ( ( AttributeTypeWrapper ) firstElement ).getParent();
if ( parent instanceof Folder )
{
selectedSchema = ( ( SchemaWrapper ) ( ( Folder ) parent ).getParent() ).getSchema();
}
else if ( parent instanceof SchemaWrapper )
{
selectedSchema = ( ( SchemaWrapper ) parent ).getSchema();
}
}
else if ( firstElement instanceof ObjectClassWrapper )
{
TreeNode parent = ( ( ObjectClassWrapper ) firstElement ).getParent();
if ( parent instanceof Folder )
{
selectedSchema = ( ( SchemaWrapper ) ( ( Folder ) parent ).getParent() ).getSchema();
}