- //
- // Variant variant = value.value;
- // Datatype dt = variant.getBinding().type();
- // if (Datatypes.STRING.equals(dt)) {
- // String s = (String) variant.getValue(Bindings.STRING);
- // if (s.contains("\n")) {
- // return "\"\"\"" + s + "\"\"\"";
- // } else {
- // return "\"" + s + "\"";
- // }
- // } else if (Datatypes.BOOLEAN.equals(dt)) {
- // Boolean i = (Boolean) variant.getValue(Bindings.BOOLEAN);
- // return i ? "true" : "false";
- // } else if (Datatypes.INTEGER.equals(dt)) {
- // Integer i = (Integer) variant.getValue(Bindings.INTEGER);
- // return i.toString();
- // } else if (Datatypes.LONG.equals(dt)) {
- // Long i = (Long) variant.getValue(Bindings.LONG);
- // return i.toString();
- // } else if (Datatypes.DOUBLE.equals(dt)) {
- // Double d = (Double) variant.getValue();
- // return d.toString();
- // } else if (Datatypes.FLOAT.equals(dt)) {
- // Float f = (Float) variant.getValue();
- // return f.toString();
- // } else if (Datatypes.STRING_ARRAY.equals(dt)) {
- // return Arrays.toString((String []) variant.getValue());
- // } else if (Datatypes.BOOLEAN_ARRAY.equals(dt)) {
- // return Arrays.toString((boolean []) variant.getValue());
- // } else if (Datatypes.INTEGER_ARRAY.equals(dt)) {
- // return Arrays.toString((int []) variant.getValue());
- // } else if (Datatypes.LONG_ARRAY.equals(dt)) {
- // return Arrays.toString((long []) variant.getValue());
- // } else if (Datatypes.DOUBLE_ARRAY.equals(dt)) {
- // return Arrays.toString((double []) variant.getValue());
- // } else if (Datatypes.FLOAT_ARRAY.equals(dt)) {
- // return Arrays.toString((float []) variant.getValue());
- // } else if (Datatypes.BYTE_ARRAY.equals(dt)) {
- // return Arrays.toString((byte []) variant.getValue());
- //// } else if (dt instanceof ArrayType) {
- //// return Arrays.toString((Object []) variant.getValue());
- // } else {
- // byte[] data =
- // Bindings.getSerializerUnchecked(variant.getBinding()).serialize(variant.getValue());
- // m.reset();
- // m.update(data, 0, data.length);
- // return "\"" + new BigInteger(1, m.digest()).toString(16) + "\"";
- // }
-