@Test public void getSegmentation() { final String segmentationName = "SEGMENTATION_NAME"; final KiePMMLSegmentation retrieved = KiePMMLSegmentationFactory.getSegmentation(DATA_DICTIONARY, TRANSFORMATION_DICTIONARY, MINING_MODEL.getSegmentation(), segmentationName, KNOWLEDGE_BUILDER); assertNotNull(retrieved); assertEquals(segmentationName, retrieved.getName()); }
public static KiePMMLSegmentation getSegmentation(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Segmentation segmentation, final String segmentationName, final KnowledgeBuilder kBuilder) { logger.debug("getSegmentation {}", segmentation); return KiePMMLSegmentation.builder(segmentationName, getKiePMMLExtensions(segmentation.getExtensions()), MULTIPLE_MODEL_METHOD.byName(segmentation.getMultipleModelMethod().value())) .withSegments(getSegments(dataDictionary, transformationDictionary, segmentation.getSegments(), kBuilder)) .build(); }
KiePMMLSegmentationFactory { public static KiePMMLSegmentation getSegmentation(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Segmentation segmentation, final String segmentationName, final KnowledgeBuilder kBuilder) { logger.debug("getSegmentation {}", segmentation); return KiePMMLSegmentation.builder(segmentationName, getKiePMMLExtensions(segmentation.getExtensions()), MULTIPLE_MODEL_METHOD.byName(segmentation.getMultipleModelMethod().value())) .withSegments(getSegments(dataDictionary, transformationDictionary, segmentation.getSegments(), kBuilder)) .build(); } }
KiePMMLSegmentationFactory { public static KiePMMLSegmentation getSegmentation(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Segmentation segmentation, final String segmentationName, final KnowledgeBuilder kBuilder) { logger.debug("getSegmentation {}", segmentation); return KiePMMLSegmentation.builder(segmentationName, getKiePMMLExtensions(segmentation.getExtensions()), MULTIPLE_MODEL_METHOD.byName(segmentation.getMultipleModelMethod().value())) .withSegments(getSegments(dataDictionary, transformationDictionary, segmentation.getSegments(), kBuilder)) .build(); } private  KiePMMLSegmentationFactory(); }
KiePMMLSegmentationFactory { public static KiePMMLSegmentation getSegmentation(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Segmentation segmentation, final String segmentationName, final KnowledgeBuilder kBuilder) { logger.debug("getSegmentation {}", segmentation); return KiePMMLSegmentation.builder(segmentationName, getKiePMMLExtensions(segmentation.getExtensions()), MULTIPLE_MODEL_METHOD.byName(segmentation.getMultipleModelMethod().value())) .withSegments(getSegments(dataDictionary, transformationDictionary, segmentation.getSegments(), kBuilder)) .build(); } private  KiePMMLSegmentationFactory(); static KiePMMLSegmentation getSegmentation(final DataDictionary dataDictionary,
                                                      final TransformationDictionary transformationDictionary,
                                                      final Segmentation segmentation,
                                                      final String segmentationName,
                                                      final KnowledgeBuilder kBuilder); static Map<String, String> getSegmentationSourcesMap(final String parentPackageName,
                                                                final DataDictionary dataDictionary,
                                                                final TransformationDictionary transformationDictionary,
                                                                final Segmentation segmentation,
                                                                final String segmentationName,
                                                                final KnowledgeBuilder kBuilder,
                                                                final List<KiePMMLModel> nestedModels); }
KiePMMLSegmentationFactory { public static KiePMMLSegmentation getSegmentation(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final Segmentation segmentation, final String segmentationName, final KnowledgeBuilder kBuilder) { logger.debug("getSegmentation {}", segmentation); return KiePMMLSegmentation.builder(segmentationName, getKiePMMLExtensions(segmentation.getExtensions()), MULTIPLE_MODEL_METHOD.byName(segmentation.getMultipleModelMethod().value())) .withSegments(getSegments(dataDictionary, transformationDictionary, segmentation.getSegments(), kBuilder)) .build(); } private  KiePMMLSegmentationFactory(); static KiePMMLSegmentation getSegmentation(final DataDictionary dataDictionary,
                                                      final TransformationDictionary transformationDictionary,
                                                      final Segmentation segmentation,
                                                      final String segmentationName,
                                                      final KnowledgeBuilder kBuilder); static Map<String, String> getSegmentationSourcesMap(final String parentPackageName,
                                                                final DataDictionary dataDictionary,
                                                                final TransformationDictionary transformationDictionary,
                                                                final Segmentation segmentation,
                                                                final String segmentationName,
                                                                final KnowledgeBuilder kBuilder,
                                                                final List<KiePMMLModel> nestedModels);  }