* schema depends on
*/
private String[] getSchemaDependencies( Schema schema )
{
Set<String> schemaNames = new HashSet<String>();
SchemaHandler schemaHandler = Activator.getDefault().getSchemaHandler();
// Looping on Attribute Types
for ( AttributeType at : schema.getAttributeTypes() )
{
// Superior
String supName = at.getSuperiorOid();
if ( supName != null )
{
AttributeType sup = schemaHandler.getAttributeType( supName );
if ( sup != null )
{
if ( !Strings.toLowerCase( schema.getSchemaName() ).equals(
Strings.toLowerCase( sup.getSchemaName() ) ) )
{
schemaNames.add( sup.getSchemaName() );
}
}
}
}
// Looping on Object Classes
for ( ObjectClass oc : schema.getObjectClasses() )
{
// Superiors
List<String> supNames = oc.getSuperiorOids();
if ( supNames != null )
{
for ( String supName : oc.getSuperiorOids() )
{
ObjectClass sup = schemaHandler.getObjectClass( supName );
if ( sup != null )
{
if ( !Strings.toLowerCase( schema.getSchemaName() ).equals(
Strings.toLowerCase( sup.getSchemaName() ) ) )
{
schemaNames.add( sup.getSchemaName() );
}
}
}
}
// Mays
List<String> mayNames = oc.getMayAttributeTypeOids();
if ( mayNames != null )
{
for ( String mayName : mayNames )
{
AttributeType may = schemaHandler.getAttributeType( mayName );
if ( may != null )
{
if ( !Strings.toLowerCase( schema.getSchemaName() ).equals(
Strings.toLowerCase( may.getSchemaName() ) ) )
{
schemaNames.add( may.getSchemaName() );
}
}
}
}
// Musts
List<String> mustNames = oc.getMustAttributeTypeOids();
if ( mustNames != null )
{
for ( String mustName : oc.getMustAttributeTypeOids() )
{
AttributeType must = schemaHandler.getAttributeType( mustName );
if ( must != null )
{
if ( !Strings.toLowerCase( schema.getSchemaName() ).equals(
Strings.toLowerCase( must.getSchemaName() ) ) )
{