// If the Decision Table model has been converted from the legacy text based
  // class then all values are held in the DTCellValue's StringValue. This
  // function attempts to set the correct DTCellValue property based on
  // the DTCellValue's data type.
  private void assertDTCellValue(DTDataTypes dataType, DTCellValue dcv) {
    // If already converted exit
    if (dcv.getDataType().equals(dataType)) {
      return;
    }

    String text = dcv.getStringValue();
    switch (dataType) {
      case BOOLEAN:
        dcv.setBooleanValue((text == null ? null : Boolean.valueOf(text)));
        break;
      case DATE:
        Date d = null;
        try {
          if (text != null) {
            if (DATE_CONVERTOR == null) {
              throw new IllegalArgumentException("DATE_CONVERTOR has not been initialised.");
            }
            d = DATE_CONVERTOR.parse(text);
          }
        } catch (IllegalArgumentException e) {
        }
        dcv.setDateValue(d);
        break;
      case NUMERIC:
        BigDecimal bd = null;
        try {
          if (text != null) {
            bd = new BigDecimal(text);
          }
        } catch (NumberFormatException e) {
        }
        dcv.setNumericValue(bd);
        break;
    }
  }