return result;
}
private Map<String, Object> convertObject(final CompositeData cd) {
final CompositeType type = cd.getCompositeType();
final Map<String, Object> result = new HashMap<String, Object>();
result.put(Constants.PROP_RESOURCE_SUPER_TYPE, Constants.TYPE_ATTRIBUTES);
result.put(Constants.PROP_RESOURCE_TYPE, type.getTypeName());
final Map<String, Object> attrMap = new TreeMap<String, Object>();
attrMap.put(Constants.PROP_RESOURCE_TYPE, Constants.TYPE_ATTRIBUTES);
result.put(Constants.RSRC_ATTRIBUTES, attrMap);
final Set<String> names = type.keySet();
for(final String name : names) {
final Map<String, Object> dataMap = new HashMap<String, Object>();
attrMap.put(name, dataMap);
dataMap.put(ResourceResolver.PROPERTY_RESOURCE_TYPE, type.getType(name));
dataMap.put(Constants.PROP_RESOURCE_SUPER_TYPE, Constants.TYPE_ATTRIBUTE);
if ( type.getDescription() != null ) {
dataMap.put(Constants.PROP_DESCRIPTION, type.getDescription());
}
dataMap.put(Constants.PROP_TYPE, type.getType(name).getTypeName());
final Object value = cd.get(name);
if ( value != null ) {
if ( value.getClass().isArray() ) {
final int length = Array.getLength(value);