Example #1
0
  public InputTable(Entity entity, DataSchema schema) {
    super(entity, entity.getDataTable(), schema);
    createPrimaryKeyField();
    createParentIdField();
    createCategoryValueFields(entity, true);
    createCategoryIdFields(entity, true);
    createQuantityFields(true);
    createCoordinateFields();
    createTextFields();

    createWeightField();
  }
Example #2
0
 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);
         }
       }
     }
   }
 }