public class SimpleCompositeAttributeReadingStrategy extends SimpleAttributeReadingStrategy {
-
private final String key;
public SimpleCompositeAttributeReadingStrategy(String nullableDefault, String key) {
this.key = key;
}
+ @Override
protected Object postprocessParsedValue(String textContent) {
HashMap<String,String> map = Maps.newHashMap();
map.put(key, textContent);
return map;
}
+ @Override
+ protected Object postprocessNullableDefault(String nullableDefault) {
+ return nullableDefault == null ? null : postprocessParsedValue(nullableDefault);
+ }
}