// TODO : Replace this with conversion at the item level.
private Object convert(final Field field, final Val val) {
        if (field != null && field.getFormat() != null && field.getFormat().getType() != null) {
            final Type type = field.getFormat().getType();
            if (Type.NUMBER.equals(type) || Type.DATE_TIME.equals(type)) {
                return val.toDouble();
            }
        }
        return val.toString();
    }
private Object convert(final Field field, final Val val) {
if (field != null && field.getFormat() != null && field.getFormat().getType() != null) {
final Type type = field.getFormat().getType();
if (Type.NUMBER.equals(type) || Type.DATE_TIME.equals(type)) {
return val.toDouble();
}
}
return val.toString();
}
private Object convert(final Field field, final Val val) {
if (field != null && field.getFormat() != null && field.getFormat().getType() != null) {
final Type type = field.getFormat().getType();
if (Type.NUMBER.equals(type) || Type.DATE_TIME.equals(type)) {
return val.toDouble();
}
}
return val.toString();
}
private Object convert(final Field field, final Val val) {
if (field != null && field.getFormat() != null && field.getFormat().getType() != null) {
final Type type = field.getFormat().getType();
if (Type.NUMBER.equals(type) || Type.DATE_TIME.equals(type)) {
return val.toDouble();
}
}
return val.toString();
}