use of org.kie.pmml.commons.model.expressions.KiePMMLDiscretize in project drools by kiegroup.
the class KiePMMLDiscretizeInstanceFactoryTest method getKiePMMLDiscretize.
@Test
public void getKiePMMLDiscretize() {
Discretize toConvert = getRandomDiscretize();
KiePMMLDiscretize retrieved = KiePMMLDiscretizeInstanceFactory.getKiePMMLDiscretize(toConvert);
commonVerifyKiePMMLDiscretize(retrieved, toConvert);
}
use of org.kie.pmml.commons.model.expressions.KiePMMLDiscretize in project drools by kiegroup.
the class KiePMMLDiscretizeInstanceFactory method getKiePMMLDiscretize.
static KiePMMLDiscretize getKiePMMLDiscretize(final Discretize discretize) {
List<KiePMMLDiscretizeBin> discretizeBins = discretize.hasDiscretizeBins() ? getKiePMMLDiscretizeBins(discretize.getDiscretizeBins()) : Collections.emptyList();
String mapMissingTo = discretize.getMapMissingTo() != null ? discretize.getMapMissingTo().toString() : null;
String defaultValue = discretize.getDefaultValue() != null ? discretize.getDefaultValue().toString() : null;
DATA_TYPE dataType = discretize.getDataType() != null ? DATA_TYPE.byName(discretize.getDataType().value()) : null;
return new KiePMMLDiscretize(discretize.getField().getValue(), getKiePMMLExtensions(discretize.getExtensions()), discretizeBins, mapMissingTo, defaultValue, dataType);
}
Aggregations