/**
   * Make a CellValue applicable for the column
   *
   * @param column The model column
   * @param iRow Row coordinate for initialisation
   * @param iCol Column coordinate for initialisation
   * @param dcv The Model cell containing the value
   * @return A CellValue
   */
  public CellValue<? extends Comparable<?>> makeCellValue(
      DTColumnConfig column, int iRow, int iCol, DTCellValue dcv) {
    DTDataTypes dataType = getDataType(column);
    CellValue<? extends Comparable<?>> cell = null;

    // If this is a legacy Decision Table values are always String
    // so ensure that the appropriate DTCellValue field is populated
    assertDTCellValue(dataType, dcv);

    switch (dataType) {
      case BOOLEAN:
        cell = makeNewBooleanCellValue(iRow, iCol, dcv.getBooleanValue());
        break;
      case DATE:
        cell = makeNewDateCellValue(iRow, iCol, dcv.getDateValue());
        break;
      case NUMERIC:
        if (column instanceof RowNumberCol) {
          cell = makeNewRowNumberCellValue(iRow, iCol);
        } else {
          cell = makeNewNumericCellValue(iRow, iCol, dcv.getNumericValue());
          if (column instanceof AttributeCol) {
            AttributeCol at = (AttributeCol) column;
            if (at.getAttribute().equals(RuleAttributeWidget.SALIENCE_ATTR)) {
              if (at.isUseRowNumber()) {
                cell = makeNewRowNumberCellValue(iRow, iCol);
              }
            }
          }
        }
        break;
      default:
        cell = makeNewStringCellValue(iRow, iCol, dcv.getStringValue());
        if (column instanceof AttributeCol) {
          AttributeCol ac = (AttributeCol) column;
          if (ac.getAttribute().equals(RuleAttributeWidget.DIALECT_ATTR)) {
            cell = makeNewDialectCellValue(iRow, iCol, dcv.getStringValue());
          }
        }
    }

    if (dcv.isOtherwise()) {
      cell.addState(CellState.OTHERWISE);
    }

    return cell;
  }