pd.setValue(value);
pd.setType(propType);
pd.setUnbounded(PropertyUnbounded.DEFAULT);
} else {
if ( propType != found.getType() ) {
throw new SCRDescriptorException("Multi value property '" + key + "' has different types: "
+ found.getType() + " & " + propType,
describedClass.getSource());
}
if ( found.getValue() != null ) {
final String[] values = new String[2];
values[0] = found.getValue();
values[1] = value;
found.setMultiValue(values);
} else {
final String[] oldValues = found.getMultiValue();
final String[] newValues = new String[oldValues.length + 1];
System.arraycopy(oldValues, 0, newValues, 0, oldValues.length);
newValues[oldValues.length] = value;
found.setMultiValue(newValues);
}
}
}
}
}
// TODO: properties
// xmlns
if (cad.getValue("xmlns") != null) {
final SpecVersion spec = SpecVersion.fromNamespaceUrl(cad.getValue("xmlns").toString());
if ( spec == null ) {
throw new SCRDescriptorException("Unknown xmlns attribute value: " + cad.getValue("xmlns"),
describedClass.getSource());
}
component.setSpecVersion(spec);
}