@SuppressWarnings("unchecked")
public void end(String namespace, String name) throws Exception {
Object top = digester.pop();
Object obj = digester.peek();
if (obj instanceof ParameterMap) {
ParameterMap pm = (ParameterMap)obj;
pm.setProperty(propertyName, defaultValue);
if (top instanceof Map) {
pm.putValues(propertyName, (Map<String, String>)top);
} else if (top instanceof List) { // This is to ensure that a list would still work
Map<String, String> map = new LinkedHashMap<String, String>();
Iterator it = ((List)top).iterator();
while (it.hasNext()) {
String value = (String)it.next();
map.put(value, value);
}
pm.putValues(propertyName, map);
} else {
throw new XmlLoadException(
"Digital Object parameter needs to be a map: " + top);
}
} else {