@Test public void getKiePMMLDroolsGolfingAST() { final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap = getFieldTypeMap(golfingPmml.getDataDictionary(), golfingPmml.getTransformationDictionary(), golfingModel.getLocalTransformations()); List<KiePMMLDroolsType> types = Collections.emptyList(); KiePMMLDroolsAST retrieved = KiePMMLTreeModelASTFactory.getKiePMMLDroolsAST(golfingPmml.getDataDictionary(), golfingModel, fieldTypeMap, types); assertNotNull(retrieved); assertEquals(types, retrieved.getTypes()); assertFalse(retrieved.getRules().isEmpty()); }
public static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary, final TreeModel model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final List<KiePMMLDroolsType> types) { logger.trace("getKiePMMLDroolsAST {} {}", dataDictionary, model); DATA_TYPE targetType = getTargetFieldType(dataDictionary, model); final List<KiePMMLOutputField> outputFields = getOutputFields(model); List<KiePMMLDroolsRule> rules = KiePMMLTreeModelNodeASTFactory.factory(fieldTypeMap, outputFields, model.getNoTrueChildStrategy(), targetType).declareRulesFromRootNode(model.getNode(), ""); return new KiePMMLDroolsAST(types, rules); }
KiePMMLTreeModelASTFactory extends KiePMMLAbstractModelASTFactory { public static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary, final TreeModel model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final List<KiePMMLDroolsType> types) { logger.trace("getKiePMMLDroolsAST {} {}", dataDictionary, model); DATA_TYPE targetType = getTargetFieldType(dataDictionary, model); final List<KiePMMLOutputField> outputFields = getOutputFields(model); List<KiePMMLDroolsRule> rules = KiePMMLTreeModelNodeASTFactory.factory(fieldTypeMap, outputFields, model.getNoTrueChildStrategy(), targetType).declareRulesFromRootNode(model.getNode(), ""); return new KiePMMLDroolsAST(types, rules); } }
KiePMMLTreeModelASTFactory extends KiePMMLAbstractModelASTFactory { public static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary, final TreeModel model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final List<KiePMMLDroolsType> types) { logger.trace("getKiePMMLDroolsAST {} {}", dataDictionary, model); DATA_TYPE targetType = getTargetFieldType(dataDictionary, model); final List<KiePMMLOutputField> outputFields = getOutputFields(model); List<KiePMMLDroolsRule> rules = KiePMMLTreeModelNodeASTFactory.factory(fieldTypeMap, outputFields, model.getNoTrueChildStrategy(), targetType).declareRulesFromRootNode(model.getNode(), ""); return new KiePMMLDroolsAST(types, rules); } private  KiePMMLTreeModelASTFactory(); }
KiePMMLTreeModelASTFactory extends KiePMMLAbstractModelASTFactory { public static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary, final TreeModel model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final List<KiePMMLDroolsType> types) { logger.trace("getKiePMMLDroolsAST {} {}", dataDictionary, model); DATA_TYPE targetType = getTargetFieldType(dataDictionary, model); final List<KiePMMLOutputField> outputFields = getOutputFields(model); List<KiePMMLDroolsRule> rules = KiePMMLTreeModelNodeASTFactory.factory(fieldTypeMap, outputFields, model.getNoTrueChildStrategy(), targetType).declareRulesFromRootNode(model.getNode(), ""); return new KiePMMLDroolsAST(types, rules); } private  KiePMMLTreeModelASTFactory(); static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary,
                                                       final TreeModel model,
                                                       final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap,
                                                       final List<KiePMMLDroolsType> types); }
KiePMMLTreeModelASTFactory extends KiePMMLAbstractModelASTFactory { public static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary, final TreeModel model, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final List<KiePMMLDroolsType> types) { logger.trace("getKiePMMLDroolsAST {} {}", dataDictionary, model); DATA_TYPE targetType = getTargetFieldType(dataDictionary, model); final List<KiePMMLOutputField> outputFields = getOutputFields(model); List<KiePMMLDroolsRule> rules = KiePMMLTreeModelNodeASTFactory.factory(fieldTypeMap, outputFields, model.getNoTrueChildStrategy(), targetType).declareRulesFromRootNode(model.getNode(), ""); return new KiePMMLDroolsAST(types, rules); } private  KiePMMLTreeModelASTFactory(); static KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary,
                                                       final TreeModel model,
                                                       final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap,
                                                       final List<KiePMMLDroolsType> types);  }