@Test public void getFromDataDictionaryAndModelWithoutProvider() throws Exception { pmmlModel = KiePMMLUtil.load(getFileInputStream(ONE_MINING_TARGET_SOURCE), ONE_MINING_TARGET_SOURCE); final Optional<KiePMMLModel> retrieved = getFromCommonDataAndTransformationDictionaryAndModelFromPlugin(PACKAGE_NAME, pmmlModel.getDataDictionary(), pmmlModel.getTransformationDictionary(), pmmlModel.getModels().get(0), null); assertNotNull(retrieved); assertFalse(retrieved.isPresent()); }
public static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Model model, final Object kBuilder) { logger.trace("getFromCommonDataAndTransformationDictionaryAndModelFromPlugin {}", model); final PMML_MODEL pmmlMODEL = PMML_MODEL.byName(model.getClass().getSimpleName()); logger.debug("pmmlModelType {}", pmmlMODEL); return getModelImplementationProviderStream(model) .map(implementation -> implementation.getKiePMMLModelFromPlugin(packageName, dataDictionary, transformationDictionary, model, kBuilder)) .findFirst(); }
KiePMMLModelRetriever { public static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Model model, final Object kBuilder) { logger.trace("getFromCommonDataAndTransformationDictionaryAndModelFromPlugin {}", model); final PMML_MODEL pmmlMODEL = PMML_MODEL.byName(model.getClass().getSimpleName()); logger.debug("pmmlModelType {}", pmmlMODEL); return getModelImplementationProviderStream(model) .map(implementation -> implementation.getKiePMMLModelFromPlugin(packageName, dataDictionary, transformationDictionary, model, kBuilder)) .findFirst(); } }
KiePMMLModelRetriever { public static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Model model, final Object kBuilder) { logger.trace("getFromCommonDataAndTransformationDictionaryAndModelFromPlugin {}", model); final PMML_MODEL pmmlMODEL = PMML_MODEL.byName(model.getClass().getSimpleName()); logger.debug("pmmlModelType {}", pmmlMODEL); return getModelImplementationProviderStream(model) .map(implementation -> implementation.getKiePMMLModelFromPlugin(packageName, dataDictionary, transformationDictionary, model, kBuilder)) .findFirst(); } private  KiePMMLModelRetriever(); }
KiePMMLModelRetriever { public static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Model model, final Object kBuilder) { logger.trace("getFromCommonDataAndTransformationDictionaryAndModelFromPlugin {}", model); final PMML_MODEL pmmlMODEL = PMML_MODEL.byName(model.getClass().getSimpleName()); logger.debug("pmmlModelType {}", pmmlMODEL); return getModelImplementationProviderStream(model) .map(implementation -> implementation.getKiePMMLModelFromPlugin(packageName, dataDictionary, transformationDictionary, model, kBuilder)) .findFirst(); } private  KiePMMLModelRetriever(); static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModel(final DataDictionary dataDictionary,
                                                                                              final TransformationDictionary transformationDictionary,
                                                                                              final Model model,
                                                                                              final Object kBuilder); static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModelFromPlugin(final String packageName,
                                                                                                        final DataDictionary dataDictionary,
                                                                                                        final TransformationDictionary transformationDictionary,
                                                                                                        final Model model,
                                                                                                        final Object kBuilder); }
KiePMMLModelRetriever { public static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Model model, final Object kBuilder) { logger.trace("getFromCommonDataAndTransformationDictionaryAndModelFromPlugin {}", model); final PMML_MODEL pmmlMODEL = PMML_MODEL.byName(model.getClass().getSimpleName()); logger.debug("pmmlModelType {}", pmmlMODEL); return getModelImplementationProviderStream(model) .map(implementation -> implementation.getKiePMMLModelFromPlugin(packageName, dataDictionary, transformationDictionary, model, kBuilder)) .findFirst(); } private  KiePMMLModelRetriever(); static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModel(final DataDictionary dataDictionary,
                                                                                              final TransformationDictionary transformationDictionary,
                                                                                              final Model model,
                                                                                              final Object kBuilder); static Optional<KiePMMLModel> getFromCommonDataAndTransformationDictionaryAndModelFromPlugin(final String packageName,
                                                                                                        final DataDictionary dataDictionary,
                                                                                                        final TransformationDictionary transformationDictionary,
                                                                                                        final Model model,
                                                                                                        final Object kBuilder);  }