public InputTable(Entity entity, DataSchema schema) { super(entity, entity.getDataTable(), schema); createPrimaryKeyField(); createParentIdField(); createCategoryValueFields(entity, true); createCategoryIdFields(entity, true); createQuantityFields(true); createCoordinateFields(); createTextFields(); createWeightField(); }
protected void createCategoryValueFields(Entity entity, boolean input) { List<CategoricalVariable<?>> variables = entity.getCategoricalVariables(); for (CategoricalVariable<?> var : variables) { if (!var.isUserDefined()) { String valueColumn = input ? var.getInputValueColumn() : var.getOutputValueColumn(); if (valueColumn != null) { if (var instanceof BinaryVariable) { createBinaryCategoryValueField((BinaryVariable) var, valueColumn); } else if (var instanceof MultiwayVariable) { createCategoryValueField((MultiwayVariable) var, valueColumn); } } } } }