*/
@SuppressWarnings("unchecked")
public DataSourceAttributeValue parseAttribute(@Nonnull final MapfishParser parser,
@Nonnull final Template template,
@Nullable final PArray jsonValue) throws JSONException {
final PArray pValue;
if (jsonValue != null) {
pValue = jsonValue;
} else {
pValue = this.defaults;
}
if (pValue == null) {
throw new PrintException("Missing required attribute: " + this.configName);
}
final DataSourceAttributeValue value = new DataSourceAttributeValue();
value.attributesValues = new Map[pValue.size()];
for (int i = 0; i < pValue.size(); i++) {
PObject rowData = pValue.getObject(i);
final Values valuesForParsing = new Values();
valuesForParsing.populateFromAttributes(template, parser, this.attributes, rowData);
value.attributesValues[i] = valuesForParsing.asMap();
}