CROM root = new CROM(null, true, "LDAP", 0, CromType.CROM_t_Ldap);
root.addType(CROM.CROM_t_Element | CROM.CROM_t_Root);
LdapToCromConverter converter = isTarget ? LdapToCromConverterFactory.newTargetStructureConverter()
: LdapToCromConverterFactory.newSourceStructureConverter();
converter.setAttributeOrder(new NameSorter<LdapStructureAttribute>(true));
AttributeFilter filter = new StructureAttributeFilter(structure);
for (LdapStructureEntryNode node : getEntryNodes(structure, classes)) {
CROM crom = converter.toCrom(node, filter);
root.addChild(crom);
}
return root;