// Update attributes list if any new attribute created by user
if (imgData.getNewAttribute() != null) {
String newAttr = imgData.getNewAttribute().trim();
if (!("".equals(newAttr)) && !selectedAttributeNameList.contains(newAttr)) {
Attribute newAttribute = new Attribute(newAttr);
imageAttributeList.add(newAttribute);
}
}
// Complete attributes list with parent attributes if any