class 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();

}