@Test public void getKiePMMLModel() throws Exception { final PMML pmml = TestUtils.loadFromFile(SOURCE_1); assertNotNull(pmml); assertEquals(1, pmml.getModels().size()); assertTrue(pmml.getModels().get(0) instanceof RegressionModel); final KiePMMLRegressionModel retrieved = PROVIDER.getKiePMMLModel(pmml.getDataDictionary(), pmml.getTransformationDictionary(), (RegressionModel) pmml.getModels().get(0), RELEASE_ID); assertNotNull(retrieved); }
@Override public KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder) { logger.trace("getKiePMMLModel {} {} {}", dataDictionary, model, kBuilder); validate(dataDictionary, model); try { return KiePMMLRegressionModelFactory.getKiePMMLRegressionModelClasses(dataDictionary, transformationDictionary, model); } catch (IOException | IllegalAccessException | InstantiationException e) { throw new KiePMMLException(e.getMessage(), e); } }
RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> { @Override public KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder) { logger.trace("getKiePMMLModel {} {} {}", dataDictionary, model, kBuilder); validate(dataDictionary, model); try { return KiePMMLRegressionModelFactory.getKiePMMLRegressionModelClasses(dataDictionary, transformationDictionary, model); } catch (IOException | IllegalAccessException | InstantiationException e) { throw new KiePMMLException(e.getMessage(), e); } } }
RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> { @Override public KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder) { logger.trace("getKiePMMLModel {} {} {}", dataDictionary, model, kBuilder); validate(dataDictionary, model); try { return KiePMMLRegressionModelFactory.getKiePMMLRegressionModelClasses(dataDictionary, transformationDictionary, model); } catch (IOException | IllegalAccessException | InstantiationException e) { throw new KiePMMLException(e.getMessage(), e); } }  }
RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> { @Override public KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder) { logger.trace("getKiePMMLModel {} {} {}", dataDictionary, model, kBuilder); validate(dataDictionary, model); try { return KiePMMLRegressionModelFactory.getKiePMMLRegressionModelClasses(dataDictionary, transformationDictionary, model); } catch (IOException | IllegalAccessException | InstantiationException e) { throw new KiePMMLException(e.getMessage(), e); } }  @Override PMML_MODEL getPMMLModelType(); @Override KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder); @Override KiePMMLRegressionModel getKiePMMLModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder); }
RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> { @Override public KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder) { logger.trace("getKiePMMLModel {} {} {}", dataDictionary, model, kBuilder); validate(dataDictionary, model); try { return KiePMMLRegressionModelFactory.getKiePMMLRegressionModelClasses(dataDictionary, transformationDictionary, model); } catch (IOException | IllegalAccessException | InstantiationException e) { throw new KiePMMLException(e.getMessage(), e); } }  @Override PMML_MODEL getPMMLModelType(); @Override KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder); @Override KiePMMLRegressionModel getKiePMMLModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder);  }