class KiePMMLPredicateFactory {

    public static Map<String, String> getPredicateSourcesMap(final KiePMMLPredicate kiePMMLPredicate,
                                                             final String packageName) {
        logger.trace("getPredicateSourcesMap {}", kiePMMLPredicate);
        if (kiePMMLPredicate instanceof KiePMMLSimplePredicate) {
            return getKiePMMLSimplePredicateSourcesMap((KiePMMLSimplePredicate) kiePMMLPredicate, packageName);
        } else if (kiePMMLPredicate instanceof KiePMMLSimpleSetPredicate) {
            return getKiePMMLSimpleSetPredicateSourcesMap((KiePMMLSimpleSetPredicate) kiePMMLPredicate, packageName);
        } else if (kiePMMLPredicate instanceof KiePMMLCompoundPredicate) {
            return getKiePMMLCompoundPredicateSourcesMap((KiePMMLCompoundPredicate) kiePMMLPredicate, packageName);
        } else if (kiePMMLPredicate instanceof KiePMMLTruePredicate) {
            return getKiePMMLTruePredicateSourcesMap((KiePMMLTruePredicate) kiePMMLPredicate, packageName);
        } else if (kiePMMLPredicate instanceof KiePMMLFalsePredicate) {
            return getKiePMMLFalsePredicateSourcesMap((KiePMMLFalsePredicate) kiePMMLPredicate, packageName);
        } else {
            throw new KiePMMLException("Predicate of type " + kiePMMLPredicate.getClass().getName() + " not managed, " +
                                               "yet");
        }
    }

    private  KiePMMLPredicateFactory();

}