*/
private void setProperty(final String propName, final Object value,
final Class retType, final Element element) {
try {
final PropertyType propType = propertyTypeDao.findByName(propName);
Property prop = element.getProperty(propType);
if (prop == null) {
prop = new Property(element, propType);
}
if (value instanceof java.util.List) {
List l = (java.util.List) value;
logger.debug("setting {} properties of \"{}\"", l.size(), prop.getType().getName());
for (int i = 0; i < l.size(); i++) {
setPropertyValue(prop, i, retType, l.get(i));
}
} else {
setPropertyValue(prop, 0, retType, value);
}
if (logger.isDebugEnabled()) {
logger.debug("adding property \"{}\"", prop.getType().getName());
}
} catch (CoreException ex) {
logger.info(ex.getMessage());
}
}