use of org.dmg.pmml.DataField in project openscoring by openscoring.
the class ModelUtil method encodeInputFields.
private static List<Field> encodeInputFields(List<InputField> inputFields) {
Function<InputField, Field> function = new Function<InputField, Field>() {
@Override
public Field apply(InputField inputField) {
FieldName name = inputField.getName();
DataField dataField = (DataField) inputField.getField();
Field field = new Field(name.getValue());
field.setName(dataField.getDisplayName());
field.setDataType(inputField.getDataType());
field.setOpType(inputField.getOpType());
field.setValues(encodeValues(dataField));
return field;
}
};
List<Field> fields = new ArrayList<>(Lists.transform(inputFields, function));
return fields;
}
Aggregations