use of org.kie.pmml.commons.model.KiePMMLExtension in project drools by kiegroup.
the class KiePMMLSimplePredicateInstanceFactory method getKiePMMLSimplePredicate.
static KiePMMLSimplePredicate getKiePMMLSimplePredicate(final SimplePredicate simplePredicate, final List<Field<?>> fields) {
final List<KiePMMLExtension> kiePMMLExtensions = getKiePMMLExtensions(simplePredicate.getExtensions());
DataType dataType = getDataType(fields, simplePredicate.getField().getValue());
Object value = DATA_TYPE.byName(dataType.value()).getActualValue(simplePredicate.getValue());
return KiePMMLSimplePredicate.builder(simplePredicate.getField().getValue(), kiePMMLExtensions, OPERATOR.byName(simplePredicate.getOperator().value())).withValue(value).build();
}
Aggregations