@Test public void addTransformationsDerivedFields() { final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap = new HashMap<>(); droolsModelProvider.addTransformationsDerivedFields(fieldTypeMap, pmml.getTransformationDictionary(), scorecard.getLocalTransformations()); commonVerifyFieldTypeMap(fieldTypeMap, Collections.emptyList(), pmml.getTransformationDictionary().getDerivedFields(), scorecard.getLocalTransformations().getDerivedFields()); }
protected void addTransformationsDerivedFields(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final TransformationDictionary transformationDictionary, final LocalTransformations localTransformations) { KiePMMLDerivedFieldASTFactory kiePMMLDerivedFieldASTFactory = KiePMMLDerivedFieldASTFactory.factory(fieldTypeMap); if (transformationDictionary != null && transformationDictionary.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(transformationDictionary.getDerivedFields()); } if (localTransformations != null && localTransformations.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(localTransformations.getDerivedFields()); } }
DroolsModelProvider implements ModelImplementationProvider<T, E> { protected void addTransformationsDerivedFields(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final TransformationDictionary transformationDictionary, final LocalTransformations localTransformations) { KiePMMLDerivedFieldASTFactory kiePMMLDerivedFieldASTFactory = KiePMMLDerivedFieldASTFactory.factory(fieldTypeMap); if (transformationDictionary != null && transformationDictionary.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(transformationDictionary.getDerivedFields()); } if (localTransformations != null && localTransformations.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(localTransformations.getDerivedFields()); } } }
DroolsModelProvider implements ModelImplementationProvider<T, E> { protected void addTransformationsDerivedFields(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final TransformationDictionary transformationDictionary, final LocalTransformations localTransformations) { KiePMMLDerivedFieldASTFactory kiePMMLDerivedFieldASTFactory = KiePMMLDerivedFieldASTFactory.factory(fieldTypeMap); if (transformationDictionary != null && transformationDictionary.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(transformationDictionary.getDerivedFields()); } if (localTransformations != null && localTransformations.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(localTransformations.getDerivedFields()); } }  }
DroolsModelProvider implements ModelImplementationProvider<T, E> { protected void addTransformationsDerivedFields(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final TransformationDictionary transformationDictionary, final LocalTransformations localTransformations) { KiePMMLDerivedFieldASTFactory kiePMMLDerivedFieldASTFactory = KiePMMLDerivedFieldASTFactory.factory(fieldTypeMap); if (transformationDictionary != null && transformationDictionary.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(transformationDictionary.getDerivedFields()); } if (localTransformations != null && localTransformations.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(localTransformations.getDerivedFields()); } }  @Override E getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final T model, final Object kBuilder); @Override E getKiePMMLModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final T model, final Object kBuilder); PackageDescr getPackageDescr(final KiePMMLDroolsAST kiePMMLDroolsAST, final String packageName); abstract E getKiePMMLDroolsModel(final DataDictionary dataDictionary,
                                            final TransformationDictionary transformationDictionary,
                                            final T model,
                                            final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); abstract KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary,
                                                         final T model,
                                                         final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap,
                                                         final List<KiePMMLDroolsType> types); abstract Map<String, String> getKiePMMLDroolsModelSourcesMap(final DataDictionary dataDictionary,
                                                                        final TransformationDictionary transformationDictionary,
                                                                        final T model,
                                                                        final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap,
                                                                        final String packageName); }
DroolsModelProvider implements ModelImplementationProvider<T, E> { protected void addTransformationsDerivedFields(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap, final TransformationDictionary transformationDictionary, final LocalTransformations localTransformations) { KiePMMLDerivedFieldASTFactory kiePMMLDerivedFieldASTFactory = KiePMMLDerivedFieldASTFactory.factory(fieldTypeMap); if (transformationDictionary != null && transformationDictionary.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(transformationDictionary.getDerivedFields()); } if (localTransformations != null && localTransformations.getDerivedFields() != null) { kiePMMLDerivedFieldASTFactory.declareTypes(localTransformations.getDerivedFields()); } }  @Override E getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final T model, final Object kBuilder); @Override E getKiePMMLModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final T model, final Object kBuilder); PackageDescr getPackageDescr(final KiePMMLDroolsAST kiePMMLDroolsAST, final String packageName); abstract E getKiePMMLDroolsModel(final DataDictionary dataDictionary,
                                            final TransformationDictionary transformationDictionary,
                                            final T model,
                                            final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); abstract KiePMMLDroolsAST getKiePMMLDroolsAST(final DataDictionary dataDictionary,
                                                         final T model,
                                                         final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap,
                                                         final List<KiePMMLDroolsType> types); abstract Map<String, String> getKiePMMLDroolsModelSourcesMap(final DataDictionary dataDictionary,
                                                                        final TransformationDictionary transformationDictionary,
                                                                        final T model,
                                                                        final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap,
                                                                        final String packageName);  }